meso: miscellaneous cleanup and build fixes

This commit is contained in:
fincs
2019-12-13 21:41:19 +01:00
committed by SciresM
parent af352e4f7f
commit 623b5f4eb9
7 changed files with 73 additions and 153 deletions

View File

@@ -11,6 +11,7 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export TOPDIR := $(CURDIR)
export DEPSDIR := $(CURDIR)/$(BUILD)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
@@ -59,21 +60,23 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
.PHONY: clean all
.PHONY: $(BUILD) clean all
#---------------------------------------------------------------------------------
all: $(BUILD)
all: $(BUILD) check_libmeso
$(BUILD):
$(BUILD): check_libmeso
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
check_libmeso:
@$(MAKE) --no-print-directory -C ../../libraries/libmesosphere
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).bin $(OUTPUT).elf
#---------------------------------------------------------------------------------
else
.PHONY: all
@@ -89,7 +92,7 @@ $(OUTPUT).bin : $(OUTPUT).elf
$(OBJCOPY) -S -O binary $< $@
@echo built ... $(notdir $@)
$(OUTPUT).elf : $(OFILES)
$(OUTPUT).elf : $(OFILES) ../../../libraries/libmesosphere/lib/libmesosphere.a
%.elf:
@echo linking $(notdir $@)

View File

@@ -73,7 +73,6 @@ SECTIONS
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } :krnlldr
.gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } : rodata
__dynamic__start__ = . ;
.dynamic : { *(.dynamic) } :krnlldr :dyn
.dynsym : { *(.dynsym) } :krnlldr
.dynstr : { *(.dynstr) } :krnlldr

View File

@@ -89,7 +89,7 @@ __external_references:
.quad __bss_start__ - _start
.quad __bss_end__ - _start
.quad __stack_end - _start
.quad __dynamic__start__ - _start
.quad _DYNAMIC - _start
.quad __init_array_start - _start
.quad __init_array_end - _start
.quad __vectors_start__ - _start