17 lines
503 B
Bash
17 lines
503 B
Bash
|
|
|
||
|
|
ifdef OPTIMIZE
|
||
|
|
# Performance build: make OPTIMIZE=1
|
||
|
|
# `override` so a command-line `make OPTIMIZE=1` is remapped to -O3 too;
|
||
|
|
# without it, a command-line assignment wins over this `:=` and the literal
|
||
|
|
# `1` leaks into CXXFLAGS (g++ then treats `1` as an input file).
|
||
|
|
override OPTIMIZE := -O3
|
||
|
|
SANITIZE :=
|
||
|
|
else ifdef NOPYTHON
|
||
|
|
OPTIMIZE := -O0 -g -DNOPYTHON
|
||
|
|
SANITIZE :=
|
||
|
|
else
|
||
|
|
# Debug build (default): includes AddressSanitizer
|
||
|
|
OPTIMIZE := -O0 -g
|
||
|
|
SANITIZE := -fsanitize=address -fno-omit-frame-pointer
|
||
|
|
endif
|