Add recursive Makefile clean

This commit is contained in:
mguthaus 2018-02-12 13:37:14 -08:00
parent 0e53cdd4e1
commit 18702f5f5e
1 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,14 @@
SUBDIRS := $(wildcard */.)
SUBDIRSCLEAN=$(addsuffix clean,$(SUBDIRS))
all: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY: all $(SUBDIRS)
clean:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@; \
done
.PHONY: all $(SUBDIRS) $(SUBDIRSCLEAN)