From edf331cd2573726d8053ce76e3497203a12d99b9 Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Thu, 12 Mar 2020 09:14:29 +0100 Subject: add test for hashmap --- Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c04520b..0551369 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,17 @@ -CFLAGS= -g -Wall -std=c11 -Ivendor/ +CFLAGS= -g -Wall -std=c11 -Ivendor/ -I. LIBS= -hyde: hyde.c hashmap.c vendor/mpc.c - $(CC) $(CFLAGS) $^ -o $@ \ No newline at end of file +all: bin/hyde + +bin: + mkdir -p bin/ + +bin/hyde: hyde.c hashmap.c vendor/mpc.c | bin + $(CC) $(CFLAGS) $^ -o $@ + +bin/test_hashmap: hashmap.c tests/test_hashmap.c | bin + $(CC) $(CFLAGS) $^ -o $@ + +.PHONY: check +check: bin/test_hashmap + for test in $^; do $$test || exit 1; done \ No newline at end of file -- cgit v1.2.3