Add master Makefile

This commit is contained in:
Joshua Bell 2019-10-03 21:19:52 -07:00
parent 8a242abc17
commit 78e1d2d2e6
1 changed files with 19 additions and 0 deletions

19
Makefile Normal file
View File

@ -0,0 +1,19 @@
targets := cricket bbb ram.drv
.PHONY: all $(targets)
all: $(targets)
# Build all targets
$(targets):
@tput setaf 3 && echo "Building: $@" && tput sgr0
@$(MAKE) -C $@ \
&& (tput setaf 2 && echo "make $@ good" && tput sgr0) \
|| (tput blink && tput setaf 1 && echo "MAKE $@ BAD" && tput sgr0 && false)
# Clean all temporary/target files
clean:
@for dir in $(targets); do \
tput setaf 2 && echo "cleaning $$dir" && tput sgr0; \
$(MAKE) -C $$dir clean; \
done