summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-12-01 20:24:59 (GMT)
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-22 09:32:45 (GMT)
commitf4626df51f63d53b89ff01de54cbf7558217ea2b (patch)
tree3f2e8f987cab6e12fcb8fa4d4a6004e60e57b053 /Makefile
parent58eda02257a89df6e05f504bdf87e578d90f3b5e (diff)
downloadgit-f4626df51f63d53b89ff01de54cbf7558217ea2b.zip
git-f4626df51f63d53b89ff01de54cbf7558217ea2b.tar.gz
git-f4626df51f63d53b89ff01de54cbf7558217ea2b.tar.bz2
Add target architecture MinGW.
With this change GIT can be compiled and linked using MinGW. Builtins that only read the repository such as the log family and grep already work. Simple stubs are provided for a number of functions that the Windows C runtime does not offer. They will be completed in later patches. However, a fix for the snprintf/vsnprintf replacement is applied here to avoid buffer overflows. Dmitry Kakurin pointed out that access(..., X_OK) would always fails on Vista and suggested the -D__USE_MINGW_ACCESS workaround. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 95572ef..a7dafa7 100644
--- a/Makefile
+++ b/Makefile
@@ -335,6 +335,7 @@ LIB_H += builtin.h
LIB_H += cache.h
LIB_H += cache-tree.h
LIB_H += commit.h
+LIB_H += compat/mingw.h
LIB_H += csum-file.h
LIB_H += decorate.h
LIB_H += delta.h
@@ -711,6 +712,33 @@ ifeq ($(uname_S),HP-UX)
NO_HSTRERROR = YesPlease
NO_SYS_SELECT_H = YesPlease
endif
+ifneq (,$(findstring MINGW,$(uname_S)))
+ NO_MMAP = YesPlease
+ NO_PREAD = YesPlease
+ NO_OPENSSL = YesPlease
+ NO_CURL = YesPlease
+ NO_SYMLINK_HEAD = YesPlease
+ NO_IPV6 = YesPlease
+ NO_SETENV = YesPlease
+ NO_UNSETENV = YesPlease
+ NO_STRCASESTR = YesPlease
+ NO_STRLCPY = YesPlease
+ NO_MEMMEM = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ OLD_ICONV = YesPlease
+ NO_C99_FORMAT = YesPlease
+ NO_STRTOUMAX = YesPlease
+ NO_MKDTEMP = YesPlease
+ SNPRINTF_RETURNS_BOGUS = YesPlease
+ NO_SVN_TESTS = YesPlease
+ NO_PERL_MAKEMAKER = YesPlease
+ NO_POSIX_ONLY_PROGRAMS = YesPlease
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat
+ COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
+ COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o
+ EXTLIBS += -lws2_32
+ X = .exe
+endif
ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease
endif