Makefile: add benchmarks to top-level
[c11tester.git] / Makefile
index d530fee..764b8ab 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,4 +61,16 @@ PHONY += tests
 tests: $(LIB_SO)
        $(MAKE) -C $(TESTS_DIR)
 
 tests: $(LIB_SO)
        $(MAKE) -C $(TESTS_DIR)
 
+BENCHMARKS := benchmarks
+
+PHONY += benchmarks
+benchmarks: $(LIB_SO)
+       @if ! test -d $(BENCHMARKS); then \
+               echo "Directory $(BENCHMARKS) does not exist" && \
+               echo "Please clone the benchmarks repository" && \
+               echo && \
+               exit 1; \
+       fi
+       $(MAKE) -C $(BENCHMARKS)
+
 .PHONY: $(PHONY)
 .PHONY: $(PHONY)