]>
Commit | Line | Data |
---|---|---|
e1b6dbb5 JK |
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) | |
61f76a36 | 31 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
32 | NO_STRLCPY = YesPlease |
33 | NO_MKSTEMPS = YesPlease | |
34 | HAVE_PATHS_H = YesPlease | |
35 | LIBC_CONTAINS_LIBINTL = YesPlease | |
36 | HAVE_DEV_TTY = YesPlease | |
148d6771 | 37 | HAVE_CLOCK_GETTIME = YesPlease |
a6c3c638 | 38 | HAVE_CLOCK_MONOTONIC = YesPlease |
0cc30e0e | 39 | HAVE_GETDELIM = YesPlease |
71b40103 | 40 | SANE_TEXT_GREP=-a |
e1b6dbb5 JK |
41 | endif |
42 | ifeq ($(uname_S),GNU/kFreeBSD) | |
61f76a36 | 43 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
44 | NO_STRLCPY = YesPlease |
45 | NO_MKSTEMPS = YesPlease | |
46 | HAVE_PATHS_H = YesPlease | |
47 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease | |
48 | LIBC_CONTAINS_LIBINTL = YesPlease | |
49 | endif | |
50 | ifeq ($(uname_S),UnixWare) | |
51 | CC = cc | |
52 | NEEDS_SOCKET = YesPlease | |
53 | NEEDS_NSL = YesPlease | |
54 | NEEDS_SSL_WITH_CRYPTO = YesPlease | |
55 | NEEDS_LIBICONV = YesPlease | |
56 | SHELL_PATH = /usr/local/bin/bash | |
57 | NO_IPV6 = YesPlease | |
58 | NO_HSTRERROR = YesPlease | |
59 | NO_MKSTEMPS = YesPlease | |
60 | BASIC_CFLAGS += -Kthread | |
61 | BASIC_CFLAGS += -I/usr/local/include | |
62 | BASIC_LDFLAGS += -L/usr/local/lib | |
63 | INSTALL = ginstall | |
64 | TAR = gtar | |
65 | NO_STRCASESTR = YesPlease | |
66 | NO_MEMMEM = YesPlease | |
67 | endif | |
68 | ifeq ($(uname_S),SCO_SV) | |
69 | ifeq ($(uname_R),3.2) | |
70 | CFLAGS = -O2 | |
71 | endif | |
72 | ifeq ($(uname_R),5) | |
73 | CC = cc | |
74 | BASIC_CFLAGS += -Kthread | |
75 | endif | |
76 | NEEDS_SOCKET = YesPlease | |
77 | NEEDS_NSL = YesPlease | |
78 | NEEDS_SSL_WITH_CRYPTO = YesPlease | |
79 | NEEDS_LIBICONV = YesPlease | |
80 | SHELL_PATH = /usr/bin/bash | |
81 | NO_IPV6 = YesPlease | |
82 | NO_HSTRERROR = YesPlease | |
83 | NO_MKSTEMPS = YesPlease | |
84 | BASIC_CFLAGS += -I/usr/local/include | |
85 | BASIC_LDFLAGS += -L/usr/local/lib | |
86 | NO_STRCASESTR = YesPlease | |
87 | NO_MEMMEM = YesPlease | |
88 | INSTALL = ginstall | |
89 | TAR = gtar | |
90 | endif | |
91 | ifeq ($(uname_S),Darwin) | |
92 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
93 | NEEDS_SSL_WITH_CRYPTO = YesPlease | |
94 | NEEDS_LIBICONV = YesPlease | |
9eeff2f6 JH |
95 | # Note: $(uname_R) gives us the underlying Darwin version. |
96 | # - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.* | |
97 | # - MacOS 10.x.* = Darwin (x+4).* for (1 <= x) | |
98 | # i.e. "begins with [15678] and a dot" means "10.4.* or older". | |
e1b6dbb5 JK |
99 | ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) |
100 | OLD_ICONV = UnfortunatelyYes | |
9c7a0bee | 101 | NO_APPLE_COMMON_CRYPTO = YesPlease |
e1b6dbb5 JK |
102 | endif |
103 | ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) | |
104 | NO_STRLCPY = YesPlease | |
105 | endif | |
4e368785 ES |
106 | ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1) |
107 | HAVE_GETDELIM = YesPlease | |
108 | endif | |
e1b6dbb5 JK |
109 | NO_MEMMEM = YesPlease |
110 | USE_ST_TIMESPEC = YesPlease | |
111 | HAVE_DEV_TTY = YesPlease | |
112 | COMPAT_OBJS += compat/precompose_utf8.o | |
113 | BASIC_CFLAGS += -DPRECOMPOSE_UNICODE | |
a42643aa | 114 | BASIC_CFLAGS += -DPROTECT_HFS_DEFAULT=1 |
9529080d | 115 | HAVE_BSD_SYSCTL = YesPlease |
e1b6dbb5 JK |
116 | endif |
117 | ifeq ($(uname_S),SunOS) | |
118 | NEEDS_SOCKET = YesPlease | |
119 | NEEDS_NSL = YesPlease | |
120 | SHELL_PATH = /bin/bash | |
121 | SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin | |
61f76a36 | 122 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
123 | NO_STRCASESTR = YesPlease |
124 | NO_MEMMEM = YesPlease | |
125 | NO_MKDTEMP = YesPlease | |
126 | NO_MKSTEMPS = YesPlease | |
127 | NO_REGEX = YesPlease | |
e1b6dbb5 JK |
128 | NO_MSGFMT_EXTENDED_OPTIONS = YesPlease |
129 | HAVE_DEV_TTY = YesPlease | |
130 | ifeq ($(uname_R),5.6) | |
131 | SOCKLEN_T = int | |
132 | NO_HSTRERROR = YesPlease | |
133 | NO_IPV6 = YesPlease | |
134 | NO_SOCKADDR_STORAGE = YesPlease | |
135 | NO_UNSETENV = YesPlease | |
136 | NO_SETENV = YesPlease | |
137 | NO_STRLCPY = YesPlease | |
138 | NO_STRTOUMAX = YesPlease | |
139 | GIT_TEST_CMP = cmp | |
140 | endif | |
141 | ifeq ($(uname_R),5.7) | |
142 | NEEDS_RESOLV = YesPlease | |
143 | NO_IPV6 = YesPlease | |
144 | NO_SOCKADDR_STORAGE = YesPlease | |
145 | NO_UNSETENV = YesPlease | |
146 | NO_SETENV = YesPlease | |
147 | NO_STRLCPY = YesPlease | |
148 | NO_STRTOUMAX = YesPlease | |
149 | GIT_TEST_CMP = cmp | |
150 | endif | |
151 | ifeq ($(uname_R),5.8) | |
152 | NO_UNSETENV = YesPlease | |
153 | NO_SETENV = YesPlease | |
154 | NO_STRTOUMAX = YesPlease | |
155 | GIT_TEST_CMP = cmp | |
156 | endif | |
157 | ifeq ($(uname_R),5.9) | |
158 | NO_UNSETENV = YesPlease | |
159 | NO_SETENV = YesPlease | |
160 | NO_STRTOUMAX = YesPlease | |
161 | GIT_TEST_CMP = cmp | |
162 | endif | |
163 | INSTALL = /usr/ucb/install | |
164 | TAR = gtar | |
61f76a36 | 165 | BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ |
e1b6dbb5 JK |
166 | endif |
167 | ifeq ($(uname_O),Cygwin) | |
168 | ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) | |
169 | NO_D_TYPE_IN_DIRENT = YesPlease | |
e1b6dbb5 JK |
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 | |
f593ef77 ML |
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 | |
92f63d2b ML |
180 | else |
181 | NO_REGEX = UnfortunatelyYes | |
e1b6dbb5 | 182 | endif |
61f76a36 | 183 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
184 | NEEDS_LIBICONV = YesPlease |
185 | NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes | |
e1b6dbb5 | 186 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
e1b6dbb5 | 187 | X = .exe |
e1b6dbb5 JK |
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 | |
66547547 | 206 | GMTIME_UNRELIABLE_ERRORS = UnfortunatelyYes |
9529080d | 207 | HAVE_BSD_SYSCTL = YesPlease |
e1b6dbb5 JK |
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 | |
9529080d | 217 | HAVE_BSD_SYSCTL = YesPlease |
92164af9 BS |
218 | endif |
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 | |
9529080d | 225 | HAVE_BSD_SYSCTL = YesPlease |
e1b6dbb5 JK |
226 | endif |
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 | |
9529080d | 236 | HAVE_BSD_SYSCTL = YesPlease |
e1b6dbb5 JK |
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 | |
61f76a36 | 262 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
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 | |
e1b6dbb5 JK |
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 | |
e1b6dbb5 JK |
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 | |
e1b6dbb5 JK |
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 = ; | |
61f76a36 | 337 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
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 | |
e1b6dbb5 JK |
346 | NO_STRCASESTR = YesPlease |
347 | NO_STRLCPY = YesPlease | |
e1b6dbb5 JK |
348 | NO_MEMMEM = YesPlease |
349 | # NEEDS_LIBICONV = YesPlease | |
350 | NO_ICONV = YesPlease | |
351 | NO_STRTOUMAX = YesPlease | |
e1b6dbb5 JK |
352 | NO_MKDTEMP = YesPlease |
353 | NO_MKSTEMPS = YesPlease | |
354 | SNPRINTF_RETURNS_BOGUS = YesPlease | |
355 | NO_SVN_TESTS = YesPlease | |
e1b6dbb5 JK |
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 | |
bad866a2 | 364 | NO_GETTEXT = YesPlease |
e1b6dbb5 JK |
365 | NO_PYTHON = YesPlease |
366 | BLK_SHA1 = YesPlease | |
e0492c5b | 367 | ETAGS_TARGET = ETAGS |
4ab75274 RJ |
368 | NO_INET_PTON = YesPlease |
369 | NO_INET_NTOP = YesPlease | |
e1b6dbb5 JK |
370 | NO_POSIX_GOODIES = UnfortunatelyYes |
371 | NATIVE_CRLF = YesPlease | |
372 | DEFAULT_HELP_FORMAT = html | |
373 | ||
374 | CC = compat/vcbuild/scripts/clink.pl | |
375 | AR = compat/vcbuild/scripts/lib.pl | |
376 | CFLAGS = | |
377 | 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 | |
378 | COMPAT_OBJS = compat/msvc.o compat/winansi.o \ | |
379 | compat/win32/pthread.o compat/win32/syslog.o \ | |
380 | compat/win32/dirent.o | |
61f76a36 | 381 | COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" |
a08e803d | 382 | BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE |
4b623d80 | 383 | EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj |
e1b6dbb5 JK |
384 | PTHREAD_LIBS = |
385 | lib = | |
2b4c6efc | 386 | BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1 |
e1b6dbb5 | 387 | ifndef DEBUG |
a08e803d | 388 | BASIC_CFLAGS += -GL -Os -MD |
e1b6dbb5 JK |
389 | BASIC_LDFLAGS += -LTCG |
390 | AR += -LTCG | |
391 | else | |
a08e803d | 392 | BASIC_CFLAGS += -Zi -MDd |
e1b6dbb5 JK |
393 | endif |
394 | X = .exe | |
395 | endif | |
396 | ifeq ($(uname_S),Interix) | |
397 | NO_INITGROUPS = YesPlease | |
398 | NO_IPV6 = YesPlease | |
399 | NO_MEMMEM = YesPlease | |
400 | NO_MKDTEMP = YesPlease | |
401 | NO_STRTOUMAX = YesPlease | |
402 | NO_NSEC = YesPlease | |
403 | NO_MKSTEMPS = YesPlease | |
404 | ifeq ($(uname_R),3.5) | |
405 | NO_INET_NTOP = YesPlease | |
406 | NO_INET_PTON = YesPlease | |
407 | NO_SOCKADDR_STORAGE = YesPlease | |
e1b6dbb5 JK |
408 | endif |
409 | ifeq ($(uname_R),5.2) | |
410 | NO_INET_NTOP = YesPlease | |
411 | NO_INET_PTON = YesPlease | |
412 | NO_SOCKADDR_STORAGE = YesPlease | |
e1b6dbb5 JK |
413 | endif |
414 | endif | |
415 | ifeq ($(uname_S),Minix) | |
416 | NO_IPV6 = YesPlease | |
417 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease | |
418 | NO_NSEC = YesPlease | |
419 | NEEDS_LIBGEN = | |
420 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
421 | NEEDS_IDN_WITH_CURL = YesPlease | |
422 | NEEDS_SSL_WITH_CURL = YesPlease | |
423 | NEEDS_RESOLV = | |
424 | NO_HSTRERROR = YesPlease | |
425 | NO_MMAP = YesPlease | |
426 | NO_CURL = | |
427 | NO_EXPAT = | |
428 | endif | |
429 | ifeq ($(uname_S),NONSTOP_KERNEL) | |
430 | # Needs some C99 features, "inline" is just one of them. | |
431 | # INLINE='' would just replace one set of warnings with another and | |
432 | # still not compile in c89 mode, due to non-const array initializations. | |
433 | CC = cc -c99 | |
434 | # Disable all optimization, seems to result in bad code, with -O or -O2 | |
435 | # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects | |
436 | # abends on "git push". Needs more investigation. | |
437 | CFLAGS = -g -O0 | |
438 | # We'd want it to be here. | |
439 | prefix = /usr/local | |
440 | # Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl). | |
441 | PERL_PATH = ${prefix}/bin/perl | |
442 | PYTHON_PATH = ${prefix}/bin/python | |
443 | ||
444 | # As detected by './configure'. | |
445 | # Missdetected, hence commented out, see below. | |
446 | #NO_CURL = YesPlease | |
447 | # Added manually, see above. | |
448 | NEEDS_SSL_WITH_CURL = YesPlease | |
449 | HAVE_LIBCHARSET_H = YesPlease | |
450 | HAVE_STRINGS_H = YesPlease | |
451 | NEEDS_LIBICONV = YesPlease | |
452 | NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease | |
453 | NO_SYS_SELECT_H = UnfortunatelyYes | |
454 | NO_D_TYPE_IN_DIRENT = YesPlease | |
455 | NO_HSTRERROR = YesPlease | |
456 | NO_STRCASESTR = YesPlease | |
e1b6dbb5 JK |
457 | NO_MEMMEM = YesPlease |
458 | NO_STRLCPY = YesPlease | |
459 | NO_SETENV = YesPlease | |
460 | NO_UNSETENV = YesPlease | |
461 | NO_MKDTEMP = YesPlease | |
462 | NO_MKSTEMPS = YesPlease | |
463 | # Currently libiconv-1.9.1. | |
464 | OLD_ICONV = UnfortunatelyYes | |
465 | NO_REGEX = YesPlease | |
466 | NO_PTHREADS = UnfortunatelyYes | |
467 | ||
468 | # Not detected (nor checked for) by './configure'. | |
469 | # We don't have SA_RESTART on NonStop, unfortunalety. | |
470 | COMPAT_CFLAGS += -DSA_RESTART=0 | |
471 | # Apparently needed in compat/fnmatch/fnmatch.c. | |
472 | COMPAT_CFLAGS += -DHAVE_STRING_H=1 | |
473 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease | |
474 | NO_NSEC = YesPlease | |
475 | NO_PREAD = YesPlease | |
476 | NO_MMAP = YesPlease | |
477 | NO_POLL = YesPlease | |
478 | NO_INTPTR_T = UnfortunatelyYes | |
479 | # Bug report 10-120822-4477 submitted to HP NonStop development. | |
480 | MKDIR_WO_TRAILING_SLASH = YesPlease | |
481 | # RFE 10-120912-4693 submitted to HP NonStop development. | |
482 | NO_SETITIMER = UnfortunatelyYes | |
483 | SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin | |
484 | SHELL_PATH = /usr/local/bin/bash | |
485 | # as of H06.25/J06.14, we might better use this | |
486 | #SHELL_PATH = /usr/coreutils/bin/bash | |
487 | endif | |
488 | ifneq (,$(findstring MINGW,$(uname_S))) | |
489 | pathsep = ; | |
22f4c27e | 490 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
491 | NO_PREAD = YesPlease |
492 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
493 | NO_LIBGEN_H = YesPlease | |
494 | NO_POLL = YesPlease | |
495 | NO_SYMLINK_HEAD = YesPlease | |
496 | NO_UNIX_SOCKETS = YesPlease | |
497 | NO_SETENV = YesPlease | |
e1b6dbb5 JK |
498 | NO_STRCASESTR = YesPlease |
499 | NO_STRLCPY = YesPlease | |
e1b6dbb5 JK |
500 | NO_MEMMEM = YesPlease |
501 | NEEDS_LIBICONV = YesPlease | |
e1b6dbb5 JK |
502 | NO_STRTOUMAX = YesPlease |
503 | NO_MKDTEMP = YesPlease | |
504 | NO_MKSTEMPS = YesPlease | |
505 | NO_SVN_TESTS = YesPlease | |
506 | NO_PERL_MAKEMAKER = YesPlease | |
507 | RUNTIME_PREFIX = YesPlease | |
508 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease | |
509 | NO_NSEC = YesPlease | |
510 | USE_WIN32_MMAP = YesPlease | |
511 | USE_NED_ALLOCATOR = YesPlease | |
512 | UNRELIABLE_FSTAT = UnfortunatelyYes | |
513 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo | |
514 | NO_REGEX = YesPlease | |
515 | NO_PYTHON = YesPlease | |
516 | BLK_SHA1 = YesPlease | |
517 | ETAGS_TARGET = ETAGS | |
518 | NO_INET_PTON = YesPlease | |
519 | NO_INET_NTOP = YesPlease | |
520 | NO_POSIX_GOODIES = UnfortunatelyYes | |
65db0443 | 521 | DEFAULT_HELP_FORMAT = html |
7b40ae86 | 522 | COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32 |
e1b6dbb5 JK |
523 | COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" |
524 | COMPAT_OBJS += compat/mingw.o compat/winansi.o \ | |
525 | compat/win32/pthread.o compat/win32/syslog.o \ | |
526 | compat/win32/dirent.o | |
2b4c6efc | 527 | BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1 |
e1b6dbb5 | 528 | EXTLIBS += -lws2_32 |
ce39c2e0 | 529 | GITLIBS += git.res |
e1b6dbb5 | 530 | PTHREAD_LIBS = |
ce39c2e0 | 531 | RC = windres -O coff |
95f31e9a | 532 | NATIVE_CRLF = YesPlease |
e1b6dbb5 JK |
533 | X = .exe |
534 | SPARSE_FLAGS = -Wno-one-bit-signed-bitfield | |
535 | ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) | |
536 | htmldir = doc/git/html/ | |
537 | prefix = | |
538 | INSTALL = /bin/install | |
539 | EXTLIBS += /mingw/lib/libz.a | |
540 | NO_R_TO_GCC_LINKER = YesPlease | |
541 | INTERNAL_QSORT = YesPlease | |
542 | HAVE_LIBCHARSET_H = YesPlease | |
ca354871 | 543 | NO_GETTEXT = YesPlease |
df5218b4 | 544 | COMPAT_CLFAGS += -D__USE_MINGW_ACCESS |
e1b6dbb5 | 545 | else |
df5218b4 JS |
546 | ifeq ($(shell expr "$(uname_R)" : '2\.'),2) |
547 | # MSys2 | |
7b40ae86 JS |
548 | prefix = /usr/ |
549 | ifeq (MINGW32,$(MSYSTEM)) | |
550 | prefix = /mingw32 | |
551 | endif | |
552 | ifeq (MINGW64,$(MSYSTEM)) | |
553 | prefix = /mingw64 | |
554 | else | |
555 | COMPAT_CFLAGS += -D_USE_32BIT_TIME_T | |
556 | BASIC_LDFLAGS += -Wl,--large-address-aware | |
557 | endif | |
df5218b4 | 558 | CC = gcc |
df5218b4 JS |
559 | COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 |
560 | INSTALL = /bin/install | |
561 | NO_R_TO_GCC_LINKER = YesPlease | |
562 | INTERNAL_QSORT = YesPlease | |
563 | HAVE_LIBCHARSET_H = YesPlease | |
f9206ce2 | 564 | NO_GETTEXT = |
b640b77f | 565 | USE_GETTEXT_SCHEME = fallthrough |
df5218b4 JS |
566 | USE_LIBPCRE= YesPlease |
567 | NO_CURL = | |
568 | USE_NED_ALLOCATOR = YesPlease | |
569 | else | |
570 | COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO | |
571 | NO_CURL = YesPlease | |
572 | endif | |
e1b6dbb5 JK |
573 | endif |
574 | endif | |
575 | ifeq ($(uname_S),QNX) | |
576 | COMPAT_CFLAGS += -DSA_RESTART=0 | |
081fd8d0 | 577 | EXPAT_NEEDS_XMLPARSE_H = YesPlease |
e1b6dbb5 JK |
578 | HAVE_STRINGS_H = YesPlease |
579 | NEEDS_SOCKET = YesPlease | |
e1b6dbb5 JK |
580 | NO_GETPAGESIZE = YesPlease |
581 | NO_ICONV = YesPlease | |
582 | NO_MEMMEM = YesPlease | |
583 | NO_MKDTEMP = YesPlease | |
584 | NO_MKSTEMPS = YesPlease | |
585 | NO_NSEC = YesPlease | |
586 | NO_PTHREADS = YesPlease | |
587 | NO_R_TO_GCC_LINKER = YesPlease | |
588 | NO_STRCASESTR = YesPlease | |
589 | NO_STRLCPY = YesPlease | |
590 | endif |