Commit | Line | Data |
---|---|---|
1e71036e | 1 | # |
b6c85593 | 2 | # Makefile to build perl on Windows using DMAKE. |
1e71036e | 3 | # Supported compilers: |
b6c85593 | 4 | # Microsoft Visual C++ 6.0 or later |
8a217c9a SH |
5 | # MinGW with gcc-3.4.5 or later with runtime < 3.21 |
6 | # MinGW64 with gcc-4.4.3 or later | |
2a46176f | 7 | # Windows SDK 64-bit compiler and tools |
1e71036e JH |
8 | # |
9 | # This is set up to build a perl.exe that runs off a shared library | |
d361a1e6 | 10 | # (perl529.dll). Also makes individual DLLs for the XS extensions. |
1e71036e JH |
11 | # |
12 | ||
13 | ## | |
14 | ## Make sure you read README.win32 *before* you mess with anything here! | |
15 | ## | |
16 | ||
3ed51be3 SH |
17 | # |
18 | # Import everything from the environment like NMAKE does. | |
19 | # | |
20 | .IMPORT : .EVERYTHING | |
21 | ||
1e71036e JH |
22 | ## |
23 | ## Build configuration. Edit the values below to suit your needs. | |
24 | ## | |
25 | ||
26 | # | |
27 | # Set these to wherever you want "dmake install" to put your | |
28 | # newly built perl. | |
29 | # | |
30 | INST_DRV *= c: | |
31 | INST_TOP *= $(INST_DRV)\perl | |
32 | ||
33 | # | |
b86e806e JD |
34 | # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler |
35 | # on a 64-bit version of Windows. | |
890b5089 | 36 | # |
b86e806e JD |
37 | #WIN64 *= undef |
38 | ||
39 | # | |
1e71036e JH |
40 | # Comment this out if you DON'T want your perl installation to be versioned. |
41 | # This means that the new installation will overwrite any files from the | |
42 | # old installation at the same INST_TOP location. Leaving it enabled is | |
43 | # the safest route, as perl adds the extra version directory to all the | |
44 | # locations it installs files to. If you disable it, an alternative | |
45 | # versioned installation can be obtained by setting INST_TOP above to a | |
46 | # path that includes an arbitrary version string. | |
47 | # | |
1bfbad52 | 48 | #INST_VER *= \5.29.6 |
1e71036e JH |
49 | |
50 | # | |
51 | # Comment this out if you DON'T want your perl installation to have | |
52 | # architecture specific components. This means that architecture- | |
53 | # specific files will be installed along with the architecture-neutral | |
54 | # files. Leaving it enabled is safer and more flexible, in case you | |
55 | # want to build multiple flavors of perl and install them together in | |
56 | # the same location. Commenting it out gives you a simpler | |
57 | # installation that is easier to understand for beginners. | |
58 | # | |
ec25c072 | 59 | #INST_ARCH *= \$(ARCHNAME) |
1e71036e JH |
60 | |
61 | # | |
7ada00a0 SH |
62 | # Uncomment this if you want perl to run |
63 | # $Config{sitelibexp}\sitecustomize.pl | |
64 | # before anything else. This script can then be set up, for example, | |
65 | # to add additional entries to @INC. | |
66 | # | |
67 | #USE_SITECUST *= define | |
68 | ||
69 | # | |
4fef8ef3 SH |
70 | # uncomment to enable multiple interpreters. This is needed for fork() |
71 | # emulation and for thread support, and is auto-enabled by USE_IMP_SYS | |
72 | # and USE_ITHREADS below. | |
1e71036e JH |
73 | # |
74 | USE_MULTI *= define | |
75 | ||
76 | # | |
2cbbe5a1 | 77 | # Interpreter cloning/threads; now reasonably complete. |
4fef8ef3 SH |
78 | # This should be enabled to get the fork() emulation. This needs (and |
79 | # will auto-enable) USE_MULTI above. | |
1e71036e JH |
80 | # |
81 | USE_ITHREADS *= define | |
82 | ||
83 | # | |
84 | # uncomment to enable the implicit "host" layer for all system calls | |
4fef8ef3 SH |
85 | # made by perl. This is also needed to get fork(). This needs (and |
86 | # will auto-enable) USE_MULTI above. | |
1e71036e JH |
87 | # |
88 | USE_IMP_SYS *= define | |
89 | ||
90 | # | |
4a9d6100 GS |
91 | # Comment this out if you don't want to enable large file support for |
92 | # some reason. Should normally only be changed to maintain compatibility | |
93 | # with an older release of perl. | |
890b5089 | 94 | # |
bdb4cb88 | 95 | USE_LARGE_FILES *= define |
1e71036e JH |
96 | |
97 | # | |
1f64ae15 SH |
98 | # Uncomment this if you're building a 32-bit perl and want 64-bit integers. |
99 | # (If you're building a 64-bit perl then you will have 64-bit integers whether | |
100 | # or not this is uncommented.) | |
38aa66aa | 101 | # Note: This option is not supported in 32-bit MSVC60 builds. |
890b5089 | 102 | # |
1f64ae15 SH |
103 | #USE_64_BIT_INT *= define |
104 | ||
105 | # | |
890b5089 SH |
106 | # Uncomment this if you want to support the use of long doubles in GCC builds. |
107 | # This option is not supported for MSVC builds. | |
108 | # | |
f019f33b SH |
109 | #USE_LONG_DOUBLE *= define |
110 | ||
111 | # | |
112 | # Uncomment this if you want to build perl with __USE_MINGW_ANSI_STDIO defined. | |
113 | # (If you're building perl with USE_LONG_DOUBLE defined then | |
114 | # __USE_MINGW_ANSI_STDIO will be defined whether or not this is uncommented.) | |
115 | # This option is not supported for MSVC builds. | |
116 | # | |
117 | #USE_MINGW_ANSI_STDIO *= define | |
890b5089 SH |
118 | |
119 | # | |
458ea8f7 SH |
120 | # Comment this out if you want the legacy default behavior of including '.' at |
121 | # the end of @INC. | |
122 | # | |
123 | DEFAULT_INC_EXCLUDES_DOT *= define | |
124 | ||
125 | # | |
6937817d DD |
126 | # Uncomment this if you want to disable looking up values from |
127 | # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in | |
128 | # the Registry. | |
129 | # | |
f019f33b | 130 | #USE_NO_REGISTRY *= define |
6937817d DD |
131 | |
132 | # | |
1e71036e JH |
133 | # uncomment exactly one of the following |
134 | # | |
b2e53f8c | 135 | # Visual C++ 6.0 (aka Visual C++ 98) |
e2736246 | 136 | #CCTYPE *= MSVC60 |
b2e53f8c | 137 | # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version) |
5398666e | 138 | #CCTYPE *= MSVC70 |
b2e53f8c | 139 | # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools) |
da2c7419 | 140 | #CCTYPE *= MSVC70FREE |
b969270a | 141 | # Windows Server 2003 SP1 Platform SDK (April 2005) (64-bit compiler and tools) |
2a46176f | 142 | #CCTYPE = SDK2003SP1 |
3aa3d69a | 143 | # Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition) |
1c847d4b | 144 | #CCTYPE *= MSVC80 |
3aa3d69a | 145 | # Visual C++ 2008 (aka Visual C++ 9.0) (full version or Express Edition) |
4a3cf07b | 146 | #CCTYPE *= MSVC90 |
3aa3d69a | 147 | # Visual C++ 2010 (aka Visual C++ 10.0) (full version or Express Edition) |
2a46176f | 148 | #CCTYPE = MSVC100 |
3aa3d69a | 149 | # Visual C++ 2012 (aka Visual C++ 11.0) (full version or Express Edition) |
5398666e | 150 | #CCTYPE = MSVC110 |
3aa3d69a | 151 | # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition) |
3e7c2d43 | 152 | #CCTYPE = MSVC120 |
3aa3d69a | 153 | # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition) |
1f664ef5 | 154 | #CCTYPE = MSVC140 |
3aa3d69a | 155 | # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition) |
82cad144 | 156 | #CCTYPE = MSVC141 |
bf537ce6 | 157 | # MinGW or mingw-w64 with gcc-3.4.5 or later |
ca30c090 | 158 | #CCTYPE = GCC |
1e71036e JH |
159 | |
160 | # | |
c8180b06 TC |
161 | # If you are using GCC, 4.3 or later by default we add the -fwrapv option. |
162 | # See https://rt.perl.org/Ticket/Display.html?id=121505 | |
163 | # | |
164 | #GCCWRAPV *= define | |
165 | ||
166 | # | |
a2b08671 SH |
167 | # If you are using Intel C++ Compiler uncomment this |
168 | # | |
169 | #__ICC *= define | |
170 | ||
171 | # | |
f9bbfafd SH |
172 | # Uncomment this if you want to build everything in C++ mode |
173 | # | |
174 | #USE_CPLUSPLUS *= define | |
175 | ||
176 | # | |
31c916d2 | 177 | # uncomment next line if you want debug version of perl (big/slow) |
1e71036e JH |
178 | # If not enabled, we automatically try to use maximum optimization |
179 | # with all compilers that are known to have a working optimizer. | |
180 | # | |
31c916d2 SH |
181 | # You can also set CFG = DebugSymbols for a slightly smaller/faster |
182 | # debug build without the special debugging code in perl which is | |
183 | # enabled via -DDEBUGGING; | |
184 | # | |
185 | # or you can set CFG = DebugFull for an even fuller (bigger/slower) | |
186 | # debug build using the debug version of the CRT, and enabling VC++ | |
187 | # debug features such as extra assertions and invalid parameter warnings | |
188 | # in perl and CRT code via -D_DEBUG. (Note that the invalid parameter | |
189 | # handler does get triggered from time to time in this configuration, | |
190 | # which causes warnings to be printed on STDERR, which in turn causes a | |
191 | # few tests to fail.) (This configuration is only available for VC++ builds.) | |
192 | # | |
2cbbe5a1 | 193 | #CFG *= Debug |
1e71036e JH |
194 | |
195 | # | |
1e71036e JH |
196 | # uncomment to enable linking with setargv.obj under the Visual C |
197 | # compiler. Setting this options enables perl to expand wildcards in | |
198 | # arguments, but it may be harder to use alternate methods like | |
199 | # File::DosGlob that are more powerful. This option is supported only with | |
200 | # Visual C. | |
201 | # | |
202 | #USE_SETARGV *= define | |
203 | ||
204 | # | |
1e71036e JH |
205 | # set this if you wish to use perl's malloc |
206 | # WARNING: Turning this on/off WILL break binary compatibility with extensions | |
207 | # you may have compiled with/without it. Be prepared to recompile all | |
208 | # extensions if you change the default. Currently, this cannot be enabled | |
209 | # if you ask for USE_IMP_SYS above. | |
210 | # | |
c800dd8b | 211 | #PERL_MALLOC *= define |
8bcd5811 VK |
212 | |
213 | # | |
214 | # set this to enable debugging mstats | |
215 | # This must be enabled to use the Devel::Peek::mstat() function. This cannot | |
216 | # be enabled without PERL_MALLOC as well. | |
217 | # | |
646e33b6 | 218 | #DEBUG_MSTATS *= define |
1e71036e JH |
219 | |
220 | # | |
ed2eab3f SH |
221 | # set this to additionally provide a statically linked perl-static.exe. |
222 | # Note that dynamic loading will not work with this perl, so you must | |
a1f2e719 | 223 | # include required modules statically using the STATIC_EXT or ALL_STATIC |
d361a1e6 | 224 | # variables below. A static library perl529s.lib will also be created. |
ed2eab3f SH |
225 | # Ordinary perl.exe is not affected by this option. |
226 | # | |
227 | #BUILD_STATIC *= define | |
228 | ||
229 | # | |
a1f2e719 | 230 | # in addition to BUILD_STATIC the option ALL_STATIC makes *every* |
d6444ca0 | 231 | # extension get statically built. |
a1f2e719 VK |
232 | # This will result in a very large perl executable, but the main purpose |
233 | # is to have proper linking set so as to be able to create miscellaneous | |
cd17fa28 | 234 | # executables with different built-in extensions. It implies BUILD_STATIC. |
a1f2e719 VK |
235 | # |
236 | #ALL_STATIC *= define | |
237 | ||
238 | # | |
74102a88 SH |
239 | # set the install location of the compiler |
240 | # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using | |
241 | # Visual C++. | |
1e71036e | 242 | # |
8f5d02f0 TC |
243 | # For GCC builds this should be the directory containing the bin, include, |
244 | # lib directories for your compiler. | |
245 | # | |
f82c7fdb DD |
246 | |
247 | #CCHOME *= C:\MinGW | |
1e71036e JH |
248 | |
249 | # | |
fa58a56f S |
250 | # uncomment this if you are using x86_64-w64-mingw32 cross-compiler |
251 | # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc' | |
252 | # instead of the usual 'gcc'. | |
253 | # | |
254 | #GCCCROSS *= define | |
255 | ||
256 | # | |
1e71036e JH |
257 | # Additional compiler flags can be specified here. |
258 | # | |
2e30e1e1 | 259 | BUILDOPT *= $(BUILDOPTEXTRA) |
1e71036e JH |
260 | |
261 | # | |
1e71036e JH |
262 | # This should normally be disabled. Enabling it will disable the File::Glob |
263 | # implementation of CORE::glob. | |
264 | # | |
265 | #BUILDOPT += -DPERL_EXTERNAL_GLOB | |
266 | ||
267 | # | |
270ca148 JD |
268 | # Perl needs to read scripts in text mode so that the DATA filehandle |
269 | # works correctly with seek() and tell(), or around auto-flushes of | |
270 | # all filehandles (e.g. by system(), backticks, fork(), etc). | |
bdb4cb88 | 271 | # |
270ca148 JD |
272 | # The current version on the ByteLoader module on CPAN however only |
273 | # works if scripts are read in binary mode. But before you disable text | |
274 | # mode script reading (and break some DATA filehandle functionality) | |
275 | # please check first if an updated ByteLoader isn't available on CPAN. | |
276 | # | |
277 | BUILDOPT += -DPERL_TEXTMODE_SCRIPTS | |
1e71036e JH |
278 | |
279 | # | |
280 | # specify semicolon-separated list of extra directories that modules will | |
281 | # look for libraries (spaces in path names need not be quoted) | |
282 | # | |
283 | EXTRALIBDIRS *= | |
284 | ||
285 | # | |
286 | # set this to point to cmd.exe (only needed if you use some | |
287 | # alternate shell that doesn't grok cmd.exe style commands) | |
288 | # | |
289 | #SHELL *= g:\winnt\system32\cmd.exe | |
290 | ||
291 | # | |
292 | # set this to your email address (perl will guess a value from | |
293 | # from your loginname and your hostname, which may not be right) | |
294 | # | |
295 | #EMAIL *= | |
296 | ||
297 | ## | |
298 | ## Build configuration ends. | |
299 | ## | |
300 | ||
301 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### | |
302 | ||
1e71036e | 303 | PERL_MALLOC *= undef |
646e33b6 | 304 | DEBUG_MSTATS *= undef |
1e71036e | 305 | |
7ada00a0 | 306 | USE_SITECUST *= undef |
1e71036e | 307 | USE_MULTI *= undef |
1e71036e JH |
308 | USE_ITHREADS *= undef |
309 | USE_IMP_SYS *= undef | |
4a9d6100 | 310 | USE_LARGE_FILES *= undef |
1f64ae15 | 311 | USE_64_BIT_INT *= undef |
890b5089 | 312 | USE_LONG_DOUBLE *= undef |
458ea8f7 | 313 | DEFAULT_INC_EXCLUDES_DOT *= undef |
6937817d | 314 | USE_NO_REGISTRY *= undef |
1e71036e | 315 | |
f82c7fdb | 316 | |
646e33b6 | 317 | .IF "$(USE_IMP_SYS)" == "define" |
8bcd5811 | 318 | PERL_MALLOC = undef |
8bcd5811 VK |
319 | .ENDIF |
320 | ||
646e33b6 SH |
321 | .IF "$(PERL_MALLOC)" == "undef" |
322 | DEBUG_MSTATS = undef | |
8bcd5811 VK |
323 | .ENDIF |
324 | ||
325 | .IF "$(DEBUG_MSTATS)" == "define" | |
646e33b6 | 326 | BUILDOPT += -DPERL_DEBUGGING_MSTATS |
c800dd8b SH |
327 | .ENDIF |
328 | ||
66e09d83 | 329 | .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef" |
1e71036e JH |
330 | USE_MULTI != define |
331 | .ENDIF | |
332 | ||
66e09d83 | 333 | .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef" |
1e71036e | 334 | USE_MULTI != define |
1e71036e JH |
335 | .ENDIF |
336 | ||
7ada00a0 SH |
337 | .IF "$(USE_SITECUST)" == "define" |
338 | BUILDOPT += -DUSE_SITECUSTOMIZE | |
339 | .ENDIF | |
340 | ||
3db8f154 | 341 | .IF "$(USE_MULTI)" != "undef" |
1e71036e JH |
342 | BUILDOPT += -DPERL_IMPLICIT_CONTEXT |
343 | .ENDIF | |
344 | ||
345 | .IF "$(USE_IMP_SYS)" != "undef" | |
346 | BUILDOPT += -DPERL_IMPLICIT_SYS | |
347 | .ENDIF | |
348 | ||
6937817d DD |
349 | .IF "$(USE_NO_REGISTRY)" != "undef" |
350 | BUILDOPT += -DWIN32_NO_REGISTRY | |
351 | .ENDIF | |
352 | ||
91584c7a SH |
353 | .IF "$(CCTYPE)" == "GCC" |
354 | GCCTARGET := $(shell gcc -dumpmachine & exit /b 0) | |
355 | .ENDIF | |
356 | ||
ca30c090 DD |
357 | #no explicit CCTYPE given, do auto detection |
358 | .IF "$(CCTYPE)" == "" | |
b2029beb | 359 | GCCTARGET := $(shell gcc -dumpmachine 2>NUL & exit /b 0) |
ca30c090 DD |
360 | #do we have a GCC? |
361 | .IF "$(GCCTARGET)" != "" | |
362 | CCTYPE = GCC | |
f82c7fdb | 363 | .ELSE |
b2029beb DD |
364 | WIN64 := $(shell for /f "tokens=3 delims=.^ " \ |
365 | %i in ('cl ^2^>^&1') do @if "%i" == "32-bit" echo undef) | |
366 | #major version of CL has diff position based on 32 vs 64 | |
367 | #Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64 | |
368 | #Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86 | |
ca30c090 | 369 | #use var to capture 1st line only, not 8th token of lines 2 & 3 in cl.exe output |
b2029beb DD |
370 | .IF "$(WIN64)" == "undef" |
371 | MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=8,9 delims=.^ " \ | |
372 | %i in ('cl ^2^>^&1') do @if not defined MSVCVER if %i% geq 19 \ | |
373 | (set /A "MSVCVER=((%i-5)*10)+(%j/10)") \ | |
374 | else (set /A "MSVCVER=(%i-6)*10"))) | |
375 | .ELSE | |
376 | MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=7,8 delims=.^ " \ | |
377 | %i in ('cl ^2^>^&1') do @if not defined MSVCVER if %i% geq 19 \ | |
378 | (set /A "MSVCVER=((%i-5)*10)+(%j/10)") \ | |
379 | else (set /A "MSVCVER=(%i-6)*10"))) | |
380 | .ENDIF | |
381 | #autodetect failed, reset to empty string | |
382 | .IF "$(MSVCVER)" == "-50" | |
383 | CCTYPE := | |
384 | .ELSE | |
385 | CCTYPE := MSVC$(MSVCVER) | |
386 | .ENDIF | |
f82c7fdb DD |
387 | .ENDIF |
388 | .ENDIF | |
389 | ||
74102a88 SH |
390 | # Versions of Visual C++ up to VC++ 7.1 define $(MSVCDir); versions since then |
391 | # define $(VCINSTALLDIR) instead, but for VC++ 14.1 we need the subfolder given | |
392 | # by $(VCToolsInstallDir). | |
f82c7fdb DD |
393 | .IF "$(CCHOME)" == "" |
394 | .IF "$(CCTYPE)" == "GCC" | |
395 | CCHOME *= C:\MinGW | |
74102a88 SH |
396 | .ELIF "$(CCTYPE)" == "MSVC60" || \ |
397 | "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE" | |
398 | CCHOME *= $(MSVCDir) | |
399 | .ELIF "$(CCTYPE)" == "MSVC141" | |
400 | CCHOME *= $(VCToolsInstallDir) | |
f82c7fdb | 401 | .ELSE |
74102a88 | 402 | CCHOME *= $(VCINSTALLDIR) |
f82c7fdb | 403 | .ENDIF |
f82c7fdb | 404 | .ENDIF |
ca30c090 | 405 | |
1e71036e JH |
406 | PROCESSOR_ARCHITECTURE *= x86 |
407 | ||
3bdc51af DD |
408 | .IF "$(WIN64)" == "undef" |
409 | PROCESSOR_ARCHITECTURE = x86 | |
410 | .ENDIF | |
411 | ||
c623ac67 | 412 | .IF "$(WIN64)" == "" |
bf2a35e5 JD |
413 | # When we are running from a 32bit cmd.exe on AMD64 then |
414 | # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432 | |
415 | # is set to AMD64 | |
c623ac67 | 416 | .IF "$(PROCESSOR_ARCHITEW6432)" != "" |
e9948054 | 417 | PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432) |
c623ac67 | 418 | WIN64 = define |
bf2a35e5 | 419 | .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64" |
c623ac67 GS |
420 | WIN64 = define |
421 | .ELSE | |
422 | WIN64 = undef | |
423 | .ENDIF | |
424 | .ENDIF | |
425 | ||
1f64ae15 SH |
426 | .IF "$(WIN64)" == "define" |
427 | USE_64_BIT_INT = define | |
428 | .ENDIF | |
429 | ||
2a46176f SH |
430 | # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because |
431 | # both link against MSVCRT.dll (which is part of Windows itself) and | |
432 | # not against a compiler specific versioned runtime. | |
433 | .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60" | |
434 | CCTYPE = SDK2003SP1 | |
435 | .ENDIF | |
436 | ||
38aa66aa SH |
437 | # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler |
438 | # does not support it. | |
439 | .IF "$(CCTYPE)" == "MSVC60" | |
440 | USE_64_BIT_INT != undef | |
441 | .ENDIF | |
442 | ||
890b5089 SH |
443 | # Disable the long double option for MSVC builds since that compiler |
444 | # does not support it. | |
445 | .IF "$(CCTYPE)" != "GCC" | |
446 | USE_LONG_DOUBLE != undef | |
447 | .ENDIF | |
448 | ||
bf2a35e5 JD |
449 | ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) |
450 | .IF "$(ARCHITECTURE)" == "AMD64" | |
451 | ARCHITECTURE = x64 | |
9453ddcd | 452 | .ENDIF |
bf2a35e5 JD |
453 | .IF "$(ARCHITECTURE)" == "IA64" |
454 | ARCHITECTURE = ia64 | |
9453ddcd SH |
455 | .ENDIF |
456 | ||
3db8f154 | 457 | .IF "$(USE_MULTI)" == "define" |
bf2a35e5 | 458 | ARCHNAME = MSWin32-$(ARCHITECTURE)-multi |
1e71036e | 459 | .ELSE |
bf2a35e5 | 460 | ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio |
43d4c9a3 SH |
461 | .ENDIF |
462 | ||
1e71036e JH |
463 | .IF "$(USE_ITHREADS)" == "define" |
464 | ARCHNAME !:= $(ARCHNAME)-thread | |
465 | .ENDIF | |
466 | ||
1f64ae15 SH |
467 | .IF "$(WIN64)" != "define" |
468 | .IF "$(USE_64_BIT_INT)" == "define" | |
469 | ARCHNAME !:= $(ARCHNAME)-64int | |
470 | .ENDIF | |
471 | .ENDIF | |
472 | ||
10a51195 S |
473 | .IF "$(USE_LONG_DOUBLE)" == "define" |
474 | ARCHNAME !:= $(ARCHNAME)-ld | |
475 | .ENDIF | |
476 | ||
74102a88 SH |
477 | # Set the install location of the compiler headers/libraries. |
478 | # These are saved into $Config{incpath} and $Config{libpth}. | |
479 | .IF "$(GCCCROSS)" == "define" | |
480 | CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include | |
481 | CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib | |
6f669bf5 SH |
482 | .ELIF "$(CCTYPE)" == "GCC" |
483 | CCINCDIR *= $(CCHOME)\include | |
484 | CCLIBDIR *= $(CCHOME)\lib | |
74102a88 SH |
485 | .ELSE |
486 | CCINCDIR *= $(CCHOME)\include | |
487 | .IF "$(CCTYPE)" == "MSVC141" | |
488 | .IF "$(WIN64)" == "define" | |
489 | CCLIBDIR *= $(CCHOME)\lib\x64 | |
490 | .ELSE | |
491 | CCLIBDIR *= $(CCHOME)\lib\x86 | |
492 | .ENDIF | |
493 | .ELSE | |
6f669bf5 SH |
494 | .IF "$(WIN64)" == "define" |
495 | CCLIBDIR *= $(CCHOME)\lib\amd64 | |
496 | .ELSE | |
74102a88 SH |
497 | CCLIBDIR *= $(CCHOME)\lib |
498 | .ENDIF | |
499 | .ENDIF | |
6f669bf5 | 500 | .ENDIF |
74102a88 SH |
501 | |
502 | # Set DLL location for GCC compilers. | |
503 | .IF "$(CCTYPE)" == "GCC" | |
504 | .IF "$(GCCCROSS)" == "define" | |
505 | CCDLLDIR *= $(CCLIBDIR) | |
506 | .ELSE | |
507 | CCDLLDIR *= $(CCHOME)\bin | |
508 | .ENDIF | |
509 | .ENDIF | |
510 | ||
1e71036e JH |
511 | ARCHDIR = ..\lib\$(ARCHNAME) |
512 | COREDIR = ..\lib\CORE | |
513 | AUTODIR = ..\lib\auto | |
514 | LIBDIR = ..\lib | |
515 | EXTDIR = ..\ext | |
a193a2db | 516 | DISTDIR = ..\dist |
83d5895a | 517 | CPANDIR = ..\cpan |
1e71036e | 518 | PODDIR = ..\pod |
b4a41557 | 519 | HTMLDIR = .\html |
1e71036e | 520 | |
1e71036e JH |
521 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin |
522 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) | |
523 | INST_LIB = $(INST_TOP)$(INST_VER)\lib | |
524 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) | |
525 | INST_COREDIR = $(INST_ARCHLIB)\CORE | |
1e71036e JH |
526 | INST_HTML = $(INST_TOP)$(INST_VER)\html |
527 | ||
528 | # | |
529 | # Programs to compile, build .lib files and link | |
530 | # | |
531 | ||
532 | .USESHELL : | |
533 | ||
c8180b06 TC |
534 | MINIBUILDOPT *= |
535 | ||
378eeda7 | 536 | .IF "$(CCTYPE)" == "GCC" |
1e71036e | 537 | |
fa58a56f S |
538 | .IF "$(GCCCROSS)" == "define" |
539 | ARCHPREFIX = x86_64-w64-mingw32- | |
540 | .ENDIF | |
541 | ||
542 | CC = $(ARCHPREFIX)gcc | |
543 | LINK32 = $(ARCHPREFIX)g++ | |
544 | LIB32 = $(ARCHPREFIX)ar rc | |
545 | IMPLIB = $(ARCHPREFIX)dlltool | |
546 | RSC = $(ARCHPREFIX)windres | |
1e71036e | 547 | |
f019f33b | 548 | .IF "$(USE_LONG_DOUBLE)" == "define" || "$(USE_MINGW_ANSI_STDIO)" == "define" |
890b5089 SH |
549 | BUILDOPT += -D__USE_MINGW_ANSI_STDIO |
550 | MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO | |
551 | .ENDIF | |
552 | ||
b2029beb DD |
553 | GCCVER1:= $(shell for /f "delims=. tokens=1,2,3" %i in ('gcc -dumpversion') do @echo %i) |
554 | GCCVER2:= $(shell for /f "delims=. tokens=1,2,3" %i in ('gcc -dumpversion') do @echo %j) | |
555 | GCCVER3:= $(shell for /f "delims=. tokens=1,2,3" %i in ('gcc -dumpversion') do @echo %k) | |
556 | ||
557 | # If you are using GCC, 4.3 or later by default we add the -fwrapv option. | |
558 | # See https://rt.perl.org/Ticket/Display.html?id=121505 | |
559 | # | |
560 | GCCWRAPV *= $(shell if "$(GCCVER1)"=="4" (if "$(GCCVER2)" geq "3" echo define) else if "$(GCCVER1)" geq "5" (echo define)) | |
c8180b06 TC |
561 | |
562 | .IF "$(GCCWRAPV)" == "define" | |
563 | BUILDOPT += -fwrapv | |
564 | MINIBUILDOPT += -fwrapv | |
565 | .ENDIF | |
566 | ||
1e71036e JH |
567 | i = .i |
568 | o = .o | |
569 | a = .a | |
570 | ||
571 | # | |
572 | # Options | |
573 | # | |
574 | ||
d89ea360 | 575 | INCLUDES = -I.\include -I. -I.. |
9cef8306 | 576 | DEFINES = -DWIN32 |
fa58a56f S |
577 | .IF "$(WIN64)" == "define" |
578 | DEFINES += -DWIN64 -DCONSERVATIVE | |
579 | .ENDIF | |
1e71036e | 580 | LOCDEFS = -DPERLDLL -DPERL_CORE |
1e71036e JH |
581 | CXX_FLAG = -xc++ |
582 | ||
679b67fe JD |
583 | # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link |
584 | # correctly if -lmsvcrt is specified explicitly. | |
585 | LIBC = | |
586 | #LIBC = -lmsvcrt | |
1e71036e JH |
587 | |
588 | # same libs as MSVC | |
1545a179 DD |
589 | LIBFILES = $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \ |
590 | -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \ | |
591 | -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 | |
1e71036e JH |
592 | |
593 | .IF "$(CFG)" == "Debug" | |
594 | OPTIMIZE = -g -O2 -DDEBUGGING | |
595 | LINK_DBG = -g | |
31c916d2 SH |
596 | .ELIF "$(CFG)" == "DebugSymbols" |
597 | OPTIMIZE = -g -O2 | |
598 | LINK_DBG = -g | |
1e71036e | 599 | .ELSE |
ec25c072 SH |
600 | OPTIMIZE = -s -O2 |
601 | LINK_DBG = -s | |
1e71036e JH |
602 | .ENDIF |
603 | ||
bb275e72 | 604 | EXTRACFLAGS = |
f9bbfafd SH |
605 | .IF "$(USE_CPLUSPLUS)" == "define" |
606 | EXTRACFLAGS += $(CXX_FLAG) | |
607 | .ENDIF | |
fdb5f000 | 608 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) |
1e71036e JH |
609 | LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" |
610 | OBJOUT_FLAG = -o | |
611 | EXEOUT_FLAG = -o | |
612 | LIBOUT_FLAG = | |
3bdc51af | 613 | PDBOUT = |
1e71036e | 614 | |
9b1f1815 | 615 | BUILDOPT += -fno-strict-aliasing -mms-bitfields |
c0388966 | 616 | MINIBUILDOPT += -fno-strict-aliasing |
1e71036e | 617 | |
bd8b97a1 TC |
618 | TESTPREPGCC = test-prep-gcc |
619 | ||
1e71036e JH |
620 | .ELSE |
621 | ||
b2e53f8c | 622 | # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test |
5398666e SH |
623 | # suite run in about 10% less time. |
624 | .IF "$(CCTYPE)" != "MSVC70FREE" | |
6937817d DD |
625 | # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA |
626 | # which is rare to execute | |
627 | .IF "$(USE_NO_REGISTRY)" != "undef" | |
628 | DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib | |
629 | MINIDELAYLOAD = | |
630 | .ELSE | |
5398666e | 631 | DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib |
6937817d DD |
632 | #miniperl never does any registry lookups |
633 | MINIDELAYLOAD = -DELAYLOAD:advapi32.dll | |
634 | .ENDIF | |
5398666e SH |
635 | .ENDIF |
636 | ||
b2e53f8c | 637 | # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and |
5398666e SH |
638 | # DLLs. These either need copying everywhere with the binaries, or else need |
639 | # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For | |
640 | # simplicity, embed them if they exist (and delete them afterwards so that they | |
641 | # don't get installed too). | |
642 | EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \ | |
643 | if exist $@.manifest del $@.manifest | |
644 | EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \ | |
645 | if exist $@.manifest del $@.manifest | |
646 | ||
647 | # Most relevant compiler-specific options fall into two groups: | |
648 | # either pre-MSVC80 or MSVC80 onwards, so define a macro for this. | |
649 | .IF "$(CCTYPE)" == "MSVC60" || \ | |
650 | "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE" | |
651 | PREMSVC80 = define | |
652 | .ELSE | |
653 | PREMSVC80 = undef | |
654 | .ENDIF | |
655 | ||
a2b08671 | 656 | .IF "$(__ICC)" != "define" |
1e71036e JH |
657 | CC = cl |
658 | LINK32 = link | |
a2b08671 SH |
659 | .ELSE |
660 | CC = icl | |
661 | LINK32 = xilink | |
662 | .ENDIF | |
1e71036e JH |
663 | LIB32 = $(LINK32) -lib |
664 | RSC = rc | |
665 | ||
666 | # | |
667 | # Options | |
668 | # | |
669 | ||
d89ea360 | 670 | INCLUDES = -I.\include -I. -I.. |
1e71036e | 671 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX |
9cef8306 | 672 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT |
1e71036e | 673 | LOCDEFS = -DPERLDLL -DPERL_CORE |
a7d225ec | 674 | CXX_FLAG = -TP -EHsc |
1e71036e | 675 | |
3aa3d69a | 676 | .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" |
1f664ef5 SH |
677 | LIBC = ucrt.lib |
678 | .ELSE | |
31c916d2 | 679 | LIBC = msvcrt.lib |
1f664ef5 | 680 | .ENDIF |
1e71036e | 681 | |
1e71036e | 682 | .IF "$(CFG)" == "Debug" |
2a46176f | 683 | OPTIMIZE = -Od -MD -Zi -DDEBUGGING |
c623ac67 | 684 | LINK_DBG = -debug |
31c916d2 SH |
685 | .ELIF "$(CFG)" == "DebugSymbols" |
686 | OPTIMIZE = -Od -MD -Zi | |
687 | LINK_DBG = -debug | |
688 | .ELIF "$(CFG)" == "DebugFull" | |
3aa3d69a | 689 | .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" |
1f664ef5 SH |
690 | LIBC = ucrtd.lib |
691 | .ELSE | |
31c916d2 | 692 | LIBC = msvcrtd.lib |
1f664ef5 | 693 | .ENDIF |
31c916d2 SH |
694 | OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING |
695 | LINK_DBG = -debug | |
1e71036e | 696 | .ELSE |
00a13560 SH |
697 | # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64 |
698 | OPTIMIZE = -O1 -MD -Zi -DNDEBUG | |
ec25c072 SH |
699 | # we enable debug symbols in release builds also |
700 | LINK_DBG = -debug -opt:ref,icf | |
701 | # you may want to enable this if you want COFF symbols in the executables | |
702 | # in addition to the PDB symbols. The default Dr. Watson that ships with | |
703 | # Windows can use the the former but not latter. The free WinDbg can be | |
704 | # installed to get better stack traces from just the PDB symbols, so we | |
705 | # avoid the bloat of COFF symbols by default. | |
706 | #LINK_DBG = $(LINK_DBG) -debugtype:both | |
a9e3f359 | 707 | .IF "$(CCTYPE)" != "MSVC60" |
d921a5fb | 708 | # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) |
00a13560 | 709 | OPTIMIZE += -GL |
d921a5fb | 710 | LINK_DBG += -ltcg |
a9e3f359 | 711 | LIB_FLAGS = -ltcg |
1e71036e | 712 | .ENDIF |
1e71036e JH |
713 | .ENDIF |
714 | ||
c623ac67 GS |
715 | .IF "$(WIN64)" == "define" |
716 | DEFINES += -DWIN64 -DCONSERVATIVE | |
2a46176f | 717 | OPTIMIZE += -fp:precise |
da2c7419 | 718 | .ENDIF |
c5b31784 | 719 | |
b2e53f8c | 720 | # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions |
4a3cf07b | 721 | # and POSIX CRT function names being deprecated. |
5398666e | 722 | .IF "$(PREMSVC80)" == "undef" |
26a6faa8 | 723 | DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE |
c5b31784 | 724 | .ENDIF |
da2c7419 | 725 | |
3aa3d69a SH |
726 | # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now. |
727 | .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" | |
fe7ba591 | 728 | DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS |
1f664ef5 SH |
729 | .ENDIF |
730 | ||
b79cd7df SH |
731 | # The Windows Server 2003 SP1 SDK compiler only defines _configthreadlocale() if |
732 | # _MT is defined, i.e. when using /MT (the LIBCMT.lib version of the CRT), which | |
733 | # the perl build doesn't use. We therefore specify NO_THREAD_SAFE_LOCALE so that | |
734 | # perl.h doesn't set USE_THREAD_SAFE_LOCALE, which it otherwise would do since | |
735 | # _MSC_VER is 1400 for this compiler (as per MSVC80). | |
736 | .IF "$(CCTYPE)" == "SDK2003SP1" | |
737 | DEFINES += -DNO_THREAD_SAFE_LOCALE | |
738 | .ENDIF | |
739 | ||
2a46176f SH |
740 | # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to |
741 | # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T | |
742 | # preprocessor option to revert back to the old functionality for | |
743 | # backward compatibility. We define this symbol here for older 32-bit | |
744 | # compilers only (which aren't using it at all) for the sole purpose | |
745 | # of getting it into $Config{ccflags}. That way if someone builds | |
746 | # Perl itself with e.g. VC6 but later installs an XS module using VC8 | |
747 | # the time_t types will still be compatible. | |
748 | .IF "$(WIN64)" == "undef" | |
5398666e | 749 | .IF "$(PREMSVC80)" == "define" |
2a46176f SH |
750 | BUILDOPT += -D_USE_32BIT_TIME_T |
751 | .ENDIF | |
752 | .ENDIF | |
753 | ||
1545a179 DD |
754 | LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ |
755 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ | |
756 | netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \ | |
757 | odbc32.lib odbccp32.lib comctl32.lib | |
c623ac67 | 758 | |
3aa3d69a | 759 | .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" |
1f664ef5 SH |
760 | .IF "$(CFG)" == "DebugFull" |
761 | LIBBASEFILES += msvcrtd.lib vcruntimed.lib | |
762 | .ELSE | |
763 | LIBBASEFILES += msvcrt.lib vcruntime.lib | |
764 | .ENDIF | |
765 | .ENDIF | |
766 | ||
a2b08671 SH |
767 | # Avoid __intel_new_proc_init link error for libircmt. |
768 | # libmmd is /MD equivelent, other variants exist. | |
769 | # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99, | |
770 | # and optimized C89 funcs | |
771 | .IF "$(__ICC)" == "define" | |
772 | LIBBASEFILES += libircmt.lib libmmd.lib | |
773 | .ENDIF | |
774 | ||
b969270a | 775 | # The Windows Server 2003 SP1 SDK compiler links against MSVCRT.dll, which |
2a46176f | 776 | # doesn't include the buffer overrun verification code used by the /GS switch. |
9453ddcd | 777 | # Since the code links against libraries that are compiled with /GS, this |
2a46176f | 778 | # "security cookie verification" code must be included via bufferoverflow.lib. |
b969270a | 779 | .IF "$(CCTYPE)" == "SDK2003SP1" |
d5415745 | 780 | LIBBASEFILES += bufferoverflowU.lib |
c623ac67 | 781 | .ENDIF |
1e71036e | 782 | |
1e71036e JH |
783 | LIBFILES = $(LIBBASEFILES) $(LIBC) |
784 | ||
9453ddcd | 785 | EXTRACFLAGS = -nologo -GF -W3 |
312159d9 | 786 | .IF "$(__ICC)" == "define" |
f9bbfafd SH |
787 | EXTRACFLAGS += -Qstd=c99 |
788 | .ENDIF | |
789 | .IF "$(USE_CPLUSPLUS)" == "define" | |
790 | EXTRACFLAGS += $(CXX_FLAG) | |
312159d9 | 791 | .ENDIF |
bb275e72 | 792 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
1e71036e JH |
793 | $(PCHFLAGS) $(OPTIMIZE) |
794 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ | |
795 | -libpath:"$(INST_COREDIR)" \ | |
796 | -machine:$(PROCESSOR_ARCHITECTURE) | |
3bdc51af | 797 | LIB_FLAGS += -nologo |
1e71036e JH |
798 | OBJOUT_FLAG = -Fo |
799 | EXEOUT_FLAG = -Fe | |
800 | LIBOUT_FLAG = /out: | |
3bdc51af | 801 | PDBOUT = -Fd$*.pdb |
bd8b97a1 TC |
802 | TESTPREPGCC = |
803 | ||
1e71036e JH |
804 | .ENDIF |
805 | ||
1e71036e JH |
806 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) |
807 | ||
5398666e | 808 | .IF "$(PREMSVC80)" == "undef" |
67c6176d | 809 | PRIV_LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" |
4ebea3c6 JD |
810 | .ELSE |
811 | RSC_FLAGS = -DINCLUDE_MANIFEST | |
812 | .ENDIF | |
813 | ||
82cad144 | 814 | # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates) |
4ebea3c6 | 815 | |
b2e53f8c SH |
816 | # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm |
817 | # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building | |
269713a1 DD |
818 | # Console vs GUI makes no difference for DLLs, so use default for cleaner |
819 | # building cmd lines | |
3aa3d69a | 820 | .IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC140" |
269713a1 DD |
821 | .IF "$(WIN64)" == "define" |
822 | LINK_FLAGS += -subsystem:console,"5.02" | |
823 | .ELSE | |
824 | LINK_FLAGS += -subsystem:console,"5.01" | |
825 | .ENDIF | |
269713a1 | 826 | |
268da237 | 827 | .ELIF "$(CCTYPE)" != "GCC" |
67c6176d | 828 | PRIV_LINK_FLAGS += -subsystem:console |
269713a1 DD |
829 | .ENDIF |
830 | ||
1e71036e JH |
831 | BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) |
832 | ||
833 | #################### do not edit below this line ####################### | |
834 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## | |
835 | ||
13631a73 SH |
836 | # Some old dmakes (including Sarathy's one at |
837 | # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip) | |
838 | # don't support logical OR (||) or logical AND (&&) in conditional | |
839 | # expressions and hence don't process this makefile correctly. Determine | |
840 | # whether this is the case so that we can give the user an error message. | |
841 | .IF 1 == 1 || 1 == 1 | |
842 | NEWDMAKE = define | |
66e09d83 | 843 | .ELSE |
13631a73 | 844 | NEWDMAKE = undef |
e54e7e92 SH |
845 | .ENDIF |
846 | ||
1e71036e JH |
847 | o *= .obj |
848 | a *= .lib | |
849 | ||
850 | LKPRE = INPUT ( | |
851 | LKPOST = ) | |
852 | ||
853 | # | |
854 | # Rules | |
855 | # | |
856 | ||
857 | .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res | |
858 | ||
859 | .c$(o): | |
3bdc51af | 860 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) $< |
1e71036e JH |
861 | |
862 | .c.i: | |
863 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@ | |
864 | ||
865 | .y.c: | |
866 | $(NOOP) | |
867 | ||
868 | $(o).dll: | |
378eeda7 | 869 | .IF "$(CCTYPE)" == "GCC" |
1e71036e JH |
870 | $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES) |
871 | $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@ | |
872 | .ELSE | |
269713a1 | 873 | $(LINK32) -dll -implib:$(*B).lib -def:$(*B).def \ |
1e71036e | 874 | -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL) |
c8e599d3 | 875 | $(EMBED_DLL_MANI) |
1e71036e JH |
876 | .ENDIF |
877 | ||
878 | .rc.res: | |
770c139a | 879 | .IF "$(CCTYPE)" == "GCC" |
4ebea3c6 | 880 | $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@ |
770c139a | 881 | .ELSE |
4ebea3c6 | 882 | $(RSC) -i.. -DINCLUDE_MANIFEST $< |
770c139a | 883 | .ENDIF |
1e71036e JH |
884 | |
885 | # | |
886 | # various targets | |
3bdc51af DD |
887 | |
888 | #do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL) | |
889 | #$(MINIPERL) is not a buildable target, use "dmake mp" if you want to just build | |
890 | #miniperl alone | |
1e71036e | 891 | MINIPERL = ..\miniperl.exe |
3bdc51af | 892 | HAVEMINIPERL = ..\lib\buildcustomize.pl |
1e71036e JH |
893 | MINIDIR = .\mini |
894 | PERLEXE = ..\perl.exe | |
895 | WPERLEXE = ..\wperl.exe | |
ed2eab3f | 896 | PERLEXESTATIC = ..\perl-static.exe |
cc0b589a | 897 | STATICDIR = .\static.tmp |
1e71036e | 898 | GLOBEXE = ..\perlglob.exe |
3bdc51af | 899 | CONFIGPM = ..\lib\Config.pm |
202d1001 | 900 | GENUUDMAP = ..\generate_uudmap.exe |
eb4420e6 | 901 | .IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define" |
ed2eab3f SH |
902 | PERLSTATIC = static |
903 | .ELSE | |
904 | PERLSTATIC = | |
905 | .ENDIF | |
1e71036e | 906 | |
ca12659b | 907 | # Unicode data files generated by mktables |
3df51b85 | 908 | UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \ |
7ebf06b3 | 909 | ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \ |
1a234f2b | 910 | ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \ |
3e344d15 | 911 | ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst |
ca12659b NC |
912 | |
913 | # Directories of Unicode data files generated by mktables | |
27a8011f SH |
914 | UNIDATADIR1 = ..\lib\unicore\To |
915 | UNIDATADIR2 = ..\lib\unicore\lib | |
ca12659b | 916 | |
4ebea3c6 | 917 | PERLEXE_MANIFEST= .\perlexe.manifest |
3890b58f RGS |
918 | PERLEXE_ICO = .\perlexe.ico |
919 | PERLEXE_RES = .\perlexe.res | |
920 | PERLDLL_RES = | |
921 | ||
1e71036e JH |
922 | # Nominate a target which causes extensions to be re-built |
923 | # This used to be $(PERLEXE), but at worst it is the .dll that they depend | |
924 | # on and really only the interface - i.e. the .def file used to export symbols | |
925 | # from the .dll | |
3bdc51af | 926 | PERLDEP = $(PERLIMPLIB) |
1e71036e JH |
927 | |
928 | ||
929 | PL2BAT = bin\pl2bat.pl | |
1e71036e JH |
930 | |
931 | UTILS = \ | |
932 | ..\utils\h2ph \ | |
933 | ..\utils\splain \ | |
1e71036e JH |
934 | ..\utils\perlbug \ |
935 | ..\utils\pl2pm \ | |
1e71036e JH |
936 | ..\utils\h2xs \ |
937 | ..\utils\perldoc \ | |
1e71036e JH |
938 | ..\utils\perlivp \ |
939 | ..\utils\libnetcfg \ | |
827a599d | 940 | ..\utils\enc2xs \ |
bf543eaf | 941 | ..\utils\encguess \ |
827a599d | 942 | ..\utils\piconv \ |
18a1cebe | 943 | ..\utils\corelist \ |
83cd6e83 | 944 | ..\utils\cpan \ |
ea0e987d | 945 | ..\utils\xsubpp \ |
d658129c | 946 | ..\utils\pod2html \ |
4b618757 | 947 | ..\utils\prove \ |
291d3373 | 948 | ..\utils\ptar \ |
b8669316 | 949 | ..\utils\ptardiff \ |
deabda19 | 950 | ..\utils\ptargrep \ |
08ad9465 | 951 | ..\utils\zipdetails \ |
3ddf9550 | 952 | ..\utils\shasum \ |
ea0e987d | 953 | ..\utils\instmodsh \ |
84f04405 | 954 | ..\utils\json_pp \ |
1e71036e JH |
955 | bin\exetype.pl \ |
956 | bin\runperl.pl \ | |
957 | bin\pl2bat.pl \ | |
958 | bin\perlglob.pl \ | |
959 | bin\search.pl | |
960 | ||
378eeda7 | 961 | .IF "$(CCTYPE)" == "GCC" |
1e71036e JH |
962 | |
963 | CFGSH_TMPL = config.gc | |
964 | CFGH_TMPL = config_H.gc | |
d361a1e6 S |
965 | PERLIMPLIB = $(COREDIR)\libperl529$(a) |
966 | PERLSTATICLIB = ..\libperl529s$(a) | |
1f64ae15 | 967 | INT64 = long long |
1e71036e JH |
968 | |
969 | .ELSE | |
970 | ||
971 | CFGSH_TMPL = config.vc | |
972 | CFGH_TMPL = config_H.vc | |
1f64ae15 | 973 | INT64 = __int64 |
1e71036e JH |
974 | |
975 | .ENDIF | |
976 | ||
977 | # makedef.pl must be updated if this changes, and this should normally | |
978 | # only change when there is an incompatible revision of the public API. | |
d361a1e6 S |
979 | PERLIMPLIB *= $(COREDIR)\perl529$(a) |
980 | PERLEXPLIB *= $(COREDIR)\perl529.exp | |
981 | PERLSTATICLIB *= ..\perl529s$(a) | |
982 | PERLDLL = ..\perl529.dll | |
983 | PERLDLLBASE = perl529.dll | |
1e71036e | 984 | |
3bdc51af DD |
985 | #EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel |
986 | #$(MAKE) will contain the -P that this makefile was called with, which is bad for | |
987 | #make_ext.pl since upto jobs*jobs processes will run instead of jobs | |
988 | #also any recipie containing $(MAKE) is special cased by dmake to execute recipes | |
989 | #containing $(MAKE) when "dmake -n" is executed, which causes recursive calls | |
990 | #to dmake, which means "dmake -n" is then broken as a diagnostic tool since | |
991 | #"dmake -n" will invoke all the make_ext.pl scripts build things instead of | |
992 | #showing what to build since $(MAKE) is an arg to make_ext.pl, not an invocation | |
993 | #of the dmake process | |
994 | PLMAKE = dmake | |
995 | ||
b6ed7314 YO |
996 | XCOPY = xcopy /f /r /i /d /y |
997 | RCOPY = xcopy /f /r /i /e /d /y | |
65980d94 | 998 | NOOP = @rem |
1e71036e | 999 | |
d89ea360 DD |
1000 | #first ones are arrange in compile time order for faster parallel building |
1001 | #see #123867 for details | |
1e71036e | 1002 | MICROCORE_SRC = \ |
d89ea360 DD |
1003 | ..\toke.c \ |
1004 | ..\regcomp.c \ | |
1005 | ..\regexec.c \ | |
1006 | ..\op.c \ | |
1007 | ..\sv.c \ | |
1008 | ..\pp.c \ | |
1009 | ..\pp_ctl.c \ | |
1010 | ..\pp_sys.c \ | |
1011 | ..\pp_pack.c \ | |
1012 | ..\pp_hot.c \ | |
1013 | ..\gv.c \ | |
1014 | ..\perl.c \ | |
1015 | ..\utf8.c \ | |
1016 | ..\dump.c \ | |
1017 | ..\hv.c \ | |
1e71036e | 1018 | ..\av.c \ |
0f8f167c | 1019 | ..\caretx.c \ |
1e71036e JH |
1020 | ..\deb.c \ |
1021 | ..\doio.c \ | |
1022 | ..\doop.c \ | |
a55c5245 | 1023 | ..\dquote.c \ |
1e71036e | 1024 | ..\globals.c \ |
8b371338 | 1025 | ..\mro_core.c \ |
1e71036e | 1026 | ..\locale.c \ |
26ea9e12 | 1027 | ..\keywords.c \ |
a0d89a74 | 1028 | ..\mathoms.c \ |
1e71036e JH |
1029 | ..\mg.c \ |
1030 | ..\numeric.c \ | |
ff6de8cd | 1031 | ..\pad.c \ |
1e71036e JH |
1032 | ..\perlapi.c \ |
1033 | ..\perly.c \ | |
84d4ea48 | 1034 | ..\pp_sort.c \ |
10bc17b6 | 1035 | ..\reentr.c \ |
1e71036e JH |
1036 | ..\run.c \ |
1037 | ..\scope.c \ | |
1e71036e | 1038 | ..\taint.c \ |
f832b29a | 1039 | ..\time64.c \ |
1e71036e | 1040 | ..\universal.c \ |
48462a74 | 1041 | ..\util.c |
1e71036e JH |
1042 | |
1043 | EXTRACORE_SRC += perllib.c | |
1044 | ||
1045 | .IF "$(PERL_MALLOC)" == "define" | |
1046 | EXTRACORE_SRC += ..\malloc.c | |
1047 | .ENDIF | |
1048 | ||
1e71036e | 1049 | EXTRACORE_SRC += ..\perlio.c |
1e71036e JH |
1050 | |
1051 | WIN32_SRC = \ | |
1052 | .\win32.c \ | |
8c847e66 | 1053 | .\win32io.c \ |
1e71036e | 1054 | .\win32sck.c \ |
9cef8306 JD |
1055 | .\win32thread.c \ |
1056 | .\fcrypt.c | |
1e71036e | 1057 | |
1e71036e JH |
1058 | CORE_NOCFG_H = \ |
1059 | ..\av.h \ | |
1060 | ..\cop.h \ | |
1061 | ..\cv.h \ | |
1062 | ..\dosish.h \ | |
1063 | ..\embed.h \ | |
1064 | ..\form.h \ | |
1065 | ..\gv.h \ | |
1066 | ..\handy.h \ | |
1067 | ..\hv.h \ | |
15128012 | 1068 | ..\hv_func.h \ |
1e71036e JH |
1069 | ..\iperlsys.h \ |
1070 | ..\mg.h \ | |
1071 | ..\nostdio.h \ | |
1072 | ..\op.h \ | |
1073 | ..\opcode.h \ | |
1074 | ..\perl.h \ | |
1075 | ..\perlapi.h \ | |
1076 | ..\perlsdio.h \ | |
1e71036e JH |
1077 | ..\perly.h \ |
1078 | ..\pp.h \ | |
1079 | ..\proto.h \ | |
cdb0f547 | 1080 | ..\regcomp.h \ |
1e71036e JH |
1081 | ..\regexp.h \ |
1082 | ..\scope.h \ | |
1083 | ..\sv.h \ | |
1084 | ..\thread.h \ | |
1085 | ..\unixish.h \ | |
1086 | ..\utf8.h \ | |
1087 | ..\util.h \ | |
1088 | ..\warnings.h \ | |
1089 | ..\XSUB.h \ | |
1090 | ..\EXTERN.h \ | |
1091 | ..\perlvars.h \ | |
1092 | ..\intrpvar.h \ | |
1e71036e JH |
1093 | .\include\dirent.h \ |
1094 | .\include\netdb.h \ | |
c44e86c9 | 1095 | .\include\sys\errno2.h \ |
1e71036e JH |
1096 | .\include\sys\socket.h \ |
1097 | .\win32.h | |
1098 | ||
a148edb6 | 1099 | CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h |
1e71036e | 1100 | |
202d1001 | 1101 | UUDMAP_H = ..\uudmap.h |
efa50c51 | 1102 | BITCOUNT_H = ..\bitcount.h |
6f83ef0e | 1103 | MG_DATA_H = ..\mg_data.h |
9387abf8 | 1104 | GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H) |
8657e86b TC |
1105 | |
1106 | HAVE_COREDIR = .\.coreheaders | |
d89ea360 | 1107 | |
1e71036e JH |
1108 | MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o)) |
1109 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o)) | |
1110 | WIN32_OBJ = $(WIN32_SRC:db:+$(o)) | |
1111 | MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)} | |
ba14dd9a | 1112 | MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)} |
1e71036e | 1113 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) |
281da5ea | 1114 | DLL_OBJ = $(DYNALOADER) |
1e71036e JH |
1115 | |
1116 | PERLDLL_OBJ = $(CORE_OBJ) | |
1117 | PERLEXE_OBJ = perlmain$(o) | |
ed2eab3f | 1118 | PERLEXEST_OBJ = perlmainst$(o) |
1e71036e JH |
1119 | |
1120 | PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ) | |
1121 | ||
1122 | .IF "$(USE_SETARGV)" != "" | |
1123 | SETARGV_OBJ = setargv$(o) | |
1124 | .ENDIF | |
1125 | ||
a1f2e719 VK |
1126 | .IF "$(ALL_STATIC)" == "define" |
1127 | # some exclusions, unfortunately, until fixed: | |
903f2d70 | 1128 | # - MakeMaker isn't capable enough for SDBM_File (small bug) |
13cedc2a | 1129 | STATIC_EXT = * !SDBM_File |
908f2cb5 | 1130 | NORMALIZE_STATIC = Normalize_static |
a1f2e719 VK |
1131 | .ELSE |
1132 | # specify static extensions here, for example: | |
7a278470 SH |
1133 | # (be sure to include Win32CORE to load Win32 on demand) |
1134 | #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib | |
78ff2d7b | 1135 | STATIC_EXT = Win32CORE |
908f2cb5 | 1136 | NORMALIZE_DYN = Normalize_dyn |
a1f2e719 | 1137 | .ENDIF |
1e71036e | 1138 | |
281da5ea | 1139 | DYNALOADER = ..\DynaLoader$(o) |
1e71036e | 1140 | |
1e71036e JH |
1141 | # vars must be separated by "\t+~\t+", since we're using the tempfile |
1142 | # version of config_sh.pl (we were overflowing someone's buffer by | |
1143 | # trying to fit them all on the command line) | |
1144 | # -- BKS 10-17-1999 | |
1145 | CFG_VARS = \ | |
13631a73 SH |
1146 | INST_TOP=$(INST_TOP) ~ \ |
1147 | INST_VER=$(INST_VER) ~ \ | |
1e71036e JH |
1148 | INST_ARCH=$(INST_ARCH) ~ \ |
1149 | archname=$(ARCHNAME) ~ \ | |
1150 | cc=$(CC) ~ \ | |
1151 | ld=$(LINK32) ~ \ | |
bb275e72 | 1152 | ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \ |
f9bbfafd | 1153 | usecplusplus=$(USE_CPLUSPLUS) ~ \ |
1e71036e | 1154 | cf_email=$(EMAIL) ~ \ |
1e71036e JH |
1155 | d_mymalloc=$(PERL_MALLOC) ~ \ |
1156 | libs=$(LIBFILES:f) ~ \ | |
13631a73 | 1157 | incpath=$(CCINCDIR) ~ \ |
1e71036e | 1158 | libperl=$(PERLIMPLIB:f) ~ \ |
13631a73 | 1159 | libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \ |
1e71036e | 1160 | libc=$(LIBC) ~ \ |
3bdc51af | 1161 | make=$(PLMAKE) ~ \ |
84c322f7 MB |
1162 | _o=$(o) ~ \ |
1163 | obj_ext=$(o) ~ \ | |
1164 | _a=$(a) ~ \ | |
1165 | lib_ext=$(a) ~ \ | |
1e71036e | 1166 | static_ext=$(STATIC_EXT) ~ \ |
7e0017d3 | 1167 | usethreads=$(USE_ITHREADS) ~ \ |
1e71036e | 1168 | useithreads=$(USE_ITHREADS) ~ \ |
1e71036e | 1169 | usemultiplicity=$(USE_MULTI) ~ \ |
1f64ae15 | 1170 | use64bitint=$(USE_64_BIT_INT) ~ \ |
890b5089 | 1171 | uselongdouble=$(USE_LONG_DOUBLE) ~ \ |
c7dd62f6 | 1172 | uselargefiles=$(USE_LARGE_FILES) ~ \ |
7ada00a0 | 1173 | usesitecustomize=$(USE_SITECUST) ~ \ |
458ea8f7 | 1174 | default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT) ~ \ |
13631a73 | 1175 | LINK_FLAGS=$(LINK_FLAGS) ~ \ |
7bef440c | 1176 | optimize=$(OPTIMIZE) ~ \ |
1f64ae15 SH |
1177 | ARCHPREFIX=$(ARCHPREFIX) ~ \ |
1178 | WIN64=$(WIN64) | |
1e71036e | 1179 | |
1e71036e JH |
1180 | # |
1181 | # Top targets | |
1182 | # | |
1183 | ||
4bd13559 | 1184 | all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) PostExt |
1e71036e | 1185 | |
b2029beb DD |
1186 | info : |
1187 | .IF "$(CCTYPE)" == "GCC" | |
1188 | @echo # CCTYPE=$(CCTYPE)&& \ | |
1189 | echo # CC=$(CC)&& \ | |
1190 | echo # GCCVER=$(GCCVER1).$(GCCVER2).$(GCCVER3)&& \ | |
1191 | echo # GCCTARGET=$(GCCTARGET)&& \ | |
1192 | echo # GCCCROSS=$(GCCCROSS)&& \ | |
1193 | echo # WIN64=$(WIN64)&& \ | |
1194 | echo # ARCHITECTURE=$(ARCHITECTURE)&& \ | |
1195 | echo # ARCHNAME=$(ARCHNAME)&& \ | |
1196 | echo # MAKE=$(PLMAKE) | |
1197 | .ELSE | |
1198 | @echo # CCTYPE=$(CCTYPE)&& \ | |
1199 | echo # WIN64=$(WIN64)&& \ | |
1200 | echo # ARCHITECTURE=$(ARCHITECTURE)&& \ | |
1201 | echo # ARCHNAME=$(ARCHNAME)&& \ | |
1202 | echo # MAKE=$(PLMAKE) | |
1203 | .ENDIF | |
1204 | .IF "$(CCTYPE)" == "" | |
1205 | @echo Unable to detect gcc and/or architecture! | |
1206 | @exit 1 | |
1207 | .ENDIF | |
1208 | ||
1209 | ||
5b04aee6 | 1210 | ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h |
9ce5b024 SH |
1211 | |
1212 | ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h | |
1213 | ||
d67e180c | 1214 | reonly : ..\regnodes.h $(UNIDATAFILES) Extensions_reonly |
250c5aad | 1215 | |
ed2eab3f SH |
1216 | static: $(PERLEXESTATIC) |
1217 | ||
1e71036e JH |
1218 | #---------------------------------------------------------------- |
1219 | ||
13631a73 SH |
1220 | CHECKDMAKE : |
1221 | .IF "$(NEWDMAKE)" == "define" | |
1222 | $(NOOP) | |
1223 | .ELSE | |
1224 | @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions. | |
1225 | @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/ | |
1226 | @exit 1 | |
1227 | .ENDIF | |
1228 | ||
1545a179 | 1229 | $(GLOBEXE) : perlglob.c |
378eeda7 | 1230 | .IF "$(CCTYPE)" == "GCC" |
1545a179 | 1231 | $(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES) |
1e71036e | 1232 | .ELSE |
8e925de9 DD |
1233 | $(CC) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \ |
1234 | setargv$(o) $(LIBFILES) && $(EMBED_EXE_MANI) | |
1e71036e JH |
1235 | .ENDIF |
1236 | ||
3bdc51af | 1237 | ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl |
bf543eaf | 1238 | $(MINIPERL) -I..\lib ..\make_patchnum.pl |
a148edb6 | 1239 | |
931482b7 NC |
1240 | # make sure that we recompile perl.c if the git version changes |
1241 | ..\perl$(o) : ..\git_version.h | |
a148edb6 | 1242 | |
eb840d4a | 1243 | ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL) |
1e71036e | 1244 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \ |
eb840d4a | 1245 | $(mktmp $(CFG_VARS)) $(CFGSH_TMPL) > ..\config.sh |
1e71036e | 1246 | |
1f64ae15 SH |
1247 | # This target is for when changes to the main config.sh happen. |
1248 | # Edit config.gc, then make perl using GCC in a minimal configuration (i.e. | |
8c847e66 | 1249 | # with MULTI, ITHREADS, IMP_SYS and LARGE_FILES off), then make |
76febb1c | 1250 | # this target to regenerate config_H.gc. |
1e71036e | 1251 | regen_config_h: |
76febb1c | 1252 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \ |
1e71036e | 1253 | $(CFGSH_TMPL) > ..\config.sh |
4e73d6a4 | 1254 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
1e71036e | 1255 | -del /f $(CFGH_TMPL) |
f6b3c354 | 1256 | -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" |
1e71036e JH |
1257 | rename config.h $(CFGH_TMPL) |
1258 | ||
bf543eaf | 1259 | $(CONFIGPM) .\config.h .UPDATEALL: ..\config.sh config_h.PL |
4e73d6a4 | 1260 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
c2c7bda0 | 1261 | -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" |
1e71036e | 1262 | |
3bdc51af DD |
1263 | # See the comment in Makefile.SH explaining this seemingly cranky ordering |
1264 | ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl | |
378eeda7 | 1265 | .IF "$(CCTYPE)" == "GCC" |
cb251201 | 1266 | $(LINK32) -v -mconsole -o $(MINIPERL) $(BLINK_FLAGS) \ |
13631a73 | 1267 | $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST)) |
1e71036e | 1268 | .ELSE |
269713a1 | 1269 | $(LINK32) -out:$(MINIPERL) $(BLINK_FLAGS) \ |
6937817d | 1270 | @$(mktmp $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)) |
02bfb73b | 1271 | $(EMBED_EXE_MANI:s/$@/$(MINIPERL)/) |
1e71036e | 1272 | .ENDIF |
b78ac715 | 1273 | $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl .. |
1e71036e | 1274 | |
3bdc51af DD |
1275 | #convinence target, get a working miniperl |
1276 | mp : $(CONFIGPM) | |
1277 | ||
1278 | $(MINIDIR)\.exists : $(CFGH_TMPL) | |
1e71036e | 1279 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" |
3bdc51af DD |
1280 | # |
1281 | # Copy the template config.h and set configurables at the end of it | |
1282 | # as per the options chosen and compiler used. | |
1283 | # Note: This config.h is only used to build miniperl.exe anyway, but | |
1284 | # it's as well to have its options correct to be sure that it builds | |
1285 | # and so that it's "-V" options are correct for use by makedef.pl. The | |
1286 | # real config.h used to build perl.exe is generated from the top-level | |
1287 | # config_h.SH by config_h.PL (run by miniperl.exe). | |
1288 | # | |
1289 | # MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd | |
1290 | # config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ). | |
3bdc51af DD |
1291 | copy $(CFGH_TMPL) config.h |
1292 | @(echo.&& \ | |
1293 | echo #ifndef _config_h_footer_&& \ | |
1294 | echo #define _config_h_footer_&& \ | |
1295 | echo #undef Off_t&& \ | |
1296 | echo #undef LSEEKSIZE&& \ | |
1297 | echo #undef Off_t_size&& \ | |
1298 | echo #undef PTRSIZE&& \ | |
1299 | echo #undef SSize_t&& \ | |
1300 | echo #undef HAS_ATOLL&& \ | |
1301 | echo #undef HAS_STRTOLL&& \ | |
1302 | echo #undef HAS_STRTOULL&& \ | |
1303 | echo #undef Size_t_size&& \ | |
1304 | echo #undef IVTYPE&& \ | |
1305 | echo #undef UVTYPE&& \ | |
1306 | echo #undef IVSIZE&& \ | |
1307 | echo #undef UVSIZE&& \ | |
1308 | echo #undef NV_PRESERVES_UV&& \ | |
1309 | echo #undef NV_PRESERVES_UV_BITS&& \ | |
1310 | echo #undef IVdf&& \ | |
1311 | echo #undef UVuf&& \ | |
1312 | echo #undef UVof&& \ | |
1313 | echo #undef UVxf&& \ | |
1314 | echo #undef UVXf&& \ | |
1315 | echo #undef USE_64_BIT_INT&& \ | |
1316 | echo #undef Gconvert&& \ | |
1317 | echo #undef HAS_FREXPL&& \ | |
1318 | echo #undef HAS_ISNANL&& \ | |
1319 | echo #undef HAS_MODFL&& \ | |
1320 | echo #undef HAS_MODFL_PROTO&& \ | |
1321 | echo #undef HAS_SQRTL&& \ | |
1322 | echo #undef HAS_STRTOLD&& \ | |
1323 | echo #undef PERL_PRIfldbl&& \ | |
1324 | echo #undef PERL_PRIgldbl&& \ | |
1325 | echo #undef PERL_PRIeldbl&& \ | |
1326 | echo #undef PERL_SCNfldbl&& \ | |
1327 | echo #undef NVTYPE&& \ | |
1328 | echo #undef NVSIZE&& \ | |
1329 | echo #undef LONG_DOUBLESIZE&& \ | |
1330 | echo #undef NV_OVERFLOWS_INTEGERS_AT&& \ | |
1331 | echo #undef NVef&& \ | |
1332 | echo #undef NVff&& \ | |
1333 | echo #undef NVgf&& \ | |
1334 | echo #undef USE_LONG_DOUBLE&& \ | |
1335 | echo #undef USE_CPLUSPLUS)>> config.h | |
3aa3d69a | 1336 | .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" |
1f664ef5 SH |
1337 | @(echo #undef FILE_ptr&& \ |
1338 | echo #undef FILE_cnt&& \ | |
1339 | echo #undef FILE_base&& \ | |
1340 | echo #undef FILE_bufsiz&& \ | |
fe7ba591 SH |
1341 | echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \ |
1342 | echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \ | |
1343 | echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \ | |
1344 | echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \ | |
1f664ef5 SH |
1345 | echo #define I_STDBOOL)>> config.h |
1346 | .ENDIF | |
3bdc51af DD |
1347 | .IF "$(USE_LARGE_FILES)"=="define" |
1348 | @(echo #define Off_t $(INT64)&& \ | |
1349 | echo #define LSEEKSIZE ^8&& \ | |
1350 | echo #define Off_t_size ^8)>> config.h | |
1351 | .ELSE | |
1352 | @(echo #define Off_t long&& \ | |
1353 | echo #define LSEEKSIZE ^4&& \ | |
1354 | echo #define Off_t_size ^4)>> config.h | |
1355 | .ENDIF | |
1356 | .IF "$(WIN64)"=="define" | |
a385474c DD |
1357 | .IF "$(CCTYPE)" == "GCC" |
1358 | @(echo #define LONG_DOUBLESIZE ^16)>> config.h | |
1359 | .ELSE | |
1360 | @(echo #define LONG_DOUBLESIZE ^8)>> config.h | |
1361 | .ENDIF | |
3bdc51af DD |
1362 | @(echo #define PTRSIZE ^8&& \ |
1363 | echo #define SSize_t $(INT64)&& \ | |
1364 | echo #define HAS_ATOLL&& \ | |
1365 | echo #define HAS_STRTOLL&& \ | |
1366 | echo #define HAS_STRTOULL&& \ | |
1367 | echo #define Size_t_size ^8)>> config.h | |
1368 | .ELSE | |
a385474c DD |
1369 | .IF "$(CCTYPE)" == "GCC" |
1370 | @(echo #define LONG_DOUBLESIZE ^12)>> config.h | |
1371 | .ELSE | |
1372 | @(echo #define LONG_DOUBLESIZE ^8)>> config.h | |
1373 | .ENDIF | |
3bdc51af DD |
1374 | @(echo #define PTRSIZE ^4&& \ |
1375 | echo #define SSize_t int&& \ | |
1376 | echo #undef HAS_ATOLL&& \ | |
1377 | echo #undef HAS_STRTOLL&& \ | |
1378 | echo #undef HAS_STRTOULL&& \ | |
1379 | echo #define Size_t_size ^4)>> config.h | |
1380 | .ENDIF | |
1381 | .IF "$(USE_64_BIT_INT)"=="define" | |
1382 | @(echo #define IVTYPE $(INT64)&& \ | |
1383 | echo #define UVTYPE unsigned $(INT64)&& \ | |
1384 | echo #define IVSIZE ^8&& \ | |
1385 | echo #define UVSIZE ^8)>> config.h | |
1386 | .IF "$(USE_LONG_DOUBLE)"=="define" | |
1387 | @(echo #define NV_PRESERVES_UV&& \ | |
1388 | echo #define NV_PRESERVES_UV_BITS 64)>> config.h | |
1389 | .ELSE | |
1390 | @(echo #undef NV_PRESERVES_UV&& \ | |
1391 | echo #define NV_PRESERVES_UV_BITS 53)>> config.h | |
1392 | .ENDIF | |
1393 | @(echo #define IVdf "I64d"&& \ | |
1394 | echo #define UVuf "I64u"&& \ | |
1395 | echo #define UVof "I64o"&& \ | |
1396 | echo #define UVxf "I64x"&& \ | |
1397 | echo #define UVXf "I64X"&& \ | |
1398 | echo #define USE_64_BIT_INT)>> config.h | |
1399 | .ELSE | |
1400 | @(echo #define IVTYPE long&& \ | |
1401 | echo #define UVTYPE unsigned long&& \ | |
1402 | echo #define IVSIZE ^4&& \ | |
1403 | echo #define UVSIZE ^4&& \ | |
1404 | echo #define NV_PRESERVES_UV&& \ | |
1405 | echo #define NV_PRESERVES_UV_BITS 32&& \ | |
1406 | echo #define IVdf "ld"&& \ | |
1407 | echo #define UVuf "lu"&& \ | |
1408 | echo #define UVof "lo"&& \ | |
1409 | echo #define UVxf "lx"&& \ | |
1410 | echo #define UVXf "lX"&& \ | |
1411 | echo #undef USE_64_BIT_INT)>> config.h | |
1412 | .ENDIF | |
1413 | .IF "$(USE_LONG_DOUBLE)"=="define" | |
1414 | @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%.*""Lg",^(n^),^(x^)^)&& \ | |
1415 | echo #define HAS_FREXPL&& \ | |
1416 | echo #define HAS_ISNANL&& \ | |
1417 | echo #define HAS_MODFL&& \ | |
1418 | echo #define HAS_MODFL_PROTO&& \ | |
1419 | echo #define HAS_SQRTL&& \ | |
1420 | echo #define HAS_STRTOLD&& \ | |
1421 | echo #define PERL_PRIfldbl "Lf"&& \ | |
1422 | echo #define PERL_PRIgldbl "Lg"&& \ | |
1423 | echo #define PERL_PRIeldbl "Le"&& \ | |
1424 | echo #define PERL_SCNfldbl "Lf"&& \ | |
a385474c DD |
1425 | echo #define NVTYPE long double&& \ |
1426 | echo #define NVSIZE LONG_DOUBLESIZE&& \ | |
1427 | echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0&& \ | |
3bdc51af DD |
1428 | echo #define NVef "Le"&& \ |
1429 | echo #define NVff "Lf"&& \ | |
1430 | echo #define NVgf "Lg"&& \ | |
1431 | echo #define USE_LONG_DOUBLE)>> config.h | |
1432 | .ELSE | |
1433 | @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%.*g",^(n^),^(x^)^)&& \ | |
1434 | echo #undef HAS_FREXPL&& \ | |
1435 | echo #undef HAS_ISNANL&& \ | |
1436 | echo #undef HAS_MODFL&& \ | |
1437 | echo #undef HAS_MODFL_PROTO&& \ | |
1438 | echo #undef HAS_SQRTL&& \ | |
1439 | echo #undef HAS_STRTOLD&& \ | |
1440 | echo #undef PERL_PRIfldbl&& \ | |
1441 | echo #undef PERL_PRIgldbl&& \ | |
1442 | echo #undef PERL_PRIeldbl&& \ | |
1443 | echo #undef PERL_SCNfldbl&& \ | |
1444 | echo #define NVTYPE double&& \ | |
1445 | echo #define NVSIZE ^8&& \ | |
3bdc51af DD |
1446 | echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0&& \ |
1447 | echo #define NVef "e"&& \ | |
1448 | echo #define NVff "f"&& \ | |
1449 | echo #define NVgf "g"&& \ | |
1450 | echo #undef USE_LONG_DOUBLE)>> config.h | |
1451 | .ENDIF | |
1452 | .IF "$(USE_CPLUSPLUS)"=="define" | |
1453 | @(echo #define USE_CPLUSPLUS&& \ | |
1454 | echo #endif)>> config.h | |
1455 | .ELSE | |
1456 | @(echo #undef USE_CPLUSPLUS&& \ | |
1457 | echo #endif)>> config.h | |
1458 | .ENDIF | |
1459 | #separate line since this is sentinal that this target is done | |
19d5c34a | 1460 | @rem. > $(MINIDIR)\.exists |
1e71036e JH |
1461 | |
1462 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) | |
3bdc51af | 1463 | $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*B).c |
1e71036e JH |
1464 | |
1465 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) | |
3bdc51af | 1466 | $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*B).c |
1e71036e JH |
1467 | |
1468 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c | |
1469 | # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless | |
1470 | # unless the .IF is true), so instead we use a .ELSE with the default. | |
1471 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h | |
1472 | ||
3bdc51af | 1473 | perllib$(o) : perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h |
acfe0abc | 1474 | .IF "$(USE_IMP_SYS)" == "define" |
3bdc51af | 1475 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c |
1e71036e | 1476 | .ELSE |
3bdc51af | 1477 | $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c |
1e71036e JH |
1478 | .ENDIF |
1479 | ||
1480 | # 1. we don't want to rebuild miniperl.exe when config.h changes | |
1481 | # 2. we don't want to rebuild miniperl.exe with non-default config.h | |
931482b7 | 1482 | # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it |
3bdc51af | 1483 | $(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H) |
1e71036e JH |
1484 | |
1485 | $(WIN32_OBJ) : $(CORE_H) | |
9848074e | 1486 | |
1e71036e | 1487 | $(CORE_OBJ) : $(CORE_H) |
9848074e | 1488 | |
1e71036e | 1489 | $(DLL_OBJ) : $(CORE_H) |
9848074e | 1490 | |
3bdc51af DD |
1491 | |
1492 | perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl | |
c6d234b8 | 1493 | $(MINIPERL) -I..\lib create_perllibst_h.pl |
3bdc51af DD |
1494 | |
1495 | perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl | |
c1effa61 | 1496 | $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \ |
080c3729 | 1497 | $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def |
1e71036e | 1498 | |
bf543eaf | 1499 | $(PERLEXPLIB) $(PERLIMPLIB) .UPDATEALL : perldll.def |
3bdc51af | 1500 | .IF "$(CCTYPE)" == "GCC" |
1b30b4a8 | 1501 | $(IMPLIB) -k -d perldll.def -D $(PERLDLLBASE) -l $(PERLIMPLIB) -e $(PERLEXPLIB) |
3bdc51af DD |
1502 | .ELSE #VC family |
1503 | lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB) | |
1504 | .ENDIF | |
3bdc51af DD |
1505 | |
1506 | $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static | |
378eeda7 | 1507 | .IF "$(CCTYPE)" == "GCC" |
1e71036e | 1508 | $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \ |
bf543eaf | 1509 | $(PERLDLL_OBJ) $(shell @type Extensions_static) $(LIBFILES) $(PERLEXPLIB) |
1e71036e | 1510 | .ELSE |
3bdc51af | 1511 | $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \ |
9e7cf449 | 1512 | @Extensions_static \ |
78d58004 | 1513 | @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \ |
3bdc51af | 1514 | $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB)) |
c8e599d3 | 1515 | $(EMBED_DLL_MANI) |
1e71036e | 1516 | .ENDIF |
1e71036e | 1517 | |
cc0b589a | 1518 | $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static |
378eeda7 | 1519 | .IF "$(CCTYPE)" == "GCC" |
b520de4a | 1520 | $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ) |
cc0b589a | 1521 | if exist $(STATICDIR) rmdir /s /q $(STATICDIR) |
b520de4a SH |
1522 | for %i in ($(shell @type Extensions_static)) do \ |
1523 | @mkdir $(STATICDIR) && cd $(STATICDIR) && \ | |
1524 | $(ARCHPREFIX)ar x ..\%i && \ | |
1525 | $(ARCHPREFIX)ar q ..\$@ *$(o) && \ | |
1526 | cd .. && rmdir /s /q $(STATICDIR) | |
ed2eab3f SH |
1527 | .ELSE |
1528 | $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \ | |
13631a73 | 1529 | @$(mktmp $(PERLDLL_OBJ)) |
ed2eab3f | 1530 | .ENDIF |
d89ea360 | 1531 | $(XCOPY) $(PERLSTATICLIB) $(COREDIR)\$(NULL) |
d2b25974 | 1532 | |
4ebea3c6 | 1533 | $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO) |
e84ac4e2 | 1534 | |
9387abf8 | 1535 | $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS) |
9444d213 | 1536 | |
c2c7bda0 DD |
1537 | $(GENUUDMAP) $(GENERATED_HEADERS) .UPDATEALL : ..\mg_raw.h |
1538 | .IF "$(CCTYPE)" == "GCC" | |
1545a179 DD |
1539 | $(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \ |
1540 | $(BLINK_FLAGS) -x $(mktmp $(LKPRE) $(LIBFILES) $(LKPOST)) | |
c2c7bda0 | 1541 | .ELSE |
8e925de9 | 1542 | $(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c @$(mktmp -link $(LIBFILES)) -link $(BLINK_FLAGS) |
c2c7bda0 DD |
1543 | $(EMBED_EXE_MANI:s/$@/..\generate_uudmap.exe/) |
1544 | .ENDIF | |
9387abf8 | 1545 | $(GENUUDMAP) $(GENERATED_HEADERS) |
6f83ef0e | 1546 | |
8657e86b TC |
1547 | MakePPPort : $(HAVEMINIPERL) $(CONFIGPM) |
1548 | $(MINIPERL) -I..\lib ..\mkppport | |
1549 | ||
1550 | # also known as $(HAVE_COREDIR) | |
1551 | .\.coreheaders : $(CORE_H) | |
d89ea360 DD |
1552 | $(XCOPY) *.h $(COREDIR)\*.* && $(RCOPY) include $(COREDIR)\*.* && $(XCOPY) ..\*.h $(COREDIR)\*.* |
1553 | rem. > $@ | |
1554 | ||
bf543eaf DD |
1555 | perlmain$(o) : runperl.c $(CONFIGPM) |
1556 | $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c | |
1e71036e | 1557 | |
bf543eaf DD |
1558 | perlmainst$(o) : runperl.c $(CONFIGPM) |
1559 | $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c | |
ed2eab3f | 1560 | |
3bdc51af | 1561 | $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) |
378eeda7 | 1562 | .IF "$(CCTYPE)" == "GCC" |
1e71036e | 1563 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ |
f721bdf3 | 1564 | $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) |
1e71036e | 1565 | .ELSE |
269713a1 | 1566 | $(LINK32) -out:$@ $(BLINK_FLAGS) \ |
aafd2430 | 1567 | $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ) |
c8e599d3 | 1568 | $(EMBED_EXE_MANI) |
1e71036e JH |
1569 | .ENDIF |
1570 | copy $(PERLEXE) $(WPERLEXE) | |
1571 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS | |
1e71036e | 1572 | |
931482b7 | 1573 | $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) |
378eeda7 | 1574 | .IF "$(CCTYPE)" == "GCC" |
ed2eab3f | 1575 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ |
aafd2430 | 1576 | $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) |
ed2eab3f | 1577 | .ELSE |
269713a1 | 1578 | $(LINK32) -out:$@ $(BLINK_FLAGS) \ |
aafd2430 | 1579 | $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ) |
ed2eab3f SH |
1580 | $(EMBED_EXE_MANI) |
1581 | .ENDIF | |
1582 | ||
9dcb9602 | 1583 | #------------------------------------------------------------------------------- |
281da5ea | 1584 | # There's no direct way to mark a dependency on |
6afd19bc | 1585 | # DynaLoader.pm, so this will have to do |
d89ea360 DD |
1586 | |
1587 | #most of deps of this target are in DYNALOADER and therefore omitted here | |
908f2cb5 | 1588 | Extensions : $(PERLDEP) $(DYNALOADER) Extension_lib $(GLOBEXE) MakePPPort |
e598d4db DD |
1589 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize |
1590 | ||
908f2cb5 DD |
1591 | Normalize_static : $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) $(UNIDATAFILES) |
1592 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static +Unicode/Normalize | |
1593 | ||
1594 | Normalize_dyn : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES) | |
e598d4db | 1595 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize |
d2b25974 | 1596 | |
d89ea360 | 1597 | Extensions_reonly : $(PERLDEP) $(DYNALOADER) |
3bdc51af | 1598 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re |
250c5aad | 1599 | |
908f2cb5 DD |
1600 | Exts_static_general : ..\make_ext.pl $(CONFIGPM) Extension_lib $(GLOBEXE) $(HAVE_COREDIR) MakePPPort |
1601 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static !Unicode/Normalize | |
1602 | ||
1603 | Extensions_static : list_static_libs.pl Exts_static_general $(NORMALIZE_STATIC) | |
c6d234b8 | 1604 | $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static |
1e71036e | 1605 | |
d67e180c | 1606 | Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE) |
3bdc51af | 1607 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs |
a34ce875 | 1608 | |
908f2cb5 DD |
1609 | Extension_lib : ..\make_ext.pl $(CONFIGPM) |
1610 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) lib | |
1611 | ||
3bdc51af | 1612 | #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building |
d67e180c | 1613 | $(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR) |
908f2cb5 | 1614 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader |
281da5ea | 1615 | |
ba14dd9a | 1616 | Extensions_clean : |
3bdc51af | 1617 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean |
1e71036e | 1618 | |
b4dc1df6 | 1619 | Extensions_realclean : |
3bdc51af DD |
1620 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean |
1621 | ||
1622 | # all PE files need to be built by the time this target runs, PP files can still | |
1623 | # be running in parallel like UNIDATAFILES, this target a placeholder for the | |
1624 | # future | |
cd17fa28 | 1625 | .IF "$(PERLSTATIC)"=="static" |
908f2cb5 | 1626 | rebasePE : Extensions $(PERLDLL) $(PERLEXE) $(PERLEXESTATIC) |
3bdc51af | 1627 | .ELSE |
908f2cb5 | 1628 | rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE) |
3bdc51af DD |
1629 | .ENDIF |
1630 | $(NOOP) | |
b4dc1df6 | 1631 | |
4bd13559 SH |
1632 | PostExt : ..\lib\Storable\Limit.pm |
1633 | $(NOOP) | |
fda9c55c | 1634 | |
c0e3b4b5 | 1635 | # we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions |
c8435d23 TC |
1636 | # rebasePE most of that, including adjustment for static builds, so we |
1637 | # just need non-xs extensions | |
1638 | ..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs | |
b58c2b0d | 1639 | cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm |
c0e3b4b5 TC |
1640 | if not exist ..\lib\Storable mkdir ..\lib\Storable |
1641 | copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm | |
fda9c55c | 1642 | |
9dcb9602 | 1643 | #------------------------------------------------------------------------------- |
1e71036e JH |
1644 | |
1645 | ||
3bdc51af | 1646 | doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod |
a4e8ab8a | 1647 | $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \ |
f8dbed5a | 1648 | --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ |
9b1d99d7 | 1649 | --recurse |
1e71036e | 1650 | |
0827416d NC |
1651 | ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL |
1652 | $(MINIPERL) -I..\lib ..\utils\Makefile.PL .. | |
1653 | ||
b0b6bf2b AT |
1654 | # Note that this next section is parsed (and regenerated) by pod/buildtoc |
1655 | # so please check that script before making structural changes here | |
3bdc51af DD |
1656 | utils: $(HAVEMINIPERL) ..\utils\Makefile |
1657 | cd ..\utils && $(PLMAKE) PERL=$(MINIPERL) | |
b0b6bf2b AT |
1658 | copy ..\README.aix ..\pod\perlaix.pod |
1659 | copy ..\README.amiga ..\pod\perlamiga.pod | |
6001596e | 1660 | copy ..\README.android ..\pod\perlandroid.pod |
b0b6bf2b AT |
1661 | copy ..\README.bs2000 ..\pod\perlbs2000.pod |
1662 | copy ..\README.ce ..\pod\perlce.pod | |
1663 | copy ..\README.cn ..\pod\perlcn.pod | |
1664 | copy ..\README.cygwin ..\pod\perlcygwin.pod | |
b0b6bf2b | 1665 | copy ..\README.dos ..\pod\perldos.pod |
b0b6bf2b | 1666 | copy ..\README.freebsd ..\pod\perlfreebsd.pod |
9f968a8d | 1667 | copy ..\README.haiku ..\pod\perlhaiku.pod |
b0b6bf2b AT |
1668 | copy ..\README.hpux ..\pod\perlhpux.pod |
1669 | copy ..\README.hurd ..\pod\perlhurd.pod | |
1670 | copy ..\README.irix ..\pod\perlirix.pod | |
1671 | copy ..\README.jp ..\pod\perljp.pod | |
1672 | copy ..\README.ko ..\pod\perlko.pod | |
6477b319 | 1673 | copy ..\README.linux ..\pod\perllinux.pod |
b0b6bf2b AT |
1674 | copy ..\README.macos ..\pod\perlmacos.pod |
1675 | copy ..\README.macosx ..\pod\perlmacosx.pod | |
b0b6bf2b | 1676 | copy ..\README.netware ..\pod\perlnetware.pod |
b0846812 | 1677 | copy ..\README.openbsd ..\pod\perlopenbsd.pod |
b0b6bf2b AT |
1678 | copy ..\README.os2 ..\pod\perlos2.pod |
1679 | copy ..\README.os390 ..\pod\perlos390.pod | |
1680 | copy ..\README.os400 ..\pod\perlos400.pod | |
1681 | copy ..\README.plan9 ..\pod\perlplan9.pod | |
1682 | copy ..\README.qnx ..\pod\perlqnx.pod | |
2f08ed66 | 1683 | copy ..\README.riscos ..\pod\perlriscos.pod |
b0b6bf2b | 1684 | copy ..\README.solaris ..\pod\perlsolaris.pod |
27da23d5 | 1685 | copy ..\README.symbian ..\pod\perlsymbian.pod |
58534900 | 1686 | copy ..\README.synology ..\pod\perlsynology.pod |
b0b6bf2b AT |
1687 | copy ..\README.tru64 ..\pod\perltru64.pod |
1688 | copy ..\README.tw ..\pod\perltw.pod | |
b0b6bf2b AT |
1689 | copy ..\README.vos ..\pod\perlvos.pod |
1690 | copy ..\README.win32 ..\pod\perlwin32.pod | |
4380f76d | 1691 | copy ..\pod\perldelta.pod ..\pod\perl5296delta.pod |
3bdc51af | 1692 | $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS) |
f8d6280f | 1693 | $(MINIPERL) -I..\lib ..\autodoc.pl .. |
f556af6c | 1694 | $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q .. |
0195b144 | 1695 | |
908f2cb5 | 1696 | ..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs $(NORMALIZE_DYN) utils |
b78c1104 | 1697 | $(PERLEXE) -f ..\pod\buildtoc -q |
1e71036e | 1698 | |
b0b6bf2b AT |
1699 | # Note that the pod cleanup in this next section is parsed (and regenerated |
1700 | # by pod/buildtoc so please check that script before making changes here | |
1701 | ||
b4dc1df6 | 1702 | distclean: realclean |
1e71036e | 1703 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ |
7b4d95f7 | 1704 | $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB) |
ca67812f SH |
1705 | -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm |
1706 | -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm | |
48462a74 | 1707 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm |
1e71036e | 1708 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
a9bf183d | 1709 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm |
1e71036e JH |
1710 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm |
1711 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm | |
1e71036e | 1712 | -del /f $(LIBDIR)\File\Glob.pm |
ca67812f | 1713 | -del /f $(LIBDIR)\Sys\Hostname.pm |
1e71036e | 1714 | -del /f $(LIBDIR)\Time\HiRes.pm |
ac5ea531 | 1715 | -del /f $(LIBDIR)\Unicode\Normalize.pm |
4e74047c | 1716 | -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm |
c0e3b4b5 | 1717 | -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm |
b4ad57f4 | 1718 | -del /f $(LIBDIR)\Win32.pm |
37ca3c28 | 1719 | -del /f $(LIBDIR)\Win32CORE.pm |
00701878 SH |
1720 | -del /f $(LIBDIR)\Win32API\File.pm |
1721 | -del /f $(LIBDIR)\Win32API\File\cFile.pc | |
5e4c4c91 | 1722 | -del /f $(LIBDIR)\buildcustomize.pl |
a85e0e8c | 1723 | -del /f $(DISTDIR)\XSLoader\XSLoader.pm |
5daeb5b0 | 1724 | -del /f *.def *.map |
6e8fbcb5 | 1725 | -if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga |
1a6c65ed SH |
1726 | -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App |
1727 | -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive | |
1728 | -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute | |
1729 | -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie | |
7afc9753 | 1730 | -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp |
46ffdcf0 | 1731 | -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress |
7afc9753 NC |
1732 | -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl |
1733 | -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN | |
522078af | 1734 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data |
1a6c65ed SH |
1735 | -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel |
1736 | -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest | |
ca67812f | 1737 | -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode |
1a6c65ed | 1738 | -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding |
7afc9753 | 1739 | -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter |
1a6c65ed SH |
1740 | -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder |
1741 | -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command | |
1742 | -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant | |
1743 | -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist | |
1744 | -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker | |
7afc9753 NC |
1745 | -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS |
1746 | -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps | |
1a6c65ed SH |
1747 | -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec |
1748 | -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter | |
96c33d98 | 1749 | -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash |
7afc9753 NC |
1750 | -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP |
1751 | -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N | |
df61f5a9 | 1752 | -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc |
1a6c65ed SH |
1753 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO |
1754 | -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC | |
7afc9753 | 1755 | -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON |
69f57184 | 1756 | -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List |
1a6c65ed | 1757 | -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale |
1a6c65ed SH |
1758 | -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math |
1759 | -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize | |
69f57184 | 1760 | -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME |
1a6c65ed | 1761 | -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module |
1a6c65ed | 1762 | -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP |
1a6c65ed SH |
1763 | -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params |
1764 | -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse | |
7afc9753 | 1765 | -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl |
1a6c65ed SH |
1766 | -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO |
1767 | -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc | |
1768 | -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple | |
1769 | -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text | |
522078af | 1770 | -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar |
7afc9753 | 1771 | -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search |
d81c2d6a | 1772 | -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub |
6c4b87ea | 1773 | -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys |
1a6c65ed | 1774 | -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP |
7afc9753 | 1775 | -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term |
1a6c65ed | 1776 | -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test |
b4514920 | 1777 | -if exist $(LIBDIR)\Test2 rmdir /s /q $(LIBDIR)\Test2 |
7afc9753 | 1778 | -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text |
1a6c65ed | 1779 | -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread |
6c4b87ea | 1780 | -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads |
8cf6f931 | 1781 | -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash |
1a6c65ed | 1782 | -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate |
7afc9753 | 1783 | -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale |
fb794281 | 1784 | -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version |
7afc9753 | 1785 | -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS |
00701878 | 1786 | -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API |
7afc9753 | 1787 | -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS |
60f0ee9d | 1788 | -cd $(PODDIR) && del /f *.html *.bat roffitall \ |
4380f76d | 1789 | perl5296delta.pod perlaix.pod perlamiga.pod perlandroid.pod \ |
6001596e BF |
1790 | perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \ |
1791 | perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \ | |
1792 | perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \ | |
1793 | perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \ | |
1794 | perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \ | |
1795 | perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \ | |
1796 | perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \ | |
1797 | perltru64.pod perltw.pod perluniprops.pod perlvos.pod \ | |
1798 | perlwin32.pod | |
2560602c | 1799 | -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \ |
59658819 | 1800 | perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \ |
2ea3abd4 | 1801 | xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails |
19ec6f53 | 1802 | -del /f ..\config.sh perlmain.c dlutils.c config.h.new \ |
ed2eab3f | 1803 | perlmainst.c |
1e71036e | 1804 | -del /f $(CONFIGPM) |
a148edb6 | 1805 | -del /f ..\lib\Config_git.pl |
1e71036e | 1806 | -del /f bin\*.bat |
d2b25974 | 1807 | -del /f perllibst.h |
4ebea3c6 | 1808 | -del /f $(PERLEXE_RES) perl.base |
fd081d74 | 1809 | -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h |
827a599d | 1810 | -cd $(EXTDIR) && del /s *.def Makefile Makefile.old |
a193a2db | 1811 | -cd $(DISTDIR) && del /s *.def Makefile Makefile.old |
83d5895a | 1812 | -cd $(CPANDIR) && del /s *.def Makefile Makefile.old |
0827416d | 1813 | -del /s ..\utils\Makefile |
522078af | 1814 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) |
522078af | 1815 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) |
b4a41557 | 1816 | -if exist pod2htmd.tmp del pod2htmd.tmp |
b4a41557 | 1817 | -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR) |
0279961e | 1818 | -del /f ..\t\test_state |
1e71036e JH |
1819 | |
1820 | install : all installbare installhtml | |
1821 | ||
7c3b4d00 | 1822 | installbare : utils ..\pod\perltoc.pod |
1e71036e JH |
1823 | $(PERLEXE) ..\installperl |
1824 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* | |
5548433c | 1825 | if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.* |
1e71036e | 1826 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
ec25c072 | 1827 | if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.* |
1e71036e JH |
1828 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
1829 | ||
1830 | installhtml : doc | |
b4a41557 | 1831 | $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.* |
1e71036e JH |
1832 | |
1833 | inst_lib : $(CONFIGPM) | |
1e71036e JH |
1834 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
1835 | ||
bf543eaf DD |
1836 | $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : ..\lib\unicore\mktables $(CONFIGPM) |
1837 | $(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p | |
ca12659b | 1838 | |
3bdc51af | 1839 | minitest : .\config.h $(HAVEMINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) $(TESTPREPGCC) |
6c85d12e SH |
1840 | $(XCOPY) $(MINIPERL) ..\t\$(NULL) |
1841 | if exist ..\t\perl.exe del /f ..\t\perl.exe | |
1842 | rename ..\t\miniperl.exe perl.exe | |
1e71036e | 1843 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
a4e8ab8a | 1844 | # Note this perl.exe is miniperl |
49bf91e4 | 1845 | cd ..\t && perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t |
1e71036e | 1846 | |
a752046a | 1847 | test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC) |
c2c7bda0 DD |
1848 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) && $(XCOPY) $(PERLDLL) ..\t\$(NULL) \ |
1849 | && $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
dbf36b7a | 1850 | |
4cef65c2 S |
1851 | # If building with gcc versions 4.x.x or greater, then |
1852 | # the GCC helper DLL will also need copied to the test directory. | |
1853 | # The name of the dll can change, depending upon which vendor has supplied | |
1854 | # your compiler, and upon the values of "x". | |
1855 | # libstdc++-6.dll is copied if it exists as it, too, may then be needed. | |
1856 | # Without this copying, the op/taint.t test script will fail. | |
a752046a | 1857 | |
dbf36b7a | 1858 | .IF "$(CCTYPE)" == "GCC" |
bd8b97a1 | 1859 | |
a752046a | 1860 | test-prep-gcc : |
f751400f | 1861 | if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL) |
20634986 SH |
1862 | if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL) |
1863 | if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL) | |
1864 | if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL) | |
f751400f | 1865 | if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL) |
bd8b97a1 | 1866 | |
fa58a56f | 1867 | .ENDIF |
1e71036e | 1868 | |
7c3b4d00 | 1869 | test : test-prep |
0b4dcbc1 | 1870 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
a4e8ab8a | 1871 | cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
1e71036e | 1872 | |
106cf76e CBW |
1873 | test_porting : test-prep |
1874 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ | |
a4e8ab8a | 1875 | cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t |
106cf76e | 1876 | |
250c5aad SH |
1877 | test-reonly : reonly utils |
1878 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1879 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1880 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
a4e8ab8a | 1881 | cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA) |
250c5aad SH |
1882 | |
1883 | regen : | |
a4e8ab8a | 1884 | cd .. && regen.pl |
250c5aad | 1885 | |
1e71036e | 1886 | test-notty : test-prep |
0b4dcbc1 JD |
1887 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
1888 | set PERL_SKIP_TTY_TEST=1 && \ | |
a4e8ab8a | 1889 | cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
1e71036e | 1890 | |
7c3b4d00 | 1891 | _test : |
a01cf021 JH |
1892 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
1893 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
a01cf021 | 1894 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
0b4dcbc1 | 1895 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
a4e8ab8a | 1896 | cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
b4a93add | 1897 | |
b4dc1df6 | 1898 | _clean : |
1e71036e JH |
1899 | -@erase miniperlmain$(o) |
1900 | -@erase $(MINIPERL) | |
1901 | -@erase perlglob$(o) | |
1902 | -@erase perlmain$(o) | |
ed2eab3f | 1903 | -@erase perlmainst$(o) |
1e71036e | 1904 | -@erase /f config.h |
a148edb6 | 1905 | -@erase /f ..\git_version.h |
1e71036e JH |
1906 | -@erase $(GLOBEXE) |
1907 | -@erase $(PERLEXE) | |
1908 | -@erase $(WPERLEXE) | |
ed2eab3f SH |
1909 | -@erase $(PERLEXESTATIC) |
1910 | -@erase $(PERLSTATICLIB) | |
1e71036e JH |
1911 | -@erase $(PERLDLL) |
1912 | -@erase $(CORE_OBJ) | |
9387abf8 | 1913 | -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS) |
8657e86b | 1914 | -@erase .coreheaders |
522078af | 1915 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) |
27a8011f | 1916 | -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1) |
27a8011f | 1917 | -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2) |
ca12659b | 1918 | -@erase $(UNIDATAFILES) |
1e71036e JH |
1919 | -@erase $(WIN32_OBJ) |
1920 | -@erase $(DLL_OBJ) | |
1e71036e JH |
1921 | -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res |
1922 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat | |
1e71036e | 1923 | -@erase *.ilk |
d89ea360 | 1924 | -@erase *.pdb ..\*.pdb |
9e7cf449 | 1925 | -@erase Extensions_static |
1e71036e | 1926 | |
6e2cec71 | 1927 | clean : Extensions_clean _clean |
1266ad8f | 1928 | |
85741d00 | 1929 | realclean : Extensions_realclean _clean |
b4dc1df6 | 1930 | |
1e71036e JH |
1931 | # Handy way to run perlbug -ok without having to install and run the |
1932 | # installed perlbug. We don't re-run the tests here - we trust the user. | |
1933 | # Please *don't* use this unless all tests pass. | |
1934 | # If you want to report test failures, use "dmake nok" instead. | |
bf543eaf | 1935 | ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions |
a4e8ab8a | 1936 | $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" |
1e71036e | 1937 | |
bf543eaf | 1938 | okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions |
a4e8ab8a | 1939 | $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok |
1e71036e | 1940 | |
bf543eaf | 1941 | nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions |
a4e8ab8a | 1942 | $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" |
1e71036e | 1943 | |
bf543eaf | 1944 | nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions |
a4e8ab8a | 1945 | $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |
bf543eaf | 1946 |