summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-08-02 12:56:47 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-08-02 12:56:47 +0200
commit0be5b43c75613e803e6cc43dc8fabdcd90e6d166 (patch)
treec939849ed4b28cc9fa8f54098368c564e64316f8 /Makefile
parenta225505ea3fd319db87f0828ead3a653f020c4bf (diff)
build: split CFLAGS_DEF and always add CFLAGS_MIN
Currently, when doing a custom "make CFLAGS=...", we run into a compile error as several necessary defines are not set. Therefore, use override to always set those. Reported-by: Marco Belmonte <mbelmonte@globalmedia.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 61b4412..6966be4 100644
--- a/Makefile
+++ b/Makefile
@@ -81,18 +81,19 @@ CFLAGS_DEF += -fno-strict-aliasing
CFLAGS_DEF += -fasynchronous-unwind-tables
CFLAGS_DEF += -fno-delete-null-pointer-checks
-CFLAGS_DEF += -D_REENTRANT
-CFLAGS_DEF += -D_LARGEFILE_SOURCE
-CFLAGS_DEF += -D_LARGEFILE64_SOURCE
-CFLAGS_DEF += -D_FILE_OFFSET_BITS=64
-CFLAGS_DEF += -DVERSION_STRING=\"$(VERSION_STRING)\"
-CFLAGS_DEF += -DVERSION_LONG=\"$(VERSION_LONG)\"
-CFLAGS_DEF += -DPREFIX_STRING=\"$(PREFIX)\"
+CFLAGS_MIN = -D_REENTRANT
+CFLAGS_MIN += -D_LARGEFILE_SOURCE
+CFLAGS_MIN += -D_LARGEFILE64_SOURCE
+CFLAGS_MIN += -D_FILE_OFFSET_BITS=64
+CFLAGS_MIN += -DVERSION_STRING=\"$(VERSION_STRING)\"
+CFLAGS_MIN += -DVERSION_LONG=\"$(VERSION_LONG)\"
+CFLAGS_MIN += -DPREFIX_STRING=\"$(PREFIX)\"
WFLAGS_DEF = -Wall
CPPFLAGS ?=
-CFLAGS ?= $(CFLAGS_DEF) $(WFLAGS_DEF) $(CPPFLAGS) -I.
+CFLAGS ?= $(CFLAGS_DEF) $(WFLAGS_DEF) $(CPPFLAGS)
+override CFLAGS += $(CFLAGS_MIN) -I.
LEX_FLAGS =
YAAC_FLAGS =