Conditional Compiling

cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Compiling

3,775 Views
timotay01
Contributor I
Is there a way to setup a conditional compile for the entire project typically done in a make file with -D ?
 
Labels (1)
0 Kudos
4 Replies

187 Views
CrasyCat
Specialist III
Hello
 
Which processor are you targeting (HC08, HC12, ...)?
Are you planning to build from the IDE or from a make file?
 
CrasyCat
0 Kudos

187 Views
timotay01
Contributor I
Sorry, build from IDE, and part is CF5208
0 Kudos

187 Views
CrasyCat
Specialist III

If you are using CodeWarrior for Coldfire V6.x you can just add the #define corresponding to the macro you want to define in the target settings "C/C++ Preprocessor Panel".

This panel can be found in the target setting dialog. Press ALT + F7 to open the dialog.

If you are using an older version of the tools, you have to go through a prefix file.
A prefix file is a header file which is included in each ANSI C source file.

Macros are defined there using #define and you specify the name of your prefix file in the target "C/C++ Language Panel".

I hope this helps.

CrasyCat

0 Kudos

187 Views
timotay01
Contributor I
Yes that was what I was looking for thanks.
0 Kudos