aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 5425eb2da3981ddcbbc8523c5906f9d2c9f5d680 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CFLAGS= -g -Wall -std=c11 -I.
LIBS= 
TESTFLAGS= $(CFLAGS) -Isrc/

all: bin/hyde

bin:; mkdir -p bin/

bin/hyde: src/hyde.c src/hashmap.c vendor/mpc.c | bin
	$(CC) $(CFLAGS) $^ -o $@

bin/test_hashmap: src/hashmap.c tests/test_hashmap.c | bin
	$(CC) $(TESTFLAGS) $^ -o $@

.PHONY: check
check: bin/test_hashmap
	for test in $^; do $$test || exit 1; done	

.PHONY: clean 
clean:; rm -r bin/