openrc/mk/debug.mk

17 lines
600 B
Makefile
Raw Normal View History

2008-03-24 17:22:01 +05:30
# rules to enable debugging support
2009-05-01 19:41:40 +05:30
# Copyright (c) 2008 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
2008-03-24 17:22:01 +05:30
_RC_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-DRC_DEBUG";; esac
_RC_DEBUG:= $(shell ${_RC_DEBUG_SH})
CPPFLAGS+= ${_RC_DEBUG}
2008-03-24 17:22:01 +05:30
# 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:= $(shell ${_LD_DEBUG_SH})
LDFLAGS+= ${_LD_DEBUG}
2008-03-24 17:22:01 +05:30
_GGDB_SH= case "${DEBUG}" in "") echo "";; *) echo "-ggdb";; esac
_GGDB:= $(shell ${_GGDB_SH})
CFLAGS+= ${_GGDB}