handle make DEBUG=1
This commit is contained in:
parent
05e27a7cab
commit
0ce0c0d9d0
1 changed files with 7 additions and 2 deletions
9
Makefile
9
Makefile
|
@ -2,8 +2,13 @@ CC = gcc
|
|||
CFILES = toml.c
|
||||
|
||||
CFLAGS = -std=c99 -Wall -Wextra
|
||||
CFLAGS += -O2 -DNDEBUG
|
||||
#CFLAGS += -O0 -g
|
||||
# to compile for debug: make DEBUG=1
|
||||
# to compile for no debug: make
|
||||
ifdef DEBUG
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
CFLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
EXEC = toml_json toml_cat
|
||||
|
||||
|
|
Loading…
Reference in a new issue