SUBDIRS :=
define make_subdir
	@for d in $(SUBDIRS); do [ -f "$$d/makefile" ] && (cd "$$d" && make -f makefile $1) || true; done
endef
.PHONY: all; all:; $(call make_subdir,all)
.PHONY: clean; clean:; $(call make_subdir,clean)
.PHONY: rebuild; rebuild: clean all
