From 0be5b43c75613e803e6cc43dc8fabdcd90e6d166 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Fri, 2 Aug 2013 12:56:47 +0200 Subject: 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 Signed-off-by: Daniel Borkmann --- Makefile | 17 +++++++++-------- 1 file 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 = -- cgit v1.2.3-54-g00ecf