makefile
1 .PHONY
.PHONY:clean #定义伪目标
rm 1.txt
2. 条件分支ifeq
ifeq ($(CC),gcc)
$(CC) -o foo $(objects) $(libs_for_gcc)
else
$(CC) -o foo $(objects) $(normal_libs)
endif
3 ifneq
4 ifdef <variable-name>; #variable-name非空,执行
5 ifndef
6 赋值= := ?= +=
https://blog.csdn.net/more_thinking/article/details/119521669
7 $(filter PATTERN…,TEXT) $(filter-out PATTERN…,TEXT)
8 $(ad dprefix src/,foo bar) 返回值为“src/foo src/bar”。