- 在makefile里面写rule的时候,在rule的前面可以加不同的修饰符让make对于该rule有不同的操作,具体是:
@ : do not echo the command
- : the error in the command should be ignored by make.
+ : execute the command even if the --just-print(-n) option is given. - 如果想要在一次编译里面尽量多的执行命令而不会因为某些错误而退出,可以使用--keep-going(-k) option.
- 在编译C/C++程序的时候的一个默认变量:
For C:
CC : program compiling C program, default is cc.
CPP : C program preprocessor. default is $(CC) -E
CFLAGS : extra flags given to CC.
CXXFLAGS : extra flags given to CXX
LDFLAGS : extra flags given to the linker
For C++:
CXX : C++ compiler, default is g++.
CPPFLAGS : extra flags given to CXX.
RM : command to remove a file, default is rm -f.
gmake使用笔记
最新推荐文章于 2022-02-22 14:50:33 发布