For example: my project has Debug and Release targets, so it has Debug.mak and Release.mak. When I’m working with a debug target I add some files and debug.mak will be updated automaticly, but when I switch to release – release.mak doesn’t have those files. So I need to delete and add at least on file to the project to update my release.mak. Is there any other way to do that?
wait, did I understand you write?.. You mean that VisualGDB does all this things automaticly, but I can’t push it to remake make-file?
And I have to add all my source files manualy?
VisualGDB automatically updates the list of all sources in Makefile, however it does not support excluding files for separate configurations yet. You won’t need to add all source files manually, you will only need to specify the files you want to exclude.
My question was that make file doesn’t refresh for all configurations (Debug/Release).
So, for example, right now I’m working with Debug target, i’m adding one C-file, it works, it compiles. it’s good. But, now i’m switching target to Release, trying to build project and it doesn’t work, becase release.mak doesn’t have information about that new C-file.
VisualGDB stores the list of source files in the Makefile itself that is shared between configurations. Configuration-specific flags are stored in .mak files that are not affected by adding/removing source files.