aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/rules.mk
diff options
context:
space:
mode:
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
49AUTOGEN ?= false 49AUTOGEN ?= false
50 50
51 51
52# List any extra directories to look for include files here.
53# Each directory must be seperated by a space.
54# Use forward slashes for directory separators.
55# For a directory that has spaces, enclose it in quotes.
56EXTRAINCDIRS += $(subst :, ,$(VPATH_SRC))
57
58
59# Compiler flag to set the C Standard level. 52# Compiler flag to set the C Standard level.
60# c89 = "ANSI" C 53# c89 = "ANSI" C
61# gnu89 = c89 plus GCC extensions 54# gnu89 = c89 plus GCC extensions
@@ -104,7 +97,6 @@ CFLAGS += -Wstrict-prototypes
104#CFLAGS += -Wunreachable-code 97#CFLAGS += -Wunreachable-code
105#CFLAGS += -Wsign-compare 98#CFLAGS += -Wsign-compare
106CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) 99CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
107CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
108CFLAGS += $(CSTANDARD) 100CFLAGS += $(CSTANDARD)
109ifdef CONFIG_H 101ifdef CONFIG_H
110 CFLAGS += -include $(CONFIG_H) 102 CFLAGS += -include $(CONFIG_H)
@@ -131,7 +123,6 @@ CPPFLAGS += -Wundef
131#CPPFLAGS += -Wunreachable-code 123#CPPFLAGS += -Wunreachable-code
132#CPPFLAGS += -Wsign-compare 124#CPPFLAGS += -Wsign-compare
133CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) 125CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
134CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
135#CPPFLAGS += $(CSTANDARD) 126#CPPFLAGS += $(CSTANDARD)
136ifdef CONFIG_H 127ifdef CONFIG_H
137 CPPFLAGS += -include $(CONFIG_H) 128 CPPFLAGS += -include $(CONFIG_H)
@@ -149,7 +140,6 @@ endif
149# dump that will be displayed for a given single line of source input. 140# dump that will be displayed for a given single line of source input.
150ASFLAGS += $(ADEFS) 141ASFLAGS += $(ADEFS)
151ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 142ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
152ASFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
153ifdef CONFIG_H 143ifdef CONFIG_H
154 ASFLAGS += -include $(CONFIG_H) 144 ASFLAGS += -include $(CONFIG_H)
155endif 145endif
@@ -305,9 +295,11 @@ BEGIN = gccversion sizebefore
305 295
306 296
307define GEN_OBJRULE 297define GEN_OBJRULE
308$1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) 298$1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC))
309$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS) 299$1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS)
310$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) 300$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS) $$($1_INCFLAGS)
301$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS)
302$$(info $$($1_INCFLAGS))
311 303
312# Compile: create object files from C source files. 304# Compile: create object files from C source files.
313$1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN) 305$1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN)