2 ms·
In GNU make, you can use Target-specific Variable Values (https://www.gnu.org/software/make/manual/make.html#Target_002dspecific https://www.gnu.org/software/ma
by Someone 4y ago
In GNU make, you can use Target-specific Variable Values (https://www.gnu.org/software/make/manual/make.html#Target_002dspecific https://www.gnu.org/software/make/manual/make.html#Target_00...)
You can also do
DEBUG ?= 1
ifeq ($(DEBUG), 1)
CFLAGS =<whatever you want>
else
CFLAGS=<whatever you want>
endif
and then build with
make DEBUG=0
for the release build.
In BSD make, you can use something like
.ifmake target
CFLAGS := <whatever you want>
.else
CFLAGS := <whatever you want>
.endif