CURRENT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

.PHONY: all clean

APP_DIR := $(shell find . -mindepth 1 -maxdepth 1 -type d -not -path "./arch")

all:
	rm -f FILES.txt
	touch FILES.txt
	for dir in $(APP_DIR); do make -C $$dir ROOT=$(ROOT) FILES=$(CURRENT_DIR)/FILES.txt all; done

clean:
	for dir in $(APP_DIR); do make -C $$dir clean; done

