diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2024-03-08 15:05:35 +0000 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2024-03-09 01:40:24 +0000 |
commit | a171b399220b69d4b526769481a089a117265902 (patch) | |
tree | 733779d05d1a8d3b17ad44cb3a111872818a0b93 /auto | |
parent | f55fa70c6935f0fa0ab5964830de83ae44006edb (diff) | |
download | unit-a171b399220b69d4b526769481a089a117265902.tar.gz unit-a171b399220b69d4b526769481a089a117265902.tar.bz2 |
Add an EXTRA_CFLAGS make variable
This variable is _appended_ to the main CFLAGS variable and allows
setting extra compiler options at make time. E.g
$ make EXTRA_CFLAGS="..." ...
Useful for quickly testing various extra warning flags.
Suggested-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'auto')
-rw-r--r-- | auto/make | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -20,7 +20,8 @@ PP_SED := @echo ' SED ' CC = $CC AR = $AR -CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS +EXTRA_CFLAGS = +CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS \$(EXTRA_CFLAGS) NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT @@ -548,6 +549,8 @@ help: @echo " make D=1 ... - Enables debug builds (-O0)" @echo " make E=0 ... - Disables -Werror" @echo + @echo " make EXTRA_CFLAGS= ... - Add extra compiler options" + @echo @echo " Variables can be combined." END |