blob: 28cd0b4fd219515bd761a537886bd09fefdc655a [file] [log] [blame]
liubin281ac462023-07-19 14:22:54 +08001ROOT = $(shell pwd)/../..
2include ../Make.defines
3
b.liu482dc0b2024-03-22 15:53:36 +08004#exclude_dirs := include bin
5#test_dirs := $(shell find . -maxdepth 1 -type d)
6#test_dirs := $(basename $(patsubst ./%,%,$(test_dirs)))
7#test_dirs := $(filter-out $(exclude_dirs),$(test_dirs))
liubin281ac462023-07-19 14:22:54 +08008
b.liu482dc0b2024-03-22 15:53:36 +08009SUBDIRS := $(wildcard */)
10SUBDIRS_WITH_MAKEFILES := $(foreach dir,$(SUBDIRS),$(if $(wildcard $(dir)Makefile),$(dir),))
11
12all:
13 @echo DIR=$(SUBDIRS_WITH_MAKEFILES)
14 @for dir in $(SUBDIRS_WITH_MAKEFILES); do \
15 echo "Building $$dir"; \
16 $(MAKE) -C $$dir || exit 1; \
17 done
liubin281ac462023-07-19 14:22:54 +080018
19clean:
b.liu482dc0b2024-03-22 15:53:36 +080020 @echo DIR=$(SUBDIRS_WITH_MAKEFILES)
21 @for i in $(SUBDIRS_WITH_MAKEFILES); do \
22 (cd $$i && echo "Cleaning $$i" && $(MAKE) clean) || exit 1; \
23 done
24 rm -rf $(OUT_DIR)