From d5cd902e8b67a856d0b7b3f1008bf42245d9e297 Mon Sep 17 00:00:00 2001 From: mahi Date: Sun, 20 Jun 2010 10:00:19 +0200 Subject: [PATCH] Made config work --- makefile | 5 ++++- scripts/rules.mk | 15 +++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/makefile b/makefile index 8ac4e4e0..423eaf11 100644 --- a/makefile +++ b/makefile @@ -103,7 +103,7 @@ export def-y+=$(CFG_ARCH_$(ARCH)) $(CFG_MCU) $(CFG_CPU) comma:= , split = $(subst $(comma), ,$(1)) dir_cmd_goals := $(call split,$(BDIR)) -cmd_cmd_goals := $(filter clean all config,$(MAKECMDGOALS)) +cmd_cmd_goals := $(filter all clean config,$(MAKECMDGOALS)) # Check for CROSS_COMPILE ifneq ($(cmd_cmd_goals),) @@ -125,6 +125,8 @@ endif libs: mkdir -p $@ +.PHONY all: + all: libs $(dir_cmd_goals) @@ -160,6 +162,7 @@ clean_all: config: $(dir_cmd_goals) +.PHONY clean: clean: $(dir_cmd_goals) @echo "Clean:" @echo " Removing objectfiles and libs for ARCH=$(ARCH)" diff --git a/scripts/rules.mk b/scripts/rules.mk index 8a290062..171bb043 100644 --- a/scripts/rules.mk +++ b/scripts/rules.mk @@ -68,12 +68,15 @@ include $(ROOTDIR)/scripts/cc_$(COMPILER).mk include ../makefile inc-y += $(ROOTDIR)/include -#inc-$(CFG_PPC) += $(ROOTDIR)/include/ppc -#inc-$(CFG_ARM) += $(ROOTDIR)/include/arm inc-y += $(ROOTDIR)/include/$(ARCH_FAM) -.PHONY config: +.PHONY clean: +clean: FORCE + @-rm -f *.o *.d *.h *.elf *.a + + +.PHONY config: config: FORCE @echo "board modules:" $(MOD_AVAIL) @echo "example modules:" $(MOD_USE) @@ -85,12 +88,10 @@ $(ROOTDIR)/binaries: @mkdir -p $@ # build- targets are "end" target that the included makefile want's to build +.PHONY all: all: $(build-exe-y) $(build-hex-y) $(build-lib-y) $(ROOTDIR)/binaries @cp -v $(build-lib-y) $(build-exe-y) $(build-hex-y) $(ROOTDIR)/binaries -#.PHONY post_process: -#post_process:: $(ROOTDIR)/binaries - # Determine what kind of filetype to build from VPATH += $(ROOTDIR)/$(SUBDIR)/src @@ -166,5 +167,3 @@ $(size-exe-y): $(build-exe-y) $(Q)$(OBJDUMP) -h $< @echo TODO: Parse the file.... -.PHONY clean: - @-rm -f *.o *.d *.h *.elf *.a -- 2.39.2