From 9439c6f1caffd938673018f3af7460b33a12528e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 20 Mar 2016 16:39:30 +0100 Subject: Another work progress --- Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0ddb6d8..67aaf49 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ ifeq (,$(filter clean help docs serve-docs clean-docs config oldconfig \ allyesconfig menuconfig, \ $(MAKECMDGOALS))) # Ignore build targets if goal is not building --include $(O)/build/config.mk # include configuration +include $(CONFIG) # include configuration ### Source files list ########################### SRC = base.c @@ -56,20 +56,15 @@ $(OBJ): $(O)/build/%.o: src/%.c @echo " CC $@" $(Q)$(GCC) $(CFLAGS) -c -o $@ $< -$(DEP): $(O)/build/%.d: src/%.c $(O)/build/config.mk +$(DEP): $(O)/build/%.d: src/%.c $(Q)mkdir -p "$(@D)" @echo " DEP $@" $(Q)$(GCC) -MM -MG -MT '$*.o $@' $(CFLAGS) -c -o $@ $< -$(O)/build/config.mk: $(CONFIG) - $(Q)mkdir -p "$(@D)" - @echo " GEN $(CONFIG).mk" - $(Q)sed 's/="\(.*\)"/=\1/' $(CONFIG) > "$@" - $(O)/build/config.h: $(CONFIG) $(Q)mkdir -p "$(@D)" - @echo " GEN $(CONFIG).h" - $(Q)grep -v "^#" $(CONFIG) | grep "CONFIG_" | sed 's/=/ /;s/^/#define /' > $@ + @echo " GEN $@" + $(Q)grep -v "^#" $(CONFIG) | grep "CONFIG_" | sed 's/="\(.*\)"/=\1/;s/=/ /;s/^/#define /' > $@ # This is not optimal because configuration change results to complete project # rebuild instead of only rebuilding required files. -- cgit v1.2.3