2025-01-10 08:15:31 +01:00
|
|
|
# SUBDIRS = dir1 dir2 dir3
|
|
|
|
SUBDIRS := $(shell find . -mindepth 1 -maxdepth 1 -type d -exec test -e "{}/Makefile" \; -print)
|
|
|
|
|
|
|
|
|
|
|
|
build: $(SUBDIRS)
|
|
|
|
@for dir in $(SUBDIRS); do \
|
|
|
|
$(MAKE) -j$(nproc) -C $$dir; \
|
|
|
|
done
|
|
|
|
|
2025-01-11 17:43:12 +01:00
|
|
|
test: $(SUBDIRS) build
|
|
|
|
@for dir in $(SUBDIRS); do \
|
|
|
|
$(MAKE) -j$(nproc) test -C $$dir; \
|
|
|
|
done
|
|
|
|
|
2025-01-11 18:02:10 +01:00
|
|
|
check: $(SUBDIRS)
|
|
|
|
@for dir in $(SUBDIRS); do \
|
|
|
|
$(MAKE) -j$(nproc) check -C $$dir; \
|
|
|
|
done
|
|
|
|
|
2025-01-10 08:15:31 +01:00
|
|
|
clean:
|
|
|
|
@for dir in $(SUBDIRS); do \
|
|
|
|
make -C $$dir clean; \
|
|
|
|
done
|
|
|
|
|
2025-01-11 17:45:25 +01:00
|
|
|
format:
|
2025-01-11 17:54:08 +01:00
|
|
|
find . -type f \( -name "*.cc" -o -name "*.cpp" -o -name "*.h" -o -name "*.c" \) -exec clang-format -i {} \;
|
2025-01-11 17:45:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: build clean test format
|