mta*_*med 10 c gcc makefile c-preprocessor
通过将代码块放在预处理器指令中,我有许多.c
和.h
文件禁用了代码的某些部分,例如
#ifdef FOOBAR
// some code that can be compiled if needed by defining FOOBAR in pre-processor.
#endif
Run Code Online (Sandbox Code Playgroud)
不,我需要FOOBAR
定义为gcc使用的每个文件定义的make
.
有没有办法做一些选项来做或Makefile
?
谢谢.
Jen*_*edt 16
将编译器选项添加-DFOOBAR
到make变量CFLAGS
归档时间: |
|
查看次数: |
11554 次 |
最近记录: |