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
This is a discussion on Help me with some simple makefile scripting within the Tech Board forums, part of the Community Boards category; I wan't to make the makefile in such a way that if I invoke the make command with an extra ...
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
Manasij Mukherjee | gcc-4.8.0 @Arch Linux
Slow and Steady wins the race... if and only if :
1.None of the other participants are fast and steady.
2.The fast and unsteady suddenly falls asleep while running !
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
Manasij Mukherjee | gcc-4.8.0 @Arch Linux
Slow and Steady wins the race... if and only if :
1.None of the other participants are fast and steady.
2.The fast and unsteady suddenly falls asleep while running !