makefile中宏定义

在Makefile中我们可以通过宏定义来控制源程序的编译。

只要在Makefile中的CFLAGS中通过选项-D来指定你于定义的宏即可。

:

CFLAGS += -D __KK__

相当于#define __KK__

CFLAGS += -D __KK__=__XX__

相当于 #define __KK__=__XX__

中间也可无空格如:

-DPOSGP730等价于#define POSGP730

原文

http://zhidao.baidu.com/question/269306004.html

http://hi.baidu.com/abcdxyzk/item/213ef12c9e326d152b0f1c20

相关文章:

  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案