Makefile: Add support for custom build options in config.mak file Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/.gitignore b/.gitignore
index 5c7507c..0c3aa34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
/apidocs
/trash-*.exe
/libgit2.pc
+/config.mak
*.o
*.a
*.exe
diff --git a/Makefile b/Makefile
index a5ab36d..ad7cf03 100644
--- a/Makefile
+++ b/Makefile
@@ -55,6 +55,8 @@ ifneq (,$(findstring MINGW,$(uname_S)))
SPARSE_FLAGS=-Wno-one-bit-signed-bitfield
endif
+-include config.mak
+
SRC_C = $(wildcard src/*.c)
OS_SRC = $(wildcard src/$(OS)/*.c)
SRC_C += $(OS_SRC)
diff --git a/tests/Makefile b/tests/Makefile
index 487addc..beaa5ab 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -41,6 +41,8 @@ ifneq (,$(findstring MINGW,$(uname_S)))
EXTRA_LIBS += -lwsock32 -lpthread
endif
+-include ../config.mak
+
GIT_LIB = ../libgit2.a
HDRS = $(wildcard ../src/*.h)