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}/**/)))
|
src_dirs=$(sort $(dir $(wildcard ${src_dir}/**/)))
|
||||||
includes=$(patsubst %,-I%,${src_dirs})
|
includes=$(patsubst %,-I%,${src_dirs})
|
||||||
|
|
||||||
CFLAGS+=-g -O0 ${includes} -fPIC
|
CFLAGS+=${includes} -fPIC
|
||||||
LDFLAGS+=
|
LDFLAGS+=
|
||||||
ifdef USE_PTHREAD
|
ifdef USE_PTHREAD
|
||||||
LDFLAGS+=-lpthread
|
LDFLAGS+=-lpthread
|
||||||
CFLAGS+=-DUSE_PTHREAD
|
CFLAGS+=-DUSE_PTHREAD
|
||||||
endif
|
endif
|
||||||
ifndef USE_DEBUG
|
ifndef USE_DEBUG
|
||||||
CFLAGS+=-DNDEBUG -DNTRACE
|
CFLAGS+=-g -O0 -DNDEBUG -DNTRACE
|
||||||
|
else
|
||||||
|
CFLAGS+=-03
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Tests if the last compilation was with pthread
|
# Tests if the last compilation was with pthread
|
||||||
|
Loading…
x
Reference in New Issue
Block a user