aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--message.mk2
-rw-r--r--tmk_core/arm_atsam.mk4
-rw-r--r--tmk_core/avr.mk4
-rw-r--r--tmk_core/chibios.mk4
-rw-r--r--tmk_core/native.mk20
-rw-r--r--tmk_core/rules.mk54
6 files changed, 44 insertions, 44 deletions
diff --git a/message.mk b/message.mk
index 53afba206..94ab606ec 100644
--- a/message.mk
+++ b/message.mk
@@ -50,7 +50,7 @@ MSG_EXTENDED_LISTING = Creating Extended Listing:
50MSG_SYMBOL_TABLE = Creating Symbol Table: 50MSG_SYMBOL_TABLE = Creating Symbol Table:
51MSG_LINKING = Linking: 51MSG_LINKING = Linking:
52MSG_COMPILING = Compiling: 52MSG_COMPILING = Compiling:
53MSG_COMPILING_CPP = Compiling: 53MSG_COMPILING_CXX = Compiling:
54MSG_ASSEMBLING = Assembling: 54MSG_ASSEMBLING = Assembling:
55MSG_CLEANING = Cleaning project: 55MSG_CLEANING = Cleaning project:
56MSG_CREATING_LIBRARY = Creating library: 56MSG_CREATING_LIBRARY = Creating library:
diff --git a/tmk_core/arm_atsam.mk b/tmk_core/arm_atsam.mk
index c9b14042f..403ebf3a8 100644
--- a/tmk_core/arm_atsam.mk
+++ b/tmk_core/arm_atsam.mk
@@ -29,8 +29,8 @@ COMPILEFLAGS += -mthumb
29 29
30CFLAGS += $(COMPILEFLAGS) 30CFLAGS += $(COMPILEFLAGS)
31 31
32CPPFLAGS += $(COMPILEFLAGS) 32CXXFLAGS += $(COMPILEFLAGS)
33CPPFLAGS += -fno-exceptions -std=c++11 33CXXFLAGS += -fno-exceptions -std=c++11
34 34
35LDFLAGS +=-Wl,--gc-sections 35LDFLAGS +=-Wl,--gc-sections
36LDFLAGS += -Wl,-Map="%OUT%%PROJ_NAME%.map" 36LDFLAGS += -Wl,-Map="%OUT%%PROJ_NAME%.map"
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index ecd2fd39a..d5ca3a4dd 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -25,8 +25,8 @@ CFLAGS += $(COMPILEFLAGS)
25CFLAGS += -fno-inline-small-functions 25CFLAGS += -fno-inline-small-functions
26CFLAGS += -fno-strict-aliasing 26CFLAGS += -fno-strict-aliasing
27 27
28CPPFLAGS += $(COMPILEFLAGS) 28CXXFLAGS += $(COMPILEFLAGS)
29CPPFLAGS += -fno-exceptions -std=c++11 29CXXFLAGS += -fno-exceptions -std=c++11
30 30
31LDFLAGS +=-Wl,--gc-sections 31LDFLAGS +=-Wl,--gc-sections
32 32
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index b2e364f21..f9e52aed2 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -167,8 +167,8 @@ CFLAGS += $(COMPILEFLAGS)
167 167
168ASFLAGS += $(THUMBFLAGS) 168ASFLAGS += $(THUMBFLAGS)
169 169
170CPPFLAGS += $(COMPILEFLAGS) 170CXXFLAGS += $(COMPILEFLAGS)
171CPPFLAGS += -fno-rtti 171CXXFLAGS += -fno-rtti
172 172
173LDFLAGS +=-Wl,--gc-sections 173LDFLAGS +=-Wl,--gc-sections
174LDFLAGS +=-Wl,--no-wchar-size-warning 174LDFLAGS +=-Wl,--no-wchar-size-warning
diff --git a/tmk_core/native.mk b/tmk_core/native.mk
index 530b50b84..3caf64454 100644
--- a/tmk_core/native.mk
+++ b/tmk_core/native.mk
@@ -1,13 +1,13 @@
1SYSTEM_TYPE := $(shell gcc -dumpmachine) 1SYSTEM_TYPE := $(shell gcc -dumpmachine)
2 2
3CC = gcc 3CC = gcc
4OBJCOPY = 4OBJCOPY =
5OBJDUMP = 5OBJDUMP =
6SIZE = 6SIZE =
7AR = 7AR =
8NM = 8NM =
9HEX = 9HEX =
10EEP = 10EEP =
11BIN = 11BIN =
12 12
13 13
@@ -24,6 +24,6 @@ CFLAGS += $(COMPILEFLAGS)
24CFLAGS += -fno-inline-small-functions 24CFLAGS += -fno-inline-small-functions
25CFLAGS += -fno-strict-aliasing 25CFLAGS += -fno-strict-aliasing
26 26
27CPPFLAGS += $(COMPILEFLAGS) 27CXXFLAGS += $(COMPILEFLAGS)
28CPPFLAGS += -fno-exceptions 28CXXFLAGS += -fno-exceptions
29CPPFLAGS += -std=gnu++11 \ No newline at end of file 29CXXFLAGS += -std=gnu++11
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 334ff314b..c1474a5c2 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -65,9 +65,9 @@ CSTANDARD = -std=gnu99
65 65
66 66
67# Place -D or -U options here for C++ sources 67# Place -D or -U options here for C++ sources
68#CPPDEFS += -D__STDC_LIMIT_MACROS 68#CXXDEFS += -D__STDC_LIMIT_MACROS
69#CPPDEFS += -D__STDC_CONSTANT_MACROS 69#CXXDEFS += -D__STDC_CONSTANT_MACROS
70#CPPDEFS += 70#CXXDEFS +=
71 71
72 72
73 73
@@ -111,24 +111,24 @@ CFLAGS += $(CSTANDARD)
111# -Wa,...: tell GCC to pass this to the assembler. 111# -Wa,...: tell GCC to pass this to the assembler.
112# -adhlns...: create assembler listing 112# -adhlns...: create assembler listing
113ifndef SKIP_DEBUG_INFO 113ifndef SKIP_DEBUG_INFO
114 CPPFLAGS += -g$(DEBUG) 114 CXXFLAGS += -g$(DEBUG)
115endif 115endif
116CPPFLAGS += $(CPPDEFS) 116CXXFLAGS += $(CXXDEFS)
117CPPFLAGS += -O$(OPT) 117CXXFLAGS += -O$(OPT)
118# to supress "warning: only initialized variables can be placed into program memory area" 118# to supress "warning: only initialized variables can be placed into program memory area"
119CPPFLAGS += -w 119CXXFLAGS += -w
120CPPFLAGS += -Wall 120CXXFLAGS += -Wall
121CPPFLAGS += -Wundef 121CXXFLAGS += -Wundef
122ifneq ($(strip $(ALLOW_WARNINGS)), yes) 122ifneq ($(strip $(ALLOW_WARNINGS)), yes)
123 CPPFLAGS += -Werror 123 CXXFLAGS += -Werror
124endif 124endif
125#CPPFLAGS += -mshort-calls 125#CXXFLAGS += -mshort-calls
126#CPPFLAGS += -fno-unit-at-a-time 126#CXXFLAGS += -fno-unit-at-a-time
127#CPPFLAGS += -Wstrict-prototypes 127#CXXFLAGS += -Wstrict-prototypes
128#CPPFLAGS += -Wunreachable-code 128#CXXFLAGS += -Wunreachable-code
129#CPPFLAGS += -Wsign-compare 129#CXXFLAGS += -Wsign-compare
130CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) 130CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
131#CPPFLAGS += $(CSTANDARD) 131#CXXFLAGS += $(CSTANDARD)
132 132
133#---------------- Assembler Options ---------------- 133#---------------- Assembler Options ----------------
134# -Wa,...: tell GCC to pass this to the assembler. 134# -Wa,...: tell GCC to pass this to the assembler.
@@ -213,7 +213,7 @@ GENDEPFLAGS = -MMD -MP -MF $(patsubst %.o,%.td,$@)
213# Add target processor to flags. 213# Add target processor to flags.
214# You can give extra flags at 'make' command line like: make EXTRAFLAGS=-DFOO=bar 214# You can give extra flags at 'make' command line like: make EXTRAFLAGS=-DFOO=bar
215ALL_CFLAGS = $(MCUFLAGS) $(CFLAGS) $(EXTRAFLAGS) 215ALL_CFLAGS = $(MCUFLAGS) $(CFLAGS) $(EXTRAFLAGS)
216ALL_CPPFLAGS = $(MCUFLAGS) -x c++ $(CPPFLAGS) $(EXTRAFLAGS) 216ALL_CXXFLAGS = $(MCUFLAGS) -x c++ $(CXXFLAGS) $(EXTRAFLAGS)
217ALL_ASFLAGS = $(MCUFLAGS) -x assembler-with-cpp $(ASFLAGS) $(EXTRAFLAGS) 217ALL_ASFLAGS = $(MCUFLAGS) -x assembler-with-cpp $(ASFLAGS) $(EXTRAFLAGS)
218 218
219define NO_LTO 219define NO_LTO
@@ -306,7 +306,7 @@ ifdef $1_CONFIG
306$1_CONFIG_FLAGS += $$(patsubst %,-include %,$$($1_CONFIG)) 306$1_CONFIG_FLAGS += $$(patsubst %,-include %,$$($1_CONFIG))
307endif 307endif
308$1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) 308$1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS)
309$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) 309$1_CXXFLAGS= $$(ALL_CXXFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS)
310$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) 310$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS)
311 311
312# Compile: create object files from C source files. 312# Compile: create object files from C source files.
@@ -317,16 +317,16 @@ $1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN)
317 @$$(BUILD_CMD) 317 @$$(BUILD_CMD)
318 318
319# Compile: create object files from C++ source files. 319# Compile: create object files from C++ source files.
320$1/%.o : %.cpp $1/%.d $1/cppflags.txt $1/compiler.txt | $(BEGIN) 320$1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN)
321 @mkdir -p $$(@D) 321 @mkdir -p $$(@D)
322 @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD) 322 @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD)
323 $$(eval CMD=$$(CC) -c $$($1_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) 323 $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
324 @$$(BUILD_CMD) 324 @$$(BUILD_CMD)
325 325
326$1/%.o : %.cc $1/%.d $1/cppflags.txt $1/compiler.txt | $(BEGIN) 326$1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN)
327 @mkdir -p $$(@D) 327 @mkdir -p $$(@D)
328 @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD) 328 @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD)
329 $$(eval CMD=$$(CC) -c $$($1_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) 329 $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
330 @$$(BUILD_CMD) 330 @$$(BUILD_CMD)
331 331
332# Assemble: create object files from assembler source files. 332# Assemble: create object files from assembler source files.
@@ -347,8 +347,8 @@ $1/force:
347$1/cflags.txt: $1/force 347$1/cflags.txt: $1/force
348 echo '$$($1_CFLAGS)' | cmp -s - $$@ || echo '$$($1_CFLAGS)' > $$@ 348 echo '$$($1_CFLAGS)' | cmp -s - $$@ || echo '$$($1_CFLAGS)' > $$@
349 349
350$1/cppflags.txt: $1/force 350$1/cxxflags.txt: $1/force
351 echo '$$($1_CPPFLAGS)' | cmp -s - $$@ || echo '$$($1_CPPFLAGS)' > $$@ 351 echo '$$($1_CXXFLAGS)' | cmp -s - $$@ || echo '$$($1_CXXFLAGS)' > $$@
352 352
353$1/asflags.txt: $1/force 353$1/asflags.txt: $1/force
354 echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@ 354 echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@