我有一个目录结构,例如:
home
|-- folder1
|-- Makefile
|-- code1.cpp
|-- folder2
|-- Makefile
|-- code2.cpp
|-- many more folders with Makefile and code inside
.
.
我想在所有文件夹上调用make。我该怎么做呢?谢谢!
答案 0 :(得分:3)
SUBDIRS := $(wildcard */.)
.PHONY : all $(SUBDIRS)
all : $(SUBDIRS)
$(SUBDIRS) :
$(MAKE) -C $@