From 8cfb73568aec29d30415509beedfb7a2fdcd01b2 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sat, 29 Jan 2022 23:39:36 +0100 Subject: [PATCH] Makefile: Add 'tests' target, depend on headers too to rebuild on changes of those --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8850976..90cce91 100644 --- a/Makefile +++ b/Makefile @@ -3,19 +3,21 @@ bindir = $(prefix)/bin CFLAGS = -std=c99 -Wall -Wextra -pedantic CXXFLAGS = -std=c++20 -Wall -Wextra -pedantic -.DEFAULT_GOAL := test +.DEFAULT_GOAL := tests clean: rm -f test testcpp -test: test.c +test: test.c exile.h $(CC) test.c -g $(CFLAGS) -o test -testcpp: test.cpp +testcpp: test.cpp exile.h exile.hpp $(CXX) test.cpp -g $(CXXFLAGS) -o testcpp -check: test +tests: test testcpp + +check: tests ./test.sh .PHONY: check