aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/rules.mk
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-15 08:45:36 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-08-20 03:56:40 +0300
commit33fbd3be36bf58c6a02fb6b4ae99dc5bca7c8e58 (patch)
tree02b6bf1f1c4e02af6dd5bfb6c4f3a570540e23b1 /tmk_core/rules.mk
parent3aac4e95c91be3244d68f27159c2667904c8fddd (diff)
downloadfirmware-33fbd3be36bf58c6a02fb6b4ae99dc5bca7c8e58.tar.gz
firmware-33fbd3be36bf58c6a02fb6b4ae99dc5bca7c8e58.tar.bz2
firmware-33fbd3be36bf58c6a02fb6b4ae99dc5bca7c8e58.zip
Output specific include paths
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r--tmk_core/rules.mk18
1 files changed, 5 insertions, 13 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 9f6d8d9df..7b2c842ed 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -49,13 +49,6 @@ OPT = s
AUTOGEN ?= false
-# List any extra directories to look for include files here.
-# Each directory must be seperated by a space.
-# Use forward slashes for directory separators.
-# For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS += $(subst :, ,$(VPATH_SRC))
-
-
# Compiler flag to set the C Standard level.
# c89 = "ANSI" C
# gnu89 = c89 plus GCC extensions
@@ -104,7 +97,6 @@ CFLAGS += -Wstrict-prototypes
#CFLAGS += -Wunreachable-code
#CFLAGS += -Wsign-compare
CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
CFLAGS += $(CSTANDARD)
ifdef CONFIG_H
CFLAGS += -include $(CONFIG_H)
@@ -131,7 +123,6 @@ CPPFLAGS += -Wundef
#CPPFLAGS += -Wunreachable-code
#CPPFLAGS += -Wsign-compare
CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
#CPPFLAGS += $(CSTANDARD)
ifdef CONFIG_H
CPPFLAGS += -include $(CONFIG_H)
@@ -149,7 +140,6 @@ endif
# dump that will be displayed for a given single line of source input.
ASFLAGS += $(ADEFS)
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
-ASFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
ifdef CONFIG_H
ASFLAGS += -include $(CONFIG_H)
endif
@@ -305,9 +295,11 @@ BEGIN = gccversion sizebefore
define GEN_OBJRULE
-$1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS)
-$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS)
-$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS)
+$1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC))
+$1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS)
+$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS) $$($1_INCFLAGS)
+$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS)
+$$(info $$($1_INCFLAGS))
# Compile: create object files from C source files.
$1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN)