wildcard :扩展通配符notdir :删除路径patsubst :通配符Makefile 经常使用的代码案例,用来生成编译的target文件
#当前目录和子目录下的所有c文件src=$(wildcard*.c./subdir/*.c )删除路径dir=$(notdir$(src ) )替换后缀. c=.
//makefilecross=cc=$(cross ) gcc cxx=$ (cross ) gdebug=-g-O2cflags=$ ) debug(-wall-cRM=RM-RFSRCS=$ )
#其中,三级子目录$ (dirs :=$ (shell find.- max depth3- typed ) files=$(foreachdir,$ ) dirs ), $(wildcard$(dir )/* . c ) )检索目录并删除yxdbg目录(无调试) exclude _ dirs :=yxdbgdirs :=$ ) shell find.- max depth1- typ th dirs :