summaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-05-24 14:21:52 +0900
committertmk <nobody@nowhere>2012-05-24 14:21:52 +0900
commit660ea5a2cd6aaf26eb584ae6cfbf777bdf62f0b2 (patch)
tree8544b39b00bb7b7706b2548a86ac27ee39b14193 /rules.mk
parentf4bff66e9124fae26129e294c525ec6ce3cea4ef (diff)
parent805ce3c1309421df6166b085b70f53c494f9946b (diff)
Merge branch 'm0110a'
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/rules.mk b/rules.mk
index 3d32adc5f3..9143f9bcff 100644
--- a/rules.mk
+++ b/rules.mk
@@ -230,6 +230,8 @@ LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
#LDFLAGS += -T linker_script.x
+# You can give EXTRALDFLAGS at 'make' command line.
+LDFLAGS += $(EXTRALDFLAGS)
@@ -315,9 +317,10 @@ GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
# Combine all necessary flags and optional flags.
# Add target processor to flags.
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
+# You can give extra flags at 'make' command line like: make EXTRAFLAGS=-DFOO=bar
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS) $(EXTRAFLAGS)
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) $(EXTRAFLAGS)
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) $(EXTRAFLAGS)