Conditional compilation for object files in Makefile?
I have a Makefile like this:
When I type "make", it compile each object files correctly and link to a binary file.
However, how can I type "make debug"
and the Makefile compile with a "-g" option automatically
and compile with "-O2" when I "make optimize"?
Simply duplicate the code for object files with different options seems doesn't work...
No matter what the target is, only one copy of the rules will be apply.
Thanks in advance!