Commit 56931d1ab4de660b27c56ce488245e78f8c713c3

Ramsay Jones 2010-02-19T20:07:03

Makefile: Add support for custom build options in config.mak file Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>

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)