如题:
In particular, the macro CC is the C compiler to use, and CFLAGS is the list of flags to pass to the compilation command.
验证如下,Makefile原有内容
CC=gcc
CFLAGS=-I.
hellomake: hellomake.o hellofunc.o
$(CC) -o hellomake hellomake.o hellofunc.o $(CFLAGS)
改为:
AA=gcc
BB=-I.
hellomake: hellomake.o hellofunc.o
$(AA) -o hellomake hellomake.o hellofunc.o $(BB)
再执行make命令,毫无问题。
本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/07/11/2586110.html,如需转载请自行联系原作者