mirror of
https://git.freebsd.org/ports.git
synced 2025-05-04 23:47:37 -04:00
Make the definition of WITH_ variable (end user actionable) a define via a generic code Move the WITH_DEBUG code into its own file Features/debug.mk Replace USE_LTO into WITH_LTO and move it into Features/lto.mk Move WITH_SSP into its own Features/ssp.mk Add a variable to defined which one are activated by default (here SSP) Reviewed by: portmgr (tcberner) Differential Revision: https://reviews.freebsd.org/D35873
24 lines
784 B
Makefile
24 lines
784 B
Makefile
# DEBUG Support
|
|
#
|
|
# Add WITH_DEBUG into make.conf:
|
|
# - If set, debugging flags are added to CFLAGS and the binaries don't get
|
|
# stripped by INSTALL_PROGRAM or INSTALL_LIB. Besides, individual ports might
|
|
# add their specific to produce binaries for debugging purposes. You can
|
|
# override the debug flags that are passed to the compiler by setting
|
|
# DEBUG_FLAGS. It is set to "-g" at default.
|
|
|
|
.if !defined(_DEBUG_MK_INCLUDED)
|
|
_DEBUG_MK_INCLUDED= yes
|
|
DEBUG_Include_MAINTAINER= portmgr@FreeBSD.org
|
|
|
|
. if !defined(INSTALL_STRIPPED)
|
|
STRIP= #none
|
|
MAKE_ENV+= DONTSTRIP=yes
|
|
STRIP_CMD= ${TRUE}
|
|
. endif
|
|
DEBUG_FLAGS?= -g
|
|
CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS}
|
|
. if defined(INSTALL_TARGET)
|
|
INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g}
|
|
. endif
|
|
.endif
|