Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 1 | # Platform specific Makefile tweaks based on uname detection |
| 2 | |
| 3 | uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') |
| 4 | uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') |
| 5 | uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') |
| 6 | uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') |
| 7 | uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') |
| 8 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') |
| 9 | |
| 10 | ifdef MSVC |
| 11 | # avoid the MingW and Cygwin configuration sections |
| 12 | uname_S := Windows |
| 13 | uname_O := Windows |
| 14 | endif |
| 15 | |
| 16 | # We choose to avoid "if .. else if .. else .. endif endif" |
| 17 | # because maintaining the nesting to match is a pain. If |
| 18 | # we had "elif" things would have been much nicer... |
| 19 | |
| 20 | ifeq ($(uname_M),x86_64) |
| 21 | XDL_FAST_HASH = YesPlease |
| 22 | endif |
| 23 | ifeq ($(uname_S),OSF1) |
| 24 | # Need this for u_short definitions et al |
| 25 | BASIC_CFLAGS += -D_OSF_SOURCE |
| 26 | SOCKLEN_T = int |
| 27 | NO_STRTOULL = YesPlease |
| 28 | NO_NSEC = YesPlease |
| 29 | endif |
| 30 | ifeq ($(uname_S),Linux) |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 31 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 32 | NO_STRLCPY = YesPlease |
| 33 | NO_MKSTEMPS = YesPlease |
| 34 | HAVE_PATHS_H = YesPlease |
| 35 | LIBC_CONTAINS_LIBINTL = YesPlease |
| 36 | HAVE_DEV_TTY = YesPlease |
Karsten Blees | 148d677 | 2014-07-12 02:05:42 +0200 | [diff] [blame] | 37 | HAVE_CLOCK_GETTIME = YesPlease |
Reuben Hawkins | a6c3c63 | 2015-01-08 12:00:56 -0800 | [diff] [blame] | 38 | HAVE_CLOCK_MONOTONIC = YesPlease |
Jeff King | 0cc30e0 | 2015-04-16 05:01:38 -0400 | [diff] [blame] | 39 | HAVE_GETDELIM = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 40 | endif |
| 41 | ifeq ($(uname_S),GNU/kFreeBSD) |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 42 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 43 | NO_STRLCPY = YesPlease |
| 44 | NO_MKSTEMPS = YesPlease |
| 45 | HAVE_PATHS_H = YesPlease |
| 46 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease |
| 47 | LIBC_CONTAINS_LIBINTL = YesPlease |
| 48 | endif |
| 49 | ifeq ($(uname_S),UnixWare) |
| 50 | CC = cc |
| 51 | NEEDS_SOCKET = YesPlease |
| 52 | NEEDS_NSL = YesPlease |
| 53 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 54 | NEEDS_LIBICONV = YesPlease |
| 55 | SHELL_PATH = /usr/local/bin/bash |
| 56 | NO_IPV6 = YesPlease |
| 57 | NO_HSTRERROR = YesPlease |
| 58 | NO_MKSTEMPS = YesPlease |
| 59 | BASIC_CFLAGS += -Kthread |
| 60 | BASIC_CFLAGS += -I/usr/local/include |
| 61 | BASIC_LDFLAGS += -L/usr/local/lib |
| 62 | INSTALL = ginstall |
| 63 | TAR = gtar |
| 64 | NO_STRCASESTR = YesPlease |
| 65 | NO_MEMMEM = YesPlease |
| 66 | endif |
| 67 | ifeq ($(uname_S),SCO_SV) |
| 68 | ifeq ($(uname_R),3.2) |
| 69 | CFLAGS = -O2 |
| 70 | endif |
| 71 | ifeq ($(uname_R),5) |
| 72 | CC = cc |
| 73 | BASIC_CFLAGS += -Kthread |
| 74 | endif |
| 75 | NEEDS_SOCKET = YesPlease |
| 76 | NEEDS_NSL = YesPlease |
| 77 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 78 | NEEDS_LIBICONV = YesPlease |
| 79 | SHELL_PATH = /usr/bin/bash |
| 80 | NO_IPV6 = YesPlease |
| 81 | NO_HSTRERROR = YesPlease |
| 82 | NO_MKSTEMPS = YesPlease |
| 83 | BASIC_CFLAGS += -I/usr/local/include |
| 84 | BASIC_LDFLAGS += -L/usr/local/lib |
| 85 | NO_STRCASESTR = YesPlease |
| 86 | NO_MEMMEM = YesPlease |
| 87 | INSTALL = ginstall |
| 88 | TAR = gtar |
| 89 | endif |
| 90 | ifeq ($(uname_S),Darwin) |
| 91 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 92 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 93 | NEEDS_LIBICONV = YesPlease |
Junio C Hamano | 9eeff2f | 2014-08-15 10:02:46 -0700 | [diff] [blame] | 94 | # Note: $(uname_R) gives us the underlying Darwin version. |
| 95 | # - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.* |
| 96 | # - MacOS 10.x.* = Darwin (x+4).* for (1 <= x) |
| 97 | # i.e. "begins with [15678] and a dot" means "10.4.* or older". |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 98 | ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) |
| 99 | OLD_ICONV = UnfortunatelyYes |
Kyle J. McKay | 9c7a0be | 2014-08-15 00:46:11 -0700 | [diff] [blame] | 100 | NO_APPLE_COMMON_CRYPTO = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 101 | endif |
| 102 | ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) |
| 103 | NO_STRLCPY = YesPlease |
| 104 | endif |
Eric Sunshine | 4e36878 | 2015-06-02 17:15:43 -0400 | [diff] [blame] | 105 | ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1) |
| 106 | HAVE_GETDELIM = YesPlease |
| 107 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 108 | NO_MEMMEM = YesPlease |
| 109 | USE_ST_TIMESPEC = YesPlease |
| 110 | HAVE_DEV_TTY = YesPlease |
| 111 | COMPAT_OBJS += compat/precompose_utf8.o |
| 112 | BASIC_CFLAGS += -DPRECOMPOSE_UNICODE |
Jeff King | a42643a | 2014-12-15 18:15:20 -0500 | [diff] [blame] | 113 | BASIC_CFLAGS += -DPROTECT_HFS_DEFAULT=1 |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 114 | HAVE_BSD_SYSCTL = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 115 | endif |
| 116 | ifeq ($(uname_S),SunOS) |
| 117 | NEEDS_SOCKET = YesPlease |
| 118 | NEEDS_NSL = YesPlease |
| 119 | SHELL_PATH = /bin/bash |
| 120 | SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 121 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 122 | NO_STRCASESTR = YesPlease |
| 123 | NO_MEMMEM = YesPlease |
| 124 | NO_MKDTEMP = YesPlease |
| 125 | NO_MKSTEMPS = YesPlease |
| 126 | NO_REGEX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 127 | NO_MSGFMT_EXTENDED_OPTIONS = YesPlease |
| 128 | HAVE_DEV_TTY = YesPlease |
| 129 | ifeq ($(uname_R),5.6) |
| 130 | SOCKLEN_T = int |
| 131 | NO_HSTRERROR = YesPlease |
| 132 | NO_IPV6 = YesPlease |
| 133 | NO_SOCKADDR_STORAGE = YesPlease |
| 134 | NO_UNSETENV = YesPlease |
| 135 | NO_SETENV = YesPlease |
| 136 | NO_STRLCPY = YesPlease |
| 137 | NO_STRTOUMAX = YesPlease |
| 138 | GIT_TEST_CMP = cmp |
| 139 | endif |
| 140 | ifeq ($(uname_R),5.7) |
| 141 | NEEDS_RESOLV = YesPlease |
| 142 | NO_IPV6 = YesPlease |
| 143 | NO_SOCKADDR_STORAGE = YesPlease |
| 144 | NO_UNSETENV = YesPlease |
| 145 | NO_SETENV = YesPlease |
| 146 | NO_STRLCPY = YesPlease |
| 147 | NO_STRTOUMAX = YesPlease |
| 148 | GIT_TEST_CMP = cmp |
| 149 | endif |
| 150 | ifeq ($(uname_R),5.8) |
| 151 | NO_UNSETENV = YesPlease |
| 152 | NO_SETENV = YesPlease |
| 153 | NO_STRTOUMAX = YesPlease |
| 154 | GIT_TEST_CMP = cmp |
| 155 | endif |
| 156 | ifeq ($(uname_R),5.9) |
| 157 | NO_UNSETENV = YesPlease |
| 158 | NO_SETENV = YesPlease |
| 159 | NO_STRTOUMAX = YesPlease |
| 160 | GIT_TEST_CMP = cmp |
| 161 | endif |
| 162 | INSTALL = /usr/ucb/install |
| 163 | TAR = gtar |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 164 | BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 165 | endif |
| 166 | ifeq ($(uname_O),Cygwin) |
| 167 | ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) |
| 168 | NO_D_TYPE_IN_DIRENT = YesPlease |
| 169 | NO_D_INO_IN_DIRENT = YesPlease |
| 170 | NO_STRCASESTR = YesPlease |
| 171 | NO_MEMMEM = YesPlease |
| 172 | NO_MKSTEMPS = YesPlease |
| 173 | NO_SYMLINK_HEAD = YesPlease |
| 174 | NO_IPV6 = YesPlease |
| 175 | OLD_ICONV = UnfortunatelyYes |
Mark Levedahl | f593ef7 | 2013-07-19 19:08:30 -0400 | [diff] [blame] | 176 | # There are conflicting reports about this. |
| 177 | # On some boxes NO_MMAP is needed, and not so elsewhere. |
| 178 | # Try commenting this out if you suspect MMAP is more efficient |
| 179 | NO_MMAP = YesPlease |
Mark Levedahl | 92f63d2 | 2013-07-19 19:08:28 -0400 | [diff] [blame] | 180 | else |
| 181 | NO_REGEX = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 182 | endif |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 183 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 184 | NEEDS_LIBICONV = YesPlease |
| 185 | NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 186 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 187 | X = .exe |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 188 | UNRELIABLE_FSTAT = UnfortunatelyYes |
| 189 | SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield |
| 190 | endif |
| 191 | ifeq ($(uname_S),FreeBSD) |
| 192 | NEEDS_LIBICONV = YesPlease |
| 193 | OLD_ICONV = YesPlease |
| 194 | NO_MEMMEM = YesPlease |
| 195 | BASIC_CFLAGS += -I/usr/local/include |
| 196 | BASIC_LDFLAGS += -L/usr/local/lib |
| 197 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease |
| 198 | USE_ST_TIMESPEC = YesPlease |
| 199 | ifeq ($(shell expr "$(uname_R)" : '4\.'),2) |
| 200 | PTHREAD_LIBS = -pthread |
| 201 | NO_UINTMAX_T = YesPlease |
| 202 | NO_STRTOUMAX = YesPlease |
| 203 | endif |
| 204 | PYTHON_PATH = /usr/local/bin/python |
| 205 | HAVE_PATHS_H = YesPlease |
Jeff King | 6654754 | 2014-04-01 17:28:42 -0400 | [diff] [blame] | 206 | GMTIME_UNRELIABLE_ERRORS = UnfortunatelyYes |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 207 | HAVE_BSD_SYSCTL = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 208 | endif |
| 209 | ifeq ($(uname_S),OpenBSD) |
| 210 | NO_STRCASESTR = YesPlease |
| 211 | NO_MEMMEM = YesPlease |
| 212 | USE_ST_TIMESPEC = YesPlease |
| 213 | NEEDS_LIBICONV = YesPlease |
| 214 | BASIC_CFLAGS += -I/usr/local/include |
| 215 | BASIC_LDFLAGS += -L/usr/local/lib |
| 216 | HAVE_PATHS_H = YesPlease |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 217 | HAVE_BSD_SYSCTL = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 218 | endif |
Benny Siegert | 92164af | 2013-12-31 14:36:45 +0000 | [diff] [blame] | 219 | ifeq ($(uname_S),MirBSD) |
| 220 | NO_STRCASESTR = YesPlease |
| 221 | NO_MEMMEM = YesPlease |
| 222 | USE_ST_TIMESPEC = YesPlease |
| 223 | NEEDS_LIBICONV = YesPlease |
| 224 | HAVE_PATHS_H = YesPlease |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 225 | HAVE_BSD_SYSCTL = YesPlease |
Benny Siegert | 92164af | 2013-12-31 14:36:45 +0000 | [diff] [blame] | 226 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 227 | ifeq ($(uname_S),NetBSD) |
| 228 | ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) |
| 229 | NEEDS_LIBICONV = YesPlease |
| 230 | endif |
| 231 | BASIC_CFLAGS += -I/usr/pkg/include |
| 232 | BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib |
| 233 | USE_ST_TIMESPEC = YesPlease |
| 234 | NO_MKSTEMPS = YesPlease |
| 235 | HAVE_PATHS_H = YesPlease |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 236 | HAVE_BSD_SYSCTL = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 237 | endif |
| 238 | ifeq ($(uname_S),AIX) |
| 239 | DEFAULT_PAGER = more |
| 240 | NO_STRCASESTR = YesPlease |
| 241 | NO_MEMMEM = YesPlease |
| 242 | NO_MKDTEMP = YesPlease |
| 243 | NO_MKSTEMPS = YesPlease |
| 244 | NO_STRLCPY = YesPlease |
| 245 | NO_NSEC = YesPlease |
| 246 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
| 247 | INTERNAL_QSORT = UnfortunatelyYes |
| 248 | NEEDS_LIBICONV = YesPlease |
| 249 | BASIC_CFLAGS += -D_LARGE_FILES |
| 250 | ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) |
| 251 | NO_PTHREADS = YesPlease |
| 252 | else |
| 253 | PTHREAD_LIBS = -lpthread |
| 254 | endif |
| 255 | ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3) |
| 256 | INLINE = '' |
| 257 | endif |
| 258 | GIT_TEST_CMP = cmp |
| 259 | endif |
| 260 | ifeq ($(uname_S),GNU) |
| 261 | # GNU/Hurd |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 262 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 263 | NO_STRLCPY = YesPlease |
| 264 | NO_MKSTEMPS = YesPlease |
| 265 | HAVE_PATHS_H = YesPlease |
| 266 | LIBC_CONTAINS_LIBINTL = YesPlease |
| 267 | endif |
| 268 | ifeq ($(uname_S),IRIX) |
| 269 | NO_SETENV = YesPlease |
| 270 | NO_UNSETENV = YesPlease |
| 271 | NO_STRCASESTR = YesPlease |
| 272 | NO_MEMMEM = YesPlease |
| 273 | NO_MKSTEMPS = YesPlease |
| 274 | NO_MKDTEMP = YesPlease |
| 275 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads |
| 276 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), |
| 277 | # git dies with a segmentation fault when trying to access the first |
| 278 | # entry of a reflog. The conservative choice is made to always set |
| 279 | # NO_MMAP. If you suspect that your compiler is not affected by this |
| 280 | # issue, comment out the NO_MMAP statement. |
| 281 | NO_MMAP = YesPlease |
| 282 | NO_REGEX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 283 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 284 | SHELL_PATH = /usr/gnu/bin/bash |
| 285 | NEEDS_LIBGEN = YesPlease |
| 286 | endif |
| 287 | ifeq ($(uname_S),IRIX64) |
| 288 | NO_SETENV = YesPlease |
| 289 | NO_UNSETENV = YesPlease |
| 290 | NO_STRCASESTR = YesPlease |
| 291 | NO_MEMMEM = YesPlease |
| 292 | NO_MKSTEMPS = YesPlease |
| 293 | NO_MKDTEMP = YesPlease |
| 294 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads |
| 295 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), |
| 296 | # git dies with a segmentation fault when trying to access the first |
| 297 | # entry of a reflog. The conservative choice is made to always set |
| 298 | # NO_MMAP. If you suspect that your compiler is not affected by this |
| 299 | # issue, comment out the NO_MMAP statement. |
| 300 | NO_MMAP = YesPlease |
| 301 | NO_REGEX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 302 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 303 | SHELL_PATH = /usr/gnu/bin/bash |
| 304 | NEEDS_LIBGEN = YesPlease |
| 305 | endif |
| 306 | ifeq ($(uname_S),HP-UX) |
| 307 | INLINE = __inline |
| 308 | NO_IPV6 = YesPlease |
| 309 | NO_SETENV = YesPlease |
| 310 | NO_STRCASESTR = YesPlease |
| 311 | NO_MEMMEM = YesPlease |
| 312 | NO_MKSTEMPS = YesPlease |
| 313 | NO_STRLCPY = YesPlease |
| 314 | NO_MKDTEMP = YesPlease |
| 315 | NO_UNSETENV = YesPlease |
| 316 | NO_HSTRERROR = YesPlease |
| 317 | NO_SYS_SELECT_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 318 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 319 | NO_NSEC = YesPlease |
| 320 | ifeq ($(uname_R),B.11.00) |
| 321 | NO_INET_NTOP = YesPlease |
| 322 | NO_INET_PTON = YesPlease |
| 323 | endif |
| 324 | ifeq ($(uname_R),B.10.20) |
| 325 | # Override HP-UX 11.x setting: |
| 326 | INLINE = |
| 327 | SOCKLEN_T = size_t |
| 328 | NO_PREAD = YesPlease |
| 329 | NO_INET_NTOP = YesPlease |
| 330 | NO_INET_PTON = YesPlease |
| 331 | endif |
| 332 | GIT_TEST_CMP = cmp |
| 333 | endif |
| 334 | ifeq ($(uname_S),Windows) |
| 335 | GIT_VERSION := $(GIT_VERSION).MSVC |
| 336 | pathsep = ; |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 337 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 338 | NO_PREAD = YesPlease |
| 339 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 340 | NO_LIBGEN_H = YesPlease |
| 341 | NO_POLL = YesPlease |
| 342 | NO_SYMLINK_HEAD = YesPlease |
| 343 | NO_IPV6 = YesPlease |
| 344 | NO_UNIX_SOCKETS = YesPlease |
| 345 | NO_SETENV = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 346 | NO_STRCASESTR = YesPlease |
| 347 | NO_STRLCPY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 348 | NO_MEMMEM = YesPlease |
| 349 | # NEEDS_LIBICONV = YesPlease |
| 350 | NO_ICONV = YesPlease |
| 351 | NO_STRTOUMAX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 352 | NO_MKDTEMP = YesPlease |
| 353 | NO_MKSTEMPS = YesPlease |
| 354 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 355 | NO_SVN_TESTS = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 356 | RUNTIME_PREFIX = YesPlease |
| 357 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
| 358 | NO_NSEC = YesPlease |
| 359 | USE_WIN32_MMAP = YesPlease |
| 360 | # USE_NED_ALLOCATOR = YesPlease |
| 361 | UNRELIABLE_FSTAT = UnfortunatelyYes |
| 362 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
| 363 | NO_REGEX = YesPlease |
Karsten Blees | bad866a | 2013-09-11 01:21:53 +0200 | [diff] [blame] | 364 | NO_GETTEXT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 365 | NO_PYTHON = YesPlease |
| 366 | BLK_SHA1 = YesPlease |
Ramsay Jones | e0492c5 | 2013-01-31 18:33:57 +0000 | [diff] [blame] | 367 | ETAGS_TARGET = ETAGS |
Ramsay Jones | 4ab7527 | 2013-01-31 18:30:14 +0000 | [diff] [blame] | 368 | NO_INET_PTON = YesPlease |
| 369 | NO_INET_NTOP = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 370 | NO_POSIX_GOODIES = UnfortunatelyYes |
| 371 | NATIVE_CRLF = YesPlease |
| 372 | DEFAULT_HELP_FORMAT = html |
Karsten Blees | 1d94c40 | 2011-01-07 17:34:33 +0100 | [diff] [blame] | 373 | NO_D_INO_IN_DIRENT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 374 | |
| 375 | CC = compat/vcbuild/scripts/clink.pl |
| 376 | AR = compat/vcbuild/scripts/lib.pl |
| 377 | CFLAGS = |
| 378 | BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE |
| 379 | COMPAT_OBJS = compat/msvc.o compat/winansi.o \ |
| 380 | compat/win32/pthread.o compat/win32/syslog.o \ |
| 381 | compat/win32/dirent.o |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 382 | COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" |
Karsten Blees | a08e803 | 2011-01-07 17:20:21 +0100 | [diff] [blame] | 383 | BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE |
Marat Radchenko | 4b623d8 | 2014-03-29 00:08:02 +0400 | [diff] [blame] | 384 | EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 385 | PTHREAD_LIBS = |
| 386 | lib = |
Johannes Schindelin | 2b4c6ef | 2014-12-16 23:46:59 +0100 | [diff] [blame] | 387 | BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1 |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 388 | ifndef DEBUG |
Karsten Blees | a08e803 | 2011-01-07 17:20:21 +0100 | [diff] [blame] | 389 | BASIC_CFLAGS += -GL -Os -MD |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 390 | BASIC_LDFLAGS += -LTCG |
| 391 | AR += -LTCG |
| 392 | else |
Karsten Blees | a08e803 | 2011-01-07 17:20:21 +0100 | [diff] [blame] | 393 | BASIC_CFLAGS += -Zi -MDd |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 394 | endif |
| 395 | X = .exe |
| 396 | endif |
| 397 | ifeq ($(uname_S),Interix) |
| 398 | NO_INITGROUPS = YesPlease |
| 399 | NO_IPV6 = YesPlease |
| 400 | NO_MEMMEM = YesPlease |
| 401 | NO_MKDTEMP = YesPlease |
| 402 | NO_STRTOUMAX = YesPlease |
| 403 | NO_NSEC = YesPlease |
| 404 | NO_MKSTEMPS = YesPlease |
| 405 | ifeq ($(uname_R),3.5) |
| 406 | NO_INET_NTOP = YesPlease |
| 407 | NO_INET_PTON = YesPlease |
| 408 | NO_SOCKADDR_STORAGE = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 409 | endif |
| 410 | ifeq ($(uname_R),5.2) |
| 411 | NO_INET_NTOP = YesPlease |
| 412 | NO_INET_PTON = YesPlease |
| 413 | NO_SOCKADDR_STORAGE = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 414 | endif |
| 415 | endif |
| 416 | ifeq ($(uname_S),Minix) |
| 417 | NO_IPV6 = YesPlease |
| 418 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
| 419 | NO_NSEC = YesPlease |
| 420 | NEEDS_LIBGEN = |
| 421 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 422 | NEEDS_IDN_WITH_CURL = YesPlease |
| 423 | NEEDS_SSL_WITH_CURL = YesPlease |
| 424 | NEEDS_RESOLV = |
| 425 | NO_HSTRERROR = YesPlease |
| 426 | NO_MMAP = YesPlease |
| 427 | NO_CURL = |
| 428 | NO_EXPAT = |
| 429 | endif |
| 430 | ifeq ($(uname_S),NONSTOP_KERNEL) |
| 431 | # Needs some C99 features, "inline" is just one of them. |
| 432 | # INLINE='' would just replace one set of warnings with another and |
| 433 | # still not compile in c89 mode, due to non-const array initializations. |
| 434 | CC = cc -c99 |
| 435 | # Disable all optimization, seems to result in bad code, with -O or -O2 |
| 436 | # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects |
| 437 | # abends on "git push". Needs more investigation. |
| 438 | CFLAGS = -g -O0 |
| 439 | # We'd want it to be here. |
| 440 | prefix = /usr/local |
| 441 | # Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl). |
| 442 | PERL_PATH = ${prefix}/bin/perl |
| 443 | PYTHON_PATH = ${prefix}/bin/python |
| 444 | |
| 445 | # As detected by './configure'. |
| 446 | # Missdetected, hence commented out, see below. |
| 447 | #NO_CURL = YesPlease |
| 448 | # Added manually, see above. |
| 449 | NEEDS_SSL_WITH_CURL = YesPlease |
| 450 | HAVE_LIBCHARSET_H = YesPlease |
| 451 | HAVE_STRINGS_H = YesPlease |
| 452 | NEEDS_LIBICONV = YesPlease |
| 453 | NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease |
| 454 | NO_SYS_SELECT_H = UnfortunatelyYes |
| 455 | NO_D_TYPE_IN_DIRENT = YesPlease |
| 456 | NO_HSTRERROR = YesPlease |
| 457 | NO_STRCASESTR = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 458 | NO_MEMMEM = YesPlease |
| 459 | NO_STRLCPY = YesPlease |
| 460 | NO_SETENV = YesPlease |
| 461 | NO_UNSETENV = YesPlease |
| 462 | NO_MKDTEMP = YesPlease |
| 463 | NO_MKSTEMPS = YesPlease |
| 464 | # Currently libiconv-1.9.1. |
| 465 | OLD_ICONV = UnfortunatelyYes |
| 466 | NO_REGEX = YesPlease |
| 467 | NO_PTHREADS = UnfortunatelyYes |
| 468 | |
| 469 | # Not detected (nor checked for) by './configure'. |
| 470 | # We don't have SA_RESTART on NonStop, unfortunalety. |
| 471 | COMPAT_CFLAGS += -DSA_RESTART=0 |
| 472 | # Apparently needed in compat/fnmatch/fnmatch.c. |
| 473 | COMPAT_CFLAGS += -DHAVE_STRING_H=1 |
| 474 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
| 475 | NO_NSEC = YesPlease |
| 476 | NO_PREAD = YesPlease |
| 477 | NO_MMAP = YesPlease |
| 478 | NO_POLL = YesPlease |
| 479 | NO_INTPTR_T = UnfortunatelyYes |
| 480 | # Bug report 10-120822-4477 submitted to HP NonStop development. |
| 481 | MKDIR_WO_TRAILING_SLASH = YesPlease |
| 482 | # RFE 10-120912-4693 submitted to HP NonStop development. |
| 483 | NO_SETITIMER = UnfortunatelyYes |
| 484 | SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin |
| 485 | SHELL_PATH = /usr/local/bin/bash |
| 486 | # as of H06.25/J06.14, we might better use this |
| 487 | #SHELL_PATH = /usr/coreutils/bin/bash |
| 488 | endif |
| 489 | ifneq (,$(findstring MINGW,$(uname_S))) |
| 490 | pathsep = ; |
Kirill Smelkov | 22f4c27 | 2014-04-09 16:48:27 +0400 | [diff] [blame] | 491 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 492 | NO_PREAD = YesPlease |
| 493 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 494 | NO_LIBGEN_H = YesPlease |
| 495 | NO_POLL = YesPlease |
| 496 | NO_SYMLINK_HEAD = YesPlease |
| 497 | NO_UNIX_SOCKETS = YesPlease |
| 498 | NO_SETENV = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 499 | NO_STRCASESTR = YesPlease |
| 500 | NO_STRLCPY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 501 | NO_MEMMEM = YesPlease |
| 502 | NEEDS_LIBICONV = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 503 | NO_STRTOUMAX = YesPlease |
| 504 | NO_MKDTEMP = YesPlease |
| 505 | NO_MKSTEMPS = YesPlease |
| 506 | NO_SVN_TESTS = YesPlease |
| 507 | NO_PERL_MAKEMAKER = YesPlease |
| 508 | RUNTIME_PREFIX = YesPlease |
| 509 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
| 510 | NO_NSEC = YesPlease |
| 511 | USE_WIN32_MMAP = YesPlease |
| 512 | USE_NED_ALLOCATOR = YesPlease |
| 513 | UNRELIABLE_FSTAT = UnfortunatelyYes |
| 514 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
| 515 | NO_REGEX = YesPlease |
| 516 | NO_PYTHON = YesPlease |
| 517 | BLK_SHA1 = YesPlease |
| 518 | ETAGS_TARGET = ETAGS |
| 519 | NO_INET_PTON = YesPlease |
| 520 | NO_INET_NTOP = YesPlease |
| 521 | NO_POSIX_GOODIES = UnfortunatelyYes |
Pat Thoyts | 65db044 | 2012-06-21 12:24:14 +0100 | [diff] [blame] | 522 | DEFAULT_HELP_FORMAT = html |
Karsten Blees | 1d94c40 | 2011-01-07 17:34:33 +0100 | [diff] [blame] | 523 | NO_D_INO_IN_DIRENT = YesPlease |
Sebastian Schuberth | fa93bb2 | 2013-09-11 18:02:09 +0200 | [diff] [blame] | 524 | COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32 |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 525 | COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" |
| 526 | COMPAT_OBJS += compat/mingw.o compat/winansi.o \ |
| 527 | compat/win32/pthread.o compat/win32/syslog.o \ |
| 528 | compat/win32/dirent.o |
Johannes Schindelin | 2b4c6ef | 2014-12-16 23:46:59 +0100 | [diff] [blame] | 529 | BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1 |
Pierre le Riche | fb99070 | 2012-05-28 09:46:54 +0200 | [diff] [blame] | 530 | BASIC_LDFLAGS += -Wl,--large-address-aware |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 531 | EXTLIBS += -lws2_32 |
Pat Thoyts | ce39c2e | 2012-05-24 00:56:24 +0100 | [diff] [blame] | 532 | GITLIBS += git.res |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 533 | PTHREAD_LIBS = |
Pat Thoyts | ce39c2e | 2012-05-24 00:56:24 +0100 | [diff] [blame] | 534 | RC = windres -O coff |
Jonathan Nieder | 95f31e9 | 2010-09-04 03:25:09 -0500 | [diff] [blame] | 535 | NATIVE_CRLF = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 536 | X = .exe |
| 537 | SPARSE_FLAGS = -Wno-one-bit-signed-bitfield |
| 538 | ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) |
| 539 | htmldir = doc/git/html/ |
| 540 | prefix = |
| 541 | INSTALL = /bin/install |
| 542 | EXTLIBS += /mingw/lib/libz.a |
| 543 | NO_R_TO_GCC_LINKER = YesPlease |
| 544 | INTERNAL_QSORT = YesPlease |
| 545 | HAVE_LIBCHARSET_H = YesPlease |
Johannes Schindelin | ca35487 | 2012-01-05 16:41:41 -0600 | [diff] [blame] | 546 | NO_GETTEXT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 547 | else |
| 548 | NO_CURL = YesPlease |
| 549 | endif |
| 550 | endif |
| 551 | ifeq ($(uname_S),QNX) |
| 552 | COMPAT_CFLAGS += -DSA_RESTART=0 |
Matt Kraai | 081fd8d | 2013-02-11 14:03:45 -0800 | [diff] [blame] | 553 | EXPAT_NEEDS_XMLPARSE_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 554 | HAVE_STRINGS_H = YesPlease |
| 555 | NEEDS_SOCKET = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 556 | NO_GETPAGESIZE = YesPlease |
| 557 | NO_ICONV = YesPlease |
| 558 | NO_MEMMEM = YesPlease |
| 559 | NO_MKDTEMP = YesPlease |
| 560 | NO_MKSTEMPS = YesPlease |
| 561 | NO_NSEC = YesPlease |
| 562 | NO_PTHREADS = YesPlease |
| 563 | NO_R_TO_GCC_LINKER = YesPlease |
| 564 | NO_STRCASESTR = YesPlease |
| 565 | NO_STRLCPY = YesPlease |
| 566 | endif |