I recently switched from using Makefiles to using Automake, and I can't figure out how to write the following simple if statement using automake:
DEBUG ?= 1
ifeq (${DEBUG},1)
CXXFLAGS:=$(CXXFLAGS) -g
else
CXXFLAGS:=$(CXXFLAGS) -O3 -DNDEBUG
endif
Is this even possible to do if I'm using automake? Since it generates the makefile from automatically, does it make sense writing it in the Makefile template? Or should I try to find some way of adding it the automatically generated Makefile?