比如你可以将你想定义的“宏”放在makefile.include中,然后将其赋值,而在makefile中加入include makefile.include一行,在其后需要进行条件预编译时进行字符串比较来实现啊!
for example:debug := 1
ifdef debug
CFLAGS += -g
else
CFLAGS += -O2
endif
欢迎分享,转载请注明来源:内存溢出
比如你可以将你想定义的“宏”放在makefile.include中,然后将其赋值,而在makefile中加入include makefile.include一行,在其后需要进行条件预编译时进行字符串比较来实现啊!
for example:debug := 1
ifdef debug
CFLAGS += -g
else
CFLAGS += -O2
endif
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)