Commit 862baeb8 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan
Browse files

build-refactor-2: Microkernel, kliblcd, and liblcd all build.

In one giant build circus.

Test mods build not re-configured yet. Going to do some
runtime testing and debugging of the new code before I fix
those up.
parent bd5bde51
...@@ -52,8 +52,7 @@ MICROKERNEL_BUILD_DIRS=$(foreach dir,$(MICROKERNEL_DIRS),\ ...@@ -52,8 +52,7 @@ MICROKERNEL_BUILD_DIRS=$(foreach dir,$(MICROKERNEL_DIRS),\
MICROKERNEL_LIBCAP=$(MICROKERNEL_BUILD_DIR)/libcap.install/lib/libcap.a MICROKERNEL_LIBCAP=$(MICROKERNEL_BUILD_DIR)/libcap.install/lib/libcap.a
MICROKERNEL_LIBCAP_CFLAGS= \ MICROKERNEL_LIBCAP_CFLAGS= \
-DLCD_DOMAINS \ "-DLCD_DOMAINS -I$(LCD_DOMAINS_TOP_SRC_DIR)/include -I$(LCD_DOMAINS_TOP_SRC_DIR)/config/non_isolated"
-I$(LCD_DOMAINS_TOP_SRC_DIR)/config/non_isolated
microkernel: $(MICROKERNEL_BUILD_DIR)/Kbuild $(MICROKERNEL_LIBCAP) | \ microkernel: $(MICROKERNEL_BUILD_DIR)/Kbuild $(MICROKERNEL_LIBCAP) | \
$(MICROKERNEL_BUILD_DIRS) $(MICROKERNEL_BUILD_DIRS)
...@@ -106,17 +105,16 @@ LIBLCD_LIBCAP=$(LIBLCD_BUILD_DIR)/libcap.install/lib/libcap.a ...@@ -106,17 +105,16 @@ LIBLCD_LIBCAP=$(LIBLCD_BUILD_DIR)/libcap.install/lib/libcap.a
LIBLCD_LIBCAP_CFLAGS= \ LIBLCD_LIBCAP_CFLAGS= \
"-DLCD_DOMAINS -I$(LCD_DOMAINS_TOP_SRC_DIR)/include -I$(LCD_DOMAINS_TOP_SRC_DIR)/config/isolated" "-DLCD_DOMAINS -I$(LCD_DOMAINS_TOP_SRC_DIR)/include -I$(LCD_DOMAINS_TOP_SRC_DIR)/config/isolated"
LIBLCD_AR_SCRIPT= \ # There isn't a nice easy way to multiline this, and I want access to the
"CREATE $(LIBLCD_BUILD_DIR)/liblcd.a\n" \ # LIBLCD_BUILD_DIR variable (so I don't want to create a separate file); so
"ADDLIB $(LIBLCD_BUILD_DIR)/lib.a\n" \ # I mash this in one line for now.
"ADDLIB $(LIBLCD_BUILD_DIR)/libcap.install/lib/libcap.a\n" \ LIBLCD_AR_SCRIPT="CREATE $(LIBLCD_BUILD_DIR)/liblcd.a\nADDLIB $(LIBLCD_BUILD_DIR)/lib.a\nADDLIB $(LIBLCD_BUILD_DIR)/libcap.install/lib/libcap.a\nSAVE\nEND\n"
"SAVE\n" \
"END\n"
liblcd: $(LIBLCD_BUILD_DIR)/liblcd.a liblcd: $(LIBLCD_BUILD_DIR)/liblcd.a
$(LIBLCD_BUILD_DIR)/liblcd.a: $(LIBLCD_BUILD_DIR)/lib.a $(LIBLCD_LIBCAP) $(LIBLCD_BUILD_DIR)/liblcd.a: $(LIBLCD_BUILD_DIR)/lib.a $(LIBLCD_LIBCAP)
echo $(LIBLCD_AR_SCRIPT) | ar -M @echo " AR $@"
@echo $(LIBLCD_AR_SCRIPT) | ar -M
$(LIBLCD_BUILD_DIR)/lib.a: $(LIBLCD_BUILD_DIR)/Kbuild | \ $(LIBLCD_BUILD_DIR)/lib.a: $(LIBLCD_BUILD_DIR)/Kbuild | \
$(LIBLCD_BUILD_DIRS) $(LIBLCD_BUILD_DIRS)
......
...@@ -69,7 +69,7 @@ hva_t __lcd_memory_object_hva(struct lcd_memory_object *mo) ...@@ -69,7 +69,7 @@ hva_t __lcd_memory_object_hva(struct lcd_memory_object *mo)
return pa2hva(__lcd_memory_object_start(mo)); return pa2hva(__lcd_memory_object_start(mo));
case LCD_MICROKERNEL_TYPE_ID_VMALLOC_MEM: case LCD_MICROKERNEL_TYPE_ID_VMALLOC_MEM:
case LCD_MICROKERNEL_TYPE_ID_VOLUNTEERED_VMALLOC_MEM: case LCD_MICROKERNEL_TYPE_ID_VOLUNTEERED_VMALLOC_MEM:
return va2hva(__lcd_memory_object_start(mo)); return __hva(__lcd_memory_object_start(mo));
default: default:
LCD_ERR("unexpected memory object type %d", mo->sub_type); LCD_ERR("unexpected memory object type %d", mo->sub_type);
BUG(); BUG();
......
...@@ -54,8 +54,7 @@ lib-y += $(addprefix common/, \ ...@@ -54,8 +54,7 @@ lib-y += $(addprefix common/, \
module_create.o \ module_create.o \
) )
# libcap # libcap is linked in with ar script
lib-y += libcap.install/lib/libcap.a
# Extra includes # Extra includes
ccflags-y += \ ccflags-y += \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment