diff options
Diffstat (limited to 'Makefile')
| -rwxr-xr-x | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..97269af --- /dev/null +++ b/Makefile @@ -0,0 +1,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/strmap.a: build/strmap.o + ar rcs lib/strmap.a build/strmap.o + ranlib lib/strmap.a + +.PHONY tests: +tests: lib/strmap.a + clang $(CFLAGS) -L/usr/local/lib -lcheck -pthread lib/strmap.a tests/strmap_tests.c -o bin/strmap_tests + + +.PHONY clean: +clean: + rm -r build bin lib |