From 639651630cd8dbab7b757afdea845eb66b99c564 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 10 Mar 2015 20:57:39 +0100 Subject: [PATCH] Always use OMK_*FLAGS instead of *FLAGS 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 | 2 +- snippets/linux.omk | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/snippets/base.omk b/snippets/base.omk index b6708d4..d43428f 100644 --- a/snippets/base.omk +++ b/snippets/base.omk @@ -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 -# (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@ diff --git a/snippets/linux.omk b/snippets/linux.omk index 8cacab6..4b6271e 100644 --- a/snippets/linux.omk +++ b/snippets/linux.omk @@ -55,13 +55,13 @@ export BUILD_OS 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. -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) -- 2.39.2