是否可以在 makefile 中定义 C 宏? [英] Is it possible to define a C macro in a makefile?
本文介绍了是否可以在 makefile 中定义 C 宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以将#define VAR
(在C程序中)的等价物放入makefile中,以便可以控制应该编译程序的哪一部分?
Is it possible to put the equivalent of #define VAR
(in a C program) into a makefile, so that one can control which part of the program should be compiled?
推荐答案
根据 linux
-D name=definition
The contents of definition are tokenized and processed as if they appeared during translation phase three in a #define directive. In
particular, the definition will be truncated by embedded newline characters.
这篇关于是否可以在 makefile 中定义 C 宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文