标签: c makefile command-line macros environment-variables
是否可以用命令行参数(例如 #define VAL 1)替换宏(例如 VAL=1 make)?这是我的方法,我没有弄清楚如何更改make文件。我试图在 Makefile 的 .all 中添加额外的行,但没有任何效果。那么如何从命令行添加宏/环境?
#define VAL 1
VAL=1 make
.all