diff options
author | Roy Marples <roy@marples.name> | 2008-03-24 11:52:01 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-03-24 11:52:01 +0000 |
commit | 64332a367555b501a46031403cefeb3ea3a01414 (patch) | |
tree | 5c4197c8f3bd5b27b5dcd84848ab986bed759981 /mk/debug.mk | |
parent | 821166fbfd4bd81716fc0b5f87259bf6caf7b7b1 (diff) |
Add debug.mk
Diffstat (limited to 'mk/debug.mk')
-rw-r--r-- | mk/debug.mk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mk/debug.mk b/mk/debug.mk new file mode 100644 index 00000000..b1e68a85 --- /dev/null +++ b/mk/debug.mk @@ -0,0 +1,15 @@ +# rules to enable debugging support +# Copyright 2008 Roy Marples <roy@marples.name> + +_RC_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-DRC_DEBUG";; esac +_RC_DEBUG!= ${_RC_DEBUG_SH} +CFLAGS+= ${_RC_DEBUG}$(shell ${_RC_DEBUG_SH}) + +# Should we enable this with a different flag? +_LD_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-Wl,--rpath=../librc -Wl,--rpath=../libeinfo";; esac +_LD_DEBUG!= ${_LD_DEBUG_SH} +LDFLAGS+= ${_LD_DEBUG}$(shell ${_LD_DEBUG_SH}) + +_GGDB_SH= case "${DEBUG}" in "") echo "";; *) echo "-ggdb";; esac +_GGDB!= ${_GGDB_SH} +CFLAGS+= ${_GGDB}$(shell ${_GGDB_SH}) |