diff options
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r-- | tmk_core/rules.mk | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 334ff314be..c1474a5c24 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -65,9 +65,9 @@ CSTANDARD = -std=gnu99 # Place -D or -U options here for C++ sources -#CPPDEFS += -D__STDC_LIMIT_MACROS -#CPPDEFS += -D__STDC_CONSTANT_MACROS -#CPPDEFS += +#CXXDEFS += -D__STDC_LIMIT_MACROS +#CXXDEFS += -D__STDC_CONSTANT_MACROS +#CXXDEFS += @@ -111,24 +111,24 @@ CFLAGS += $(CSTANDARD) # -Wa,...: tell GCC to pass this to the assembler. # -adhlns...: create assembler listing ifndef SKIP_DEBUG_INFO - CPPFLAGS += -g$(DEBUG) + CXXFLAGS += -g$(DEBUG) endif -CPPFLAGS += $(CPPDEFS) -CPPFLAGS += -O$(OPT) +CXXFLAGS += $(CXXDEFS) +CXXFLAGS += -O$(OPT) # to supress "warning: only initialized variables can be placed into program memory area" -CPPFLAGS += -w -CPPFLAGS += -Wall -CPPFLAGS += -Wundef +CXXFLAGS += -w +CXXFLAGS += -Wall +CXXFLAGS += -Wundef ifneq ($(strip $(ALLOW_WARNINGS)), yes) - CPPFLAGS += -Werror + CXXFLAGS += -Werror endif -#CPPFLAGS += -mshort-calls -#CPPFLAGS += -fno-unit-at-a-time -#CPPFLAGS += -Wstrict-prototypes -#CPPFLAGS += -Wunreachable-code -#CPPFLAGS += -Wsign-compare -CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) -#CPPFLAGS += $(CSTANDARD) +#CXXFLAGS += -mshort-calls +#CXXFLAGS += -fno-unit-at-a-time +#CXXFLAGS += -Wstrict-prototypes +#CXXFLAGS += -Wunreachable-code +#CXXFLAGS += -Wsign-compare +CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) +#CXXFLAGS += $(CSTANDARD) #---------------- Assembler Options ---------------- # -Wa,...: tell GCC to pass this to the assembler. @@ -213,7 +213,7 @@ GENDEPFLAGS = -MMD -MP -MF $(patsubst %.o,%.td,$@) # Add target processor to flags. # You can give extra flags at 'make' command line like: make EXTRAFLAGS=-DFOO=bar ALL_CFLAGS = $(MCUFLAGS) $(CFLAGS) $(EXTRAFLAGS) -ALL_CPPFLAGS = $(MCUFLAGS) -x c++ $(CPPFLAGS) $(EXTRAFLAGS) +ALL_CXXFLAGS = $(MCUFLAGS) -x c++ $(CXXFLAGS) $(EXTRAFLAGS) ALL_ASFLAGS = $(MCUFLAGS) -x assembler-with-cpp $(ASFLAGS) $(EXTRAFLAGS) define NO_LTO @@ -306,7 +306,7 @@ ifdef $1_CONFIG $1_CONFIG_FLAGS += $$(patsubst %,-include %,$$($1_CONFIG)) endif $1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) -$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) +$1_CXXFLAGS= $$(ALL_CXXFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) $1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) # Compile: create object files from C source files. @@ -317,16 +317,16 @@ $1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN) @$$(BUILD_CMD) # Compile: create object files from C++ source files. -$1/%.o : %.cpp $1/%.d $1/cppflags.txt $1/compiler.txt | $(BEGIN) +$1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) @mkdir -p $$(@D) - @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD) - $$(eval CMD=$$(CC) -c $$($1_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) + @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) + $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) @$$(BUILD_CMD) -$1/%.o : %.cc $1/%.d $1/cppflags.txt $1/compiler.txt | $(BEGIN) +$1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) @mkdir -p $$(@D) - @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD) - $$(eval CMD=$$(CC) -c $$($1_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) + @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) + $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) @$$(BUILD_CMD) # Assemble: create object files from assembler source files. @@ -347,8 +347,8 @@ $1/force: $1/cflags.txt: $1/force echo '$$($1_CFLAGS)' | cmp -s - $$@ || echo '$$($1_CFLAGS)' > $$@ -$1/cppflags.txt: $1/force - echo '$$($1_CPPFLAGS)' | cmp -s - $$@ || echo '$$($1_CPPFLAGS)' > $$@ +$1/cxxflags.txt: $1/force + echo '$$($1_CXXFLAGS)' | cmp -s - $$@ || echo '$$($1_CXXFLAGS)' > $$@ $1/asflags.txt: $1/force echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@ |