aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMakefile10
-rw-r--r--compile_flags.txt1
-rwxr-xr-xinclude/strmap.h1
3 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 97269af..18eef85 100755
--- a/Makefile
+++ b/Makefile
@@ -9,13 +9,13 @@ build:
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
+lib/libmap.a: build/strmap.o
+ ar rcs lib/libmap.a build/strmap.o
+ ranlib lib/libmap.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
+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:
diff --git a/compile_flags.txt b/compile_flags.txt
new file mode 100644
index 0000000..30679be
--- /dev/null
+++ b/compile_flags.txt
@@ -0,0 +1 @@
+-Iinclude
diff --git a/include/strmap.h b/include/strmap.h
index 634da60..f168b05 100755
--- a/include/strmap.h
+++ b/include/strmap.h
@@ -8,6 +8,7 @@
#ifndef H_STRMAP
#define H_STRMAP
+#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>