diff options
author | Luis Machado <luis.machado@linaro.org> | 2019-01-11 15:52:52 -0200 |
---|---|---|
committer | Lisa Nguyen <lisa.nguyen@linaro.org> | 2019-01-13 15:55:25 -0800 |
commit | f7ad37fe3c438c56caf4317178e44d18488dcc2b (patch) | |
tree | 3c320aa2c82f9522e3a255cc463e739aee6e5a48 | |
parent | afefb46f752fda5fdd62b12144e320736a907e7b (diff) |
Adjust compiler flag variables
In order to pass additional compiler flags while still keeping the required
flags intact (-pthread for example), we add a local set of flags on top of the
exsiting CFLAGS.
2019-01-11 Luis Machado <luis.machado@linaro.org>
* Test.mk (CFLAGS): Set to "-g -Wall"
(FLAGS): New variable. Set to -pthread.
Document variables.
($(EXEC): Use FLAGS.
Signed-off-by: Luis Machado <luis.machado@linaro.org>
-rw-r--r-- | Test.mk | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -24,7 +24,14 @@ SNT=$(wildcard *sanity.sh) TST=$(sort $(wildcard *[!{sanity}].sh)) LOG=$(TST:.sh=.log) -CFLAGS?=-g -Wall -pthread + +# Default flags passed to the compiler. +CFLAGS?=-g -Wall + +# Required compiler flags to build the utils. +FLAGS?=-pthread + +# Default compiler to build the utils. CC?=gcc # All utils' source files. @@ -58,7 +65,7 @@ endif # Target for building all the utils we need, from sources. $(EXEC): $(SRC) - $(CC) $(CFLAGS) $@.c -o $@ + $(CC) $(CFLAGS) $(FLAGS) $@.c -o $@ clean: rm -f *.o $(EXEC) |