makefile.unix: add DEBUG flag for compiling w/ debug-symbol

usage example: make -f makefile.unix DEBUG=

Change-Id: I5aefe026a3364e5db5e0220b9fa506687cb98a8d
This commit is contained in:
Pascal Massimino 2018-04-11 13:45:53 +02:00
parent 99be34b3a8
commit e577feb7c2

View File

@ -112,7 +112,12 @@ endif
AR = ar AR = ar
ARFLAGS = r ARFLAGS = r
CPPFLAGS = -I. -Isrc/ -Wall CPPFLAGS = -I. -Isrc/ -Wall
CFLAGS = -O3 -DNDEBUG $(EXTRA_FLAGS) ifeq ($(DEBUG), 1)
CFLAGS = -g
else
CFLAGS = -O3 -DNDEBUG
endif
CFLAGS += $(EXTRA_FLAGS)
CC = gcc CC = gcc
INSTALL = install INSTALL = install
GROFF = /usr/bin/groff GROFF = /usr/bin/groff