aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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