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 $@)