Conditional compilation for object files in Makefile?
Hi,
I have a Makefile like this:
http://graphics.csie.ntu.edu.tw/~jon.../Makefile.html
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!