2013-05-09 14:22:58 +02:00
|
|
|
Makefile: append the CFLAGS to existing ones
|
|
|
|
|
|
|
|
Allow the user to pass custom CFLAGS (eg. optimisation flags).
|
|
|
|
|
|
|
|
Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout)
|
|
|
|
|
|
|
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
|
|
Cc: Arnout Vandecappelle <arnout@mind.be>
|
|
|
|
|
|
|
|
---
|
|
|
|
Patch not sent upstream.
|
|
|
|
|
|
|
|
Although not specific to buildroot, I am not sure this is the best
|
|
|
|
way to handle user-supplied CFLAGS.
|
|
|
|
|
2014-04-28 12:53:56 +02:00
|
|
|
diff --git a/Makefile b/Makefile
|
|
|
|
index 962f94eba661..bf6b317158cf 100644
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -16,9 +16,10 @@ LOCAL_VERSION =
|
|
|
|
CONFIG_LOCALVERSION =
|
|
|
|
|
2013-05-09 14:22:58 +02:00
|
|
|
CPPFLAGS = -I libfdt -I .
|
2014-04-28 12:53:56 +02:00
|
|
|
-WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
|
|
|
|
+WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
|
2015-01-13 20:40:03 +01:00
|
|
|
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
|
2013-05-09 14:22:58 +02:00
|
|
|
-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
|
|
|
|
+CFLAGS ?= -g -Os
|
|
|
|
+CFLAGS += -fPIC $(WARNINGS)
|
|
|
|
|
|
|
|
BISON = bison
|
|
|
|
LEX = flex
|