I wan't to make the makefile in such a way that if I invoke the make command with an extra flag... say (-g) , it will be somewhat like
I don't know how to correlate it.Code:#ifdef g gdb main #else ./main #endif
I wan't to make the makefile in such a way that if I invoke the make command with an extra flag... say (-g) , it will be somewhat like
I don't know how to correlate it.Code:#ifdef g gdb main #else ./main #endif
You can't provide your own flags to make. Maybe there are some user definable flags, but I doubt it.
Why don't you just use different targets for this purpose?
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge