I’m using Eclipse CDT on Linux to build a c++ executable and several static libraries which the executable depends on.
Everything is good – Eclipse generates the makefiles for both Debug and Release as expected.
However, I want to compile this code also on a computer without Eclipse installed, so I thought to write a simple makefile which calls the Eclipse makefile.
So I started with something like:
all:
cd Lib1/Release && make all
cd Lib2/Release && make all
...
cd Exec/Release && make all
This works for Release only, as you see…
How can I change the makefile so I can use the selected user’s configuration ?
Thank you very much.
With this in your makefile you can invoke ‘make debug’ or ‘make release’ to build all the projects in the required mode :