patsubst %.c,%.o,$(wildcard *.c)
该命令将当前目录下所有的.c文件替换为.o文件。
patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(wildcard *.c *.cpp)))
该命令先将.c文件替换为.o文件,然后再将.cpp文件替换为.o文件。
patsubst %.c,%.o,$(shell ls *.c)
该命令先使用shell命令获取当前目录下所有的.c文件,然后将其替换为.o文件。
patsubst %.c,%.o,$(filter %.c,$(SOURCES))
该命令先使用filter函数过滤出所有的.c文件,然后再将其替换为.o文件。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>