# Top-level Makefile – delegates build/clean/test to subdirectories

SUBDIRS = engine client

.PHONY: all build clean test check format $(SUBDIRS)

all: build

build: $(SUBDIRS)
	@echo "Build complete."

$(SUBDIRS):
	$(MAKE) -C $@

test:
#	$(MAKE) -C engine test
	$(MAKE) -C client test

clean:
	@for dir in $(SUBDIRS); do \
	    echo "Cleaning $$dir..."; \
	    $(MAKE) -C $$dir clean; \
	done

check:
	$(MAKE) -C engine check

format:
	$(MAKE) -C engine format
