feat: keep compiler optimizations and remove debug symbols when not in debug mode
This commit is contained in:
parent
9c586b1fba
commit
d3b39be57c
6
Makefile
6
Makefile
@ -32,14 +32,16 @@ check_targets=$(addprefix check_,${bins})
|
||||
src_dirs=$(sort $(dir $(wildcard ${src_dir}/**/)))
|
||||
includes=$(patsubst %,-I%,${src_dirs})
|
||||
|
||||
CFLAGS+=-g -O0 ${includes} -fPIC
|
||||
CFLAGS+=${includes} -fPIC
|
||||
LDFLAGS+=
|
||||
ifdef USE_PTHREAD
|
||||
LDFLAGS+=-lpthread
|
||||
CFLAGS+=-DUSE_PTHREAD
|
||||
endif
|
||||
ifndef USE_DEBUG
|
||||
CFLAGS+=-DNDEBUG -DNTRACE
|
||||
CFLAGS+=-g -O0 -DNDEBUG -DNTRACE
|
||||
else
|
||||
CFLAGS+=-03
|
||||
endif
|
||||
|
||||
# Tests if the last compilation was with pthread
|
||||
|
Loading…
x
Reference in New Issue
Block a user