mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-06-20 13:02:49 +02:00
Add targets per Makefile, allowing make -j to work
This commit is contained in:
parent
9db0cfd567
commit
fc98393d50
14
Makefile
14
Makefile
@ -1,13 +1,19 @@
|
||||
MAKEFILES := $(shell find . -mindepth 2 -name Makefile)
|
||||
MAKEFILES := $(subst ./,,$(shell find . -mindepth 2 -name Makefile))
|
||||
|
||||
TARGETS := $(dir $(MAKEFILES))
|
||||
|
||||
DATESTRING := $(shell date +%Y)$(shell date +%m)$(shell date +%d)
|
||||
|
||||
all:
|
||||
@for i in $(MAKEFILES); do $(MAKE) -C `dirname $$i` || exit 1; done;
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: $(TARGETS)
|
||||
|
||||
$(TARGETS):
|
||||
@$(MAKE) -C $@
|
||||
|
||||
clean:
|
||||
@rm -f *.bz2
|
||||
@for i in $(MAKEFILES); do $(MAKE) -C `dirname $$i` clean || exit 1; done;
|
||||
@for i in $(TARGETS); do $(MAKE) -C $$i clean || exit 1; done;
|
||||
|
||||
dist: clean
|
||||
@tar -cvjf switch-examples-$(DATESTRING).tar.bz2 *
|
||||
|
Loading…
Reference in New Issue
Block a user