]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Always use OMK_*FLAGS instead of *FLAGS
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 10 Mar 2015 19:57:39 +0000 (20:57 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 10 Mar 2015 20:34:08 +0000 (21:34 +0100)
We want to stick with the semantics defined by automake. In it *FLAGS are
user variables that should allow the user to override anything. Therefore,
we should not modify them in Makefile.rules at all.

The problem with the previous code was the following:
If config.target defined OMK_CFLAGS=-O0, then Makefile.rules defined
CFLAGS=-Wall -O2 and -O2 overrode the -O0.

This also fixes the test added in the previous commit.

snippets/base.omk
snippets/linux.omk

index b6708d4664646d5e58c56c0f5efb063344c66b62..d43428f90dbb664a849bee04682f9702e8205025 100644 (file)
@@ -1,7 +1,7 @@
 #  Makefile.rules - OCERA make framework common project rules -*- makefile-gmake -*-
 #
 #  (C) Copyright 2003, 2006, 2007, 2008, 2009  by Pavel Pisa - OCERA team member
 #  Makefile.rules - OCERA make framework common project rules -*- makefile-gmake -*-
 #
 #  (C) Copyright 2003, 2006, 2007, 2008, 2009  by Pavel Pisa - OCERA team member
-#  (C) Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013 by Michal Sojka - Czech Technical University, FEE, DCE
+#  (C) Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2015 by Michal Sojka - Czech Technical University, FEE, DCE
 #
 #  Homepage: http://rtime.felk.cvut.cz/omk/
 #  Version:  @git-describe@
 #
 #  Homepage: http://rtime.felk.cvut.cz/omk/
 #  Version:  @git-describe@
index 8cacab6497fb6061d0a796947b0f54f311b2d68b..4b6271e52e2152d83572415b255b3823ab84ab95 100644 (file)
@@ -55,13 +55,13 @@ export BUILD_OS
 
 LOCAL_BUILD_DIR  = $(USER_OBJS_DIR)
 
 
 LOCAL_BUILD_DIR  = $(USER_OBJS_DIR)
 
-# Assign default values to CFLAGS variable. If the variable is defined
+# Assign default values to OMK_CFLAGS variable. If the variable is defined
 # earlier (i.g. in config.omk), it is not overriden here.
 # earlier (i.g. in config.omk), it is not overriden here.
-CFLAGS ?= -O2 -Wall
-CXXFLAGS ?= -O2 -Wall
+OMK_CFLAGS ?= -O2 -Wall
+OMK_CXXFLAGS ?= -O2 -Wall
 
 
 
 
-CPPFLAGS  += -I $(USER_INCLUDE_DIR)
+INCLUDES  += -I $(USER_INCLUDE_DIR)
 
 LOADLIBES += -L$(USER_LIB_DIR) 
 
 
 LOADLIBES += -L$(USER_LIB_DIR)