aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-12 09:14:29 +0100
committerDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-12 09:14:29 +0100
commitedf331cd2573726d8053ce76e3497203a12d99b9 (patch)
tree73b3b885a7c6e4f35e7cba247cfdce280a4c6e86 /Makefile
parent615618bb2ad91be24fb74738db0b2f290ccc50a3 (diff)
downloadunja-edf331cd2573726d8053ce76e3497203a12d99b9.tar.gz
unja-edf331cd2573726d8053ce76e3497203a12d99b9.zip
add test for hashmap
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 15 insertions, 3 deletions
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