Makefile: add debug flag

Debug flag is set for CFLAGS and LDFLAGS if make is invoked with the
DEBUG flag set to TRUE (make DEBUG=TRUE).

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
This commit is contained in:
Erik Schmauss 2019-08-12 11:28:50 -07:00
parent 361d88d1dd
commit a7a2de9b80
1 changed files with 8 additions and 0 deletions

View File

@ -147,6 +147,14 @@ ACPICA_HEADERS = \
#
OPT_CFLAGS ?= $(CWARNINGFLAGS)
#
# Debug flags
#
ifeq ($(DEBUG),TRUE)
CFLAGS +=-g
LDFLAGS +=-g
endif
#
# Common compiler flags
# The _GNU_SOURCE symbol is required for many hosts.