From 64332a367555b501a46031403cefeb3ea3a01414 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 24 Mar 2008 11:52:01 +0000 Subject: Add debug.mk --- mk/debug.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mk/debug.mk (limited to 'mk') 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 + +_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}) -- cgit v1.2.3