aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-11-01 13:31:38 -0400
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-11-01 13:31:38 -0400
commit6338ac827b15787a0d83136eac9d681588f07f9a (patch)
treef808100cd52e54c632b31b8a42f3bdb703f3d31a /Makefile
downloadlibmap-6338ac827b15787a0d83136eac9d681588f07f9a.tar.gz
Initial commit
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile23
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