Code::Blocks Forums
User forums => Help => Topic started by: Miq on May 23, 2007, 11:08:41 am
-
I am currently trying to migrate a slightly tricky Makefile into C::B. One "feature" therein is the generation of two different executables from the same sources, with only preprocessor defines changed (oh, code is in C, by the way). So if a source file is changed, two different object files have to be generated and linked against the two respective executables. The Makefile solves this task by forcing the file compile into two differently named object files, and linking the correct ones into the executables.
How do I do this in C::B?
-
How do I do this in C::B?
- don't use your Makefile ;-)
- create a project
- create two targets (for each executable, different executable name, different object path)
- add all source files to both targets
- setup in the project options the common (same) compiler/linker options
- setup in the target options the different compiler/linker options (in your case: the define)
With regards, Morten.
-
...
- create two targets (for each executable, different executable name, different object path)
...
That was the bit missing - thank you! :D