diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-03 14:20:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-03 14:20:45 -0700 |
commit | c595d3043110cf1820d22e17454e4cf787562894 (patch) | |
tree | 0fb8d841906158b03191f30727d0c929e7263c15 /configure | |
parent | caac8c95a04f3cf83eb81510680833e2c6cf26d5 (diff) | |
download | txr-c595d3043110cf1820d22e17454e4cf787562894.tar.gz txr-c595d3043110cf1820d22e17454e4cf787562894.tar.bz2 txr-c595d3043110cf1820d22e17454e4cf787562894.zip |
Define TXR_DBG macro when compiling debug build.
* Makefile (dbg/%.o): Pass $(DBG_ONLY_FLAGS) to COMPILE_C_WITH_DEPS
recipe macro.
* configure (debug_only_flags): New macro.
(gen_config_make): Generate DBG_ONLY_FLAGS.
Add debug-only-flags to usage help text.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -99,6 +99,7 @@ opt_flags=-O2 lang_flags='-ansi -D_XOPEN_SOURCE=600' diag_flags='-Wall -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=strict-prototypes' debug_flags=-g +debug_only_flags=-DTXR_DEBUG debug_also= inline= platform_cflags= @@ -356,7 +357,13 @@ diag-flags [$diag_flags] debug-flags [$debug_flags] Specifies flags for requesting that debugging information be - retained in the compile and link. + retained in the compile and link. These flags are applied + to optimized and debugging targets. + +debug-only-flags [$debug_only_flags] + + Specifies compiler flags which only apply to debugging + targets. debug-also [$debug_also] @@ -661,6 +668,7 @@ OPT_FLAGS := $opt_flags LANG_FLAGS := $lang_flags DIAG_FLAGS := $diag_flags DBG_FLAGS := $debug_flags +DBG_ONLY_FLAGS := $debug_only_flags BUILD_TARGETS := $(if [ $debug_also ] ; then echo '$(PROG) $(PROG)-dbg' else |