[Olsr-dev] [PATCH v1 02/14] make: need to load the OS specific makefile before evaluating WARNINGS

Ferry Huberts (spam-protected)
Wed Feb 24 00:46:11 CET 2016


From: Ferry Huberts <(spam-protected)>

Otherwise the compiler flag detection will not use the correct CC

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 Makefile.inc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 64264d7..9d8c5aa 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -87,6 +87,14 @@ ifneq ($(TOPDIR),.)
 CPPFLAGS +=	-I$(TOPDIR)/src
 endif
 
+ifeq ($(OS),UNKNOWN)
+all: help
+else
+# include OS specifics
+all: default_target
+include $(TOPDIR)/make/Makefile.$(OS)
+endif
+
 # add gcc warnings and optimizations if CFLAGS not set
 ifndef CFLAGS
 ifndef WARNINGS
@@ -239,14 +247,6 @@ CPPFLAGS +=     -DUSE_FPM
 SRCS +=		$(wildcard src/common/*.c src/*.c *.c)
 HDRS +=		$(wildcard src/common/*.h src/*.h *.h)
 
-ifeq ($(OS),UNKNOWN)
-all: help
-else
-# include OS specifics
-all: default_target
-include $(TOPDIR)/make/Makefile.$(OS)
-endif
-
 # one object for each source file
 OBJS +=		$(SRCS:%.c=%.o)
 
-- 
2.5.0




More information about the Olsr-dev mailing list