aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 18eef857fbd0003b634afb927e86c59662633ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CFLAGS = -Wall -Wextra -Werror -std=c11 -Iinclude -Wno-unused-function -I/usr/local/include -ggdb -O0

.PHONY build:
build:
	mkdir -p build
	mkdir -p bin
	mkdir -p lib

build/strmap.o: src/strmap.c build
	clang $(CFLAGS) -c src/strmap.c -o build/strmap.o

lib/libmap.a: build/strmap.o
	ar rcs lib/libmap.a build/strmap.o 
	ranlib lib/libmap.a

.PHONY tests:
tests: lib/libmap.a
	clang $(CFLAGS) -L/usr/local/lib -lcheck -pthread lib/libmap.a tests/strmap_tests.c -o bin/strmap_tests


.PHONY clean:
clean:
	rm -r build bin lib