Hey,
I don't want to say that the following solution is the ultimate common practice, but it might serve as the basis for some discussion about what is good style and what is bad style ;-)
Assuming the use of GNU make:
Code:
CFLAGS = some_options
release: build
build:
@echo $(CFLAGS)
debug: override CFLAGS += some_debugging_opts
debug: build
Just FYI, the variable CFLAGS should be used, because this then simplifies the handling of implicit actions like for example:
main: main.o file.o
- Andi -