I want to have debugging option. Even while linking I have given -g option but I am not getting line numbers. What should I do? Is it given compilation time of linking time?
If to be given at compilation time. I have to explicitely write
g++ -g -c <files>
You could add -g as an option at the top of the makefile and insert the options into each of your g++ calls...just do some searches online for examples.
What I meant was. The way I have written the makefile right now is that I don't need to explicitely write the command(g++ -c <file>) for generating object files. But If I require debugging option. I have to write the command explicitely.
Is there any way to use this shorthand notation and still have debugging option?