1. $(addprefix pathhead, path) 其中path是以空格分隔的路径串。例如path = path1 path2 ...
eg: HEAD_PATH = ./ ./include
INCLUDE = $(addprefix -I, $(HEAD_PATH ))
INCLUDE = -I./ -I./include
2. $(wildcard path/*.c) 路径path下所有的c文件。
3. $(foreach param, param1, cmd) - 依次 从param1中取出以空格分隔的参数赋给param, cmd以参数param为参数执行。
eg:
SRCPATH = path1/ path2/ path3/
SRC = $(foreach dir, $(SRCPATH), $(wildcard $(dir)*.c))
4. $(call function param1, param2, param3, ...)
调用函数 function , 其中param1, param2, param3, ..., 分别对应的function 参数$(1), $(2), $(3), ...
阅读(1126) | 评论(0) | 转发(0) |