views:

25

answers:

0

Hello, I am working on a project using Eclipse/CDT on Win-XP using non-managed make.
The project has different variants which are created by changing some preprocessor directives (_DEBUG_, _PROD_).

The problem is that for _DEBUG_, we use object files in the makefile that needs to be turned off for _PROD_.
Right now, we have two entry point in the makefile:

  • all,
  • debug1.

By calling debug1, we actually include the library that are needed when the _DEBUG_ flag is activated.

My question is:
Is there an elegant way to have conditional inclusion of the objects files in a makefile which would get the information from a C header file containing the _DEBUG_ macro for instance?
Or is there a way to define a Symbol in Eclipse CDT that gets pushed to the makefile through some Build Variable?