Conditional Compiling

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Conditional Compiling

4,439 次查看
timotay01
Contributor I
Is there a way to setup a conditional compile for the entire project typically done in a make file with -D ?
 
标签 (1)
标记 (1)
0 项奖励
回复
4 回复数

851 次查看
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 项奖励
回复

851 次查看
timotay01
Contributor I
Sorry, build from IDE, and part is CF5208
0 项奖励
回复

851 次查看
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 项奖励
回复

851 次查看
timotay01
Contributor I
Yes that was what I was looking for thanks.
0 项奖励
回复