Makefile

changeset 148
6cc15ba51424
parent 77
808a7324b467
--- a/Makefile	Sat Jul 18 21:18:38 2026 +0200
+++ b/Makefile	Sat Jul 18 22:00:49 2026 +0200
@@ -28,15 +28,29 @@
 
 include config.mk
 
-all: $(BUILDDIR)
-	cd src; $(MAKE)
+all: app tests
+
+app: $(BUILDDIR) FORCE
+	cd src && $(MAKE)
+
+tests: $(BUILDDIR) $(BUILDDIR)/libchess$(LIB_EXT) FORCE
+	cd test && $(MAKE)
+
+check: tests FORCE
+	$(BUILDDIR)/run-tests
 
 $(BUILDDIR):
 	$(MKDIR) $(MKDIRFLAGS) $(BUILDDIR)
 
+$(BUILDDIR)/libchess$(LIB_EXT):
+	cd src/chess && $(MAKE)
+
 clean:
 	$(RM) $(RMFLAGS) $(BUILDDIR)
 
 update-rules:
 	make/update-rules.sh src
 	make/update-rules.sh src/chess
+	make/update-rules.sh test
+
+FORCE:

mercurial