Commit | Line | Data |
---|---|---|
9e42cd94 | 1 | # |
b6c85593 | 2 | # Makefile to build perl on Windows using Microsoft NMAKE. |
9e42cd94 | 3 | # Supported compilers: |
b6c85593 | 4 | # Microsoft Visual C++ 6.0 or later |
02e200fc | 5 | # Windows SDK 64-bit compiler and tools |
9e42cd94 GS |
6 | # |
7 | # This is set up to build a perl.exe that runs off a shared library | |
ba40ea5b | 8 | # (perl523.dll). Also makes individual DLLs for the XS extensions. |
9e42cd94 GS |
9 | # |
10 | ||
11 | ## | |
12 | ## Make sure you read README.win32 *before* you mess with anything here! | |
13 | ## | |
14 | ||
15 | ## | |
16 | ## Build configuration. Edit the values below to suit your needs. | |
17 | ## | |
18 | ||
19 | # | |
20 | # Set these to wherever you want "nmake install" to put your | |
21 | # newly built perl. | |
22 | # | |
23 | INST_DRV = c: | |
24 | INST_TOP = $(INST_DRV)\perl | |
25 | ||
26 | # | |
b86e806e JD |
27 | # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler |
28 | # on a 64-bit version of Windows. | |
890b5089 | 29 | # |
b86e806e JD |
30 | #WIN64 = undef |
31 | ||
32 | # | |
9e42cd94 GS |
33 | # Comment this out if you DON'T want your perl installation to be versioned. |
34 | # This means that the new installation will overwrite any files from the | |
35 | # old installation at the same INST_TOP location. Leaving it enabled is | |
36 | # the safest route, as perl adds the extra version directory to all the | |
37 | # locations it installs files to. If you disable it, an alternative | |
38 | # versioned installation can be obtained by setting INST_TOP above to a | |
39 | # path that includes an arbitrary version string. | |
40 | # | |
430812d7 | 41 | #INST_VER = \5.23.2 |
9e42cd94 GS |
42 | |
43 | # | |
44 | # Comment this out if you DON'T want your perl installation to have | |
45 | # architecture specific components. This means that architecture- | |
46 | # specific files will be installed along with the architecture-neutral | |
47 | # files. Leaving it enabled is safer and more flexible, in case you | |
48 | # want to build multiple flavors of perl and install them together in | |
49 | # the same location. Commenting it out gives you a simpler | |
50 | # installation that is easier to understand for beginners. | |
51 | # | |
bdb4cb88 | 52 | #INST_ARCH = \$(ARCHNAME) |
9e42cd94 GS |
53 | |
54 | # | |
7ada00a0 SH |
55 | # Uncomment this if you want perl to run |
56 | # $Config{sitelibexp}\sitecustomize.pl | |
57 | # before anything else. This script can then be set up, for example, | |
58 | # to add additional entries to @INC. | |
59 | # | |
60 | #USE_SITECUST = define | |
61 | ||
62 | # | |
4fef8ef3 SH |
63 | # uncomment to enable multiple interpreters. This is needed for fork() |
64 | # emulation and for thread support, and is auto-enabled by USE_IMP_SYS | |
65 | # and USE_ITHREADS below. | |
9e42cd94 | 66 | # |
bdb4cb88 | 67 | USE_MULTI = define |
9e42cd94 GS |
68 | |
69 | # | |
4fef8ef3 SH |
70 | # Interpreter cloning/threads; now reasonably complete. |
71 | # This should be enabled to get the fork() emulation. This needs (and | |
72 | # will auto-enable) USE_MULTI above. | |
9e42cd94 | 73 | # |
bdb4cb88 | 74 | USE_ITHREADS = define |
9e42cd94 GS |
75 | |
76 | # | |
77 | # uncomment to enable the implicit "host" layer for all system calls | |
4fef8ef3 SH |
78 | # made by perl. This is also needed to get fork(). This needs (and |
79 | # will auto-enable) USE_MULTI above. | |
9e42cd94 | 80 | # |
bdb4cb88 | 81 | USE_IMP_SYS = define |
9e42cd94 GS |
82 | |
83 | # | |
4a9d6100 GS |
84 | # Comment this out if you don't want to enable large file support for |
85 | # some reason. Should normally only be changed to maintain compatibility | |
86 | # with an older release of perl. | |
890b5089 | 87 | # |
bdb4cb88 | 88 | USE_LARGE_FILES = define |
4a9d6100 GS |
89 | |
90 | # | |
1f64ae15 SH |
91 | # Uncomment this if you're building a 32-bit perl and want 64-bit integers. |
92 | # (If you're building a 64-bit perl then you will have 64-bit integers whether | |
93 | # or not this is uncommented.) | |
38aa66aa | 94 | # Note: This option is not supported in 32-bit MSVC60 builds. |
890b5089 | 95 | # |
1f64ae15 SH |
96 | #USE_64_BIT_INT = define |
97 | ||
98 | # | |
da2c7419 | 99 | # uncomment exactly one of the following |
9e42cd94 | 100 | # |
b2e53f8c | 101 | # Visual C++ 6.0 (aka Visual C++ 98) |
4a9d6100 | 102 | CCTYPE = MSVC60 |
b2e53f8c | 103 | # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version) |
5398666e | 104 | #CCTYPE = MSVC70 |
b2e53f8c | 105 | # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools) |
da2c7419 | 106 | #CCTYPE = MSVC70FREE |
02e200fc JD |
107 | # Windows Server 2003 SP1 Platform SDK (April 2005) |
108 | #CCTYPE = SDK2003SP1 | |
b2e53f8c | 109 | # Visual C++ 2005 (aka Visual C++ 8.0) (full version) |
73c9ebc7 | 110 | #CCTYPE = MSVC80 |
b2e53f8c | 111 | # Visual C++ 2005 Express Edition (aka Visual C++ 8.0) (free version) |
5398666e | 112 | #CCTYPE = MSVC80FREE |
b2e53f8c | 113 | # Visual C++ 2008 (aka Visual C++ 9.0) (full version) |
4a3cf07b | 114 | #CCTYPE = MSVC90 |
b2e53f8c | 115 | # Visual C++ 2008 Express Edition (aka Visual C++ 9.0) (free version) |
5398666e | 116 | #CCTYPE = MSVC90FREE |
b2e53f8c | 117 | # Visual C++ 2010 (aka Visual C++ 10.0) (full version) |
2a46176f | 118 | #CCTYPE = MSVC100 |
b2e53f8c | 119 | # Visual C++ 2010 Express Edition (aka Visual C++ 10.0) (free version) |
5398666e | 120 | #CCTYPE = MSVC100FREE |
b2e53f8c | 121 | # Visual C++ 2012 (aka Visual C++ 11.0) (full version) |
5398666e | 122 | #CCTYPE = MSVC110 |
b2e53f8c | 123 | # Visual C++ 2012 Express Edition (aka Visual C++ 11.0) (free version) |
5398666e | 124 | #CCTYPE = MSVC110FREE |
b2e53f8c | 125 | # Visual C++ 2013 (aka Visual C++ 12.0) (full version) |
3e7c2d43 | 126 | #CCTYPE = MSVC120 |
b2e53f8c | 127 | # Visual C++ 2013 Express Edition (aka Visual C++ 12.0) (free version) |
3e7c2d43 | 128 | #CCTYPE = MSVC120FREE |
9e42cd94 GS |
129 | |
130 | # | |
a48cc4c4 DD |
131 | # If you are using Intel C++ Compiler uncomment this |
132 | # | |
133 | #__ICC = define | |
134 | ||
135 | # | |
f9bbfafd SH |
136 | # Uncomment this if you want to build everything in C++ mode |
137 | # | |
138 | #USE_CPLUSPLUS = define | |
139 | ||
140 | # | |
31c916d2 | 141 | # uncomment next line if you want debug version of perl (big/slow) |
f7d585d3 GS |
142 | # If not enabled, we automatically try to use maximum optimization |
143 | # with all compilers that are known to have a working optimizer. | |
9e42cd94 | 144 | # |
31c916d2 SH |
145 | # You can also set CFG = DebugSymbols for a slightly smaller/faster |
146 | # debug build without the special debugging code in perl which is | |
147 | # enabled via -DDEBUGGING; | |
148 | # | |
149 | # or you can set CFG = DebugFull for an even fuller (bigger/slower) | |
150 | # debug build using the debug version of the CRT, and enabling VC++ | |
151 | # debug features such as extra assertions and invalid parameter warnings | |
152 | # in perl and CRT code via -D_DEBUG. (Note that the invalid parameter | |
153 | # handler does get triggered from time to time in this configuration, | |
154 | # which causes warnings to be printed on STDERR, which in turn causes a | |
155 | # few tests to fail.) | |
156 | # | |
9e42cd94 GS |
157 | #CFG = Debug |
158 | ||
159 | # | |
9e42cd94 GS |
160 | # uncomment to enable linking with setargv.obj under the Visual C |
161 | # compiler. Setting this options enables perl to expand wildcards in | |
162 | # arguments, but it may be harder to use alternate methods like | |
163 | # File::DosGlob that are more powerful. This option is supported only with | |
164 | # Visual C. | |
165 | # | |
166 | #USE_SETARGV = define | |
167 | ||
168 | # | |
9e42cd94 GS |
169 | # set this if you wish to use perl's malloc |
170 | # WARNING: Turning this on/off WILL break binary compatibility with extensions | |
171 | # you may have compiled with/without it. Be prepared to recompile all | |
172 | # extensions if you change the default. Currently, this cannot be enabled | |
173 | # if you ask for USE_IMP_SYS above. | |
174 | # | |
175 | #PERL_MALLOC = define | |
176 | ||
177 | # | |
06c896bb SH |
178 | # set this to enable debugging mstats |
179 | # This must be enabled to use the Devel::Peek::mstat() function. This cannot | |
180 | # be enabled without PERL_MALLOC as well. | |
181 | # | |
bdb4cb88 | 182 | #DEBUG_MSTATS = define |
06c896bb SH |
183 | |
184 | # | |
4e036e4b VK |
185 | # set this to additionally provide a statically linked perl-static.exe. |
186 | # Note that dynamic loading will not work with this perl, so you must | |
a1f2e719 | 187 | # include required modules statically using the STATIC_EXT or ALL_STATIC |
ba40ea5b | 188 | # variables below. A static library perl523s.lib will also be created. |
4e036e4b VK |
189 | # Ordinary perl.exe is not affected by this option. |
190 | # | |
191 | #BUILD_STATIC = define | |
192 | ||
193 | # | |
a1f2e719 VK |
194 | # in addition to BUILD_STATIC the option ALL_STATIC makes *every* |
195 | # extension get statically built | |
196 | # This will result in a very large perl executable, but the main purpose | |
197 | # is to have proper linking set so as to be able to create miscellaneous | |
198 | # executables with different built-in extensions | |
199 | # | |
200 | #ALL_STATIC = define | |
201 | ||
202 | # | |
06c896bb | 203 | # |
9e42cd94 GS |
204 | # set the install locations of the compiler include/libraries |
205 | # Running VCVARS32.BAT is *required* when using Visual C. | |
206 | # Some versions of Visual C don't define MSVCDIR in the environment, | |
207 | # so you may have to set CCHOME explicitly (spaces in the path name should | |
208 | # not be quoted) | |
209 | # | |
9e42cd94 GS |
210 | CCHOME = $(MSVCDIR) |
211 | CCINCDIR = $(CCHOME)\include | |
212 | CCLIBDIR = $(CCHOME)\lib | |
213 | ||
214 | # | |
215 | # Additional compiler flags can be specified here. | |
216 | # | |
2e30e1e1 | 217 | BUILDOPT = $(BUILDOPTEXTRA) |
9e42cd94 | 218 | |
7ada00a0 | 219 | # |
9e42cd94 GS |
220 | # This should normally be disabled. Enabling it will disable the File::Glob |
221 | # implementation of CORE::glob. | |
222 | # | |
223 | #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB | |
224 | ||
225 | # | |
270ca148 JD |
226 | # Perl needs to read scripts in text mode so that the DATA filehandle |
227 | # works correctly with seek() and tell(), or around auto-flushes of | |
228 | # all filehandles (e.g. by system(), backticks, fork(), etc). | |
bdb4cb88 | 229 | # |
270ca148 JD |
230 | # The current version on the ByteLoader module on CPAN however only |
231 | # works if scripts are read in binary mode. But before you disable text | |
232 | # mode script reading (and break some DATA filehandle functionality) | |
233 | # please check first if an updated ByteLoader isn't available on CPAN. | |
234 | # | |
235 | BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS | |
9e42cd94 GS |
236 | |
237 | # | |
238 | # specify semicolon-separated list of extra directories that modules will | |
239 | # look for libraries (spaces in path names need not be quoted) | |
240 | # | |
241 | EXTRALIBDIRS = | |
242 | ||
243 | # | |
244 | # set this to your email address (perl will guess a value from | |
245 | # from your loginname and your hostname, which may not be right) | |
246 | # | |
247 | #EMAIL = | |
248 | ||
249 | ## | |
250 | ## Build configuration ends. | |
251 | ## | |
252 | ||
253 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### | |
254 | ||
646e33b6 SH |
255 | !IF "$(USE_IMP_SYS)" == "define" |
256 | PERL_MALLOC = undef | |
257 | DEBUG_MSTATS = undef | |
258 | !ENDIF | |
259 | ||
9e42cd94 GS |
260 | !IF "$(PERL_MALLOC)" == "" |
261 | PERL_MALLOC = undef | |
646e33b6 | 262 | DEBUG_MSTATS = undef |
06c896bb SH |
263 | !ENDIF |
264 | ||
265 | !IF "$(DEBUG_MSTATS)" == "" | |
646e33b6 | 266 | DEBUG_MSTATS = undef |
06c896bb SH |
267 | !ENDIF |
268 | ||
269 | !IF "$(DEBUG_MSTATS)" == "define" | |
646e33b6 | 270 | BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS |
9e42cd94 GS |
271 | !ENDIF |
272 | ||
7ada00a0 SH |
273 | !IF "$(USE_SITECUST)" == "" |
274 | USE_SITECUST = undef | |
275 | !ENDIF | |
276 | ||
9e42cd94 GS |
277 | !IF "$(USE_MULTI)" == "" |
278 | USE_MULTI = undef | |
279 | !ENDIF | |
280 | ||
281 | !IF "$(USE_ITHREADS)" == "" | |
282 | USE_ITHREADS = undef | |
283 | !ENDIF | |
284 | ||
285 | !IF "$(USE_IMP_SYS)" == "" | |
286 | USE_IMP_SYS = undef | |
287 | !ENDIF | |
288 | ||
4a9d6100 GS |
289 | !IF "$(USE_LARGE_FILES)" == "" |
290 | USE_LARGE_FILES = undef | |
291 | !ENDIF | |
292 | ||
1f64ae15 SH |
293 | !IF "$(USE_64_BIT_INT)" == "" |
294 | USE_64_BIT_INT = undef | |
295 | !ENDIF | |
296 | ||
3db8f154 | 297 | !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef" |
9e42cd94 GS |
298 | USE_MULTI = define |
299 | !ENDIF | |
300 | ||
301 | !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" | |
302 | USE_MULTI = define | |
9e42cd94 GS |
303 | !ENDIF |
304 | ||
7ada00a0 SH |
305 | !IF "$(USE_SITECUST)" == "define" |
306 | BUILDOPT = $(BUILDOPT) -DUSE_SITECUSTOMIZE | |
307 | !ENDIF | |
308 | ||
3db8f154 | 309 | !IF "$(USE_MULTI)" != "undef" |
9e42cd94 GS |
310 | BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT |
311 | !ENDIF | |
312 | ||
313 | !IF "$(USE_IMP_SYS)" != "undef" | |
314 | BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS | |
315 | !ENDIF | |
316 | ||
317 | !IF "$(PROCESSOR_ARCHITECTURE)" == "" | |
318 | PROCESSOR_ARCHITECTURE = x86 | |
319 | !ENDIF | |
320 | ||
c623ac67 | 321 | !IF "$(WIN64)" == "" |
bf2a35e5 JD |
322 | # When we are running from a 32bit cmd.exe on AMD64 then |
323 | # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432 | |
324 | # is set to AMD64 | |
c623ac67 GS |
325 | !IF "$(PROCESSOR_ARCHITEW6432)" != "" |
326 | PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432) | |
327 | WIN64 = define | |
328 | !ELSE | |
bf2a35e5 | 329 | !IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64" |
c623ac67 GS |
330 | WIN64 = define |
331 | !ELSE | |
332 | WIN64 = undef | |
333 | !ENDIF | |
334 | !ENDIF | |
335 | !ENDIF | |
336 | ||
1f64ae15 SH |
337 | !IF "$(WIN64)" == "define" |
338 | USE_64_BIT_INT = define | |
339 | !ENDIF | |
340 | ||
02e200fc JD |
341 | # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because |
342 | # both link against MSVCRT.dll (which is part of Windows itself) and | |
343 | # not against a compiler specific versioned runtime. | |
344 | !IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60" | |
345 | CCTYPE = SDK2003SP1 | |
346 | !ENDIF | |
347 | ||
38aa66aa SH |
348 | # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler |
349 | # does not support it. | |
350 | !IF "$(CCTYPE)" == "MSVC60" | |
351 | !UNDEF USE_64_BIT_INT | |
352 | USE_64_BIT_INT = undef | |
353 | !ENDIF | |
354 | ||
5398666e SH |
355 | # Most relevant compiler-specific options fall into two groups: |
356 | # either pre-MSVC80 or MSVC80 onwards, so define a macro for this. | |
357 | !IF "$(CCTYPE)" == "MSVC60" || \ | |
358 | "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE" | |
359 | PREMSVC80 = define | |
360 | !ELSE | |
361 | PREMSVC80 = undef | |
362 | !ENDIF | |
363 | ||
bf2a35e5 JD |
364 | ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) |
365 | !IF "$(ARCHITECTURE)" == "AMD64" | |
366 | ARCHITECTURE = x64 | |
9453ddcd | 367 | !ENDIF |
bf2a35e5 JD |
368 | !IF "$(ARCHITECTURE)" == "IA64" |
369 | ARCHITECTURE = ia64 | |
9453ddcd SH |
370 | !ENDIF |
371 | ||
9e42cd94 | 372 | !IF "$(USE_MULTI)" == "define" |
bf2a35e5 | 373 | ARCHNAME = MSWin32-$(ARCHITECTURE)-multi |
9e42cd94 | 374 | !ELSE |
bf2a35e5 | 375 | ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio |
9e42cd94 GS |
376 | !ENDIF |
377 | ||
378 | !IF "$(USE_ITHREADS)" == "define" | |
379 | ARCHNAME = $(ARCHNAME)-thread | |
380 | !ENDIF | |
381 | ||
1f64ae15 SH |
382 | !IF "$(WIN64)" != "define" |
383 | !IF "$(USE_64_BIT_INT)" == "define" | |
384 | ARCHNAME = $(ARCHNAME)-64int | |
385 | !ENDIF | |
386 | !ENDIF | |
387 | ||
b2e53f8c | 388 | # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test |
5398666e SH |
389 | # suite run in about 10% less time. |
390 | !IF "$(CCTYPE)" != "MSVC70FREE" | |
d1a8253e | 391 | DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib |
9e42cd94 GS |
392 | !ENDIF |
393 | ||
b2e53f8c | 394 | # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and |
4a3cf07b | 395 | # DLLs. These either need copying everywhere with the binaries, or else need |
3ddd48aa SH |
396 | # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For |
397 | # simplicity, embed them if they exist (and delete them afterwards so that they | |
398 | # don't get installed too). | |
4adc95e6 SH |
399 | EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \ |
400 | if exist $@.manifest del $@.manifest | |
401 | EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \ | |
402 | if exist $@.manifest del $@.manifest | |
c8e599d3 | 403 | |
9e42cd94 GS |
404 | ARCHDIR = ..\lib\$(ARCHNAME) |
405 | COREDIR = ..\lib\CORE | |
406 | AUTODIR = ..\lib\auto | |
407 | LIBDIR = ..\lib | |
408 | EXTDIR = ..\ext | |
a193a2db | 409 | DISTDIR = ..\dist |
b212a3c6 | 410 | CPANDIR = ..\cpan |
9e42cd94 | 411 | PODDIR = ..\pod |
b4a41557 | 412 | HTMLDIR = .\html |
9e42cd94 GS |
413 | |
414 | # | |
415 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin | |
416 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) | |
417 | INST_LIB = $(INST_TOP)$(INST_VER)\lib | |
418 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) | |
419 | INST_COREDIR = $(INST_ARCHLIB)\CORE | |
9e42cd94 GS |
420 | INST_HTML = $(INST_TOP)$(INST_VER)\html |
421 | ||
422 | # | |
423 | # Programs to compile, build .lib files and link | |
424 | # | |
425 | ||
a48cc4c4 | 426 | !IF "$(__ICC)" != "define" |
9e42cd94 GS |
427 | CC = cl |
428 | LINK32 = link | |
a48cc4c4 DD |
429 | !ELSE |
430 | CC = icl | |
431 | LINK32 = xilink | |
432 | !ENDIF | |
9e42cd94 GS |
433 | LIB32 = $(LINK32) -lib |
434 | RSC = rc | |
435 | ||
436 | # | |
437 | # Options | |
438 | # | |
439 | ||
440 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. | |
441 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX | |
9cef8306 | 442 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT |
9e42cd94 | 443 | LOCDEFS = -DPERLDLL -DPERL_CORE |
a7d225ec | 444 | CXX_FLAG = -TP -EHsc |
9e42cd94 | 445 | |
31c916d2 | 446 | LIBC = msvcrt.lib |
9e42cd94 | 447 | |
9e42cd94 | 448 | !IF "$(CFG)" == "Debug" |
9e42cd94 | 449 | OPTIMIZE = -Od -MD -Zi -DDEBUGGING |
c623ac67 | 450 | LINK_DBG = -debug |
9e42cd94 | 451 | !ELSE |
31c916d2 SH |
452 | !IF "$(CFG)" == "DebugSymbols" |
453 | OPTIMIZE = -Od -MD -Zi | |
454 | LINK_DBG = -debug | |
455 | !ELSE | |
456 | !IF "$(CFG)" == "DebugFull" | |
457 | LIBC = msvcrtd.lib | |
458 | OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING | |
459 | LINK_DBG = -debug | |
460 | !ELSE | |
00a13560 SH |
461 | # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64 |
462 | OPTIMIZE = -O1 -MD -Zi -DNDEBUG | |
ec25c072 SH |
463 | # we enable debug symbols in release builds also |
464 | LINK_DBG = -debug -opt:ref,icf | |
465 | # you may want to enable this if you want COFF symbols in the executables | |
466 | # in addition to the PDB symbols. The default Dr. Watson that ships with | |
467 | # Windows can use the the former but not latter. The free WinDbg can be | |
468 | # installed to get better stack traces from just the PDB symbols, so we | |
469 | # avoid the bloat of COFF symbols by default. | |
470 | #LINK_DBG = $(LINK_DBG) -debugtype:both | |
a9e3f359 | 471 | ! IF "$(CCTYPE)" != "MSVC60" |
d921a5fb | 472 | # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) |
00a13560 | 473 | OPTIMIZE = $(OPTIMIZE) -GL |
d921a5fb | 474 | LINK_DBG = $(LINK_DBG) -ltcg |
a9e3f359 | 475 | LIB_FLAGS = -ltcg |
d921a5fb | 476 | ! ENDIF |
9e42cd94 | 477 | !ENDIF |
31c916d2 SH |
478 | !ENDIF |
479 | !ENDIF | |
9e42cd94 | 480 | |
c623ac67 GS |
481 | !IF "$(WIN64)" == "define" |
482 | DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE | |
f33a21d8 | 483 | OPTIMIZE = $(OPTIMIZE) -fp:precise |
da2c7419 SH |
484 | !ENDIF |
485 | ||
b2e53f8c | 486 | # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions |
4a3cf07b | 487 | # and POSIX CRT function names being deprecated. |
5398666e | 488 | !IF "$(PREMSVC80)" == "undef" |
26a6faa8 | 489 | DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE |
c5b31784 SH |
490 | !ENDIF |
491 | ||
45f6403b JD |
492 | # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to |
493 | # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T | |
494 | # preprocessor option to revert back to the old functionality for | |
495 | # backward compatibility. We define this symbol here for older 32-bit | |
496 | # compilers only (which aren't using it at all) for the sole purpose | |
497 | # of getting it into $Config{ccflags}. That way if someone builds | |
498 | # Perl itself with e.g. VC6 but later installs an XS module using VC8 | |
499 | # the time_t types will still be compatible. | |
500 | !IF "$(WIN64)" == "undef" | |
5398666e | 501 | ! IF "$(PREMSVC80)" == "define" |
45f6403b JD |
502 | BUILDOPT = $(BUILDOPT) -D_USE_32BIT_TIME_T |
503 | ! ENDIF | |
504 | !ENDIF | |
505 | ||
9cef8306 | 506 | LIBBASEFILES = \ |
9e42cd94 GS |
507 | oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ |
508 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ | |
036c1c1e | 509 | netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \ |
4ebea3c6 | 510 | version.lib odbc32.lib odbccp32.lib comctl32.lib |
c623ac67 | 511 | |
a48cc4c4 DD |
512 | # Avoid __intel_new_proc_init link error for libircmt. |
513 | # libmmd is /MD equivelent, other variants exist. | |
514 | # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99, | |
515 | # and optimized C89 funcs | |
516 | !IF "$(__ICC)" == "define" | |
517 | LIBBASEFILES = $(LIBBASEFILES) libircmt.lib libmmd.lib | |
518 | !ENDIF | |
519 | ||
02e200fc JD |
520 | # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which |
521 | # doesn't include the buffer overrun verification code used by the /GS switch. | |
9453ddcd | 522 | # Since the code links against libraries that are compiled with /GS, this |
02e200fc JD |
523 | # "security cookie verification" code must be included via bufferoverflow.lib. |
524 | !IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1" | |
9453ddcd | 525 | LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib |
c623ac67 | 526 | !ENDIF |
9e42cd94 | 527 | |
9e42cd94 GS |
528 | LIBFILES = $(LIBBASEFILES) $(LIBC) |
529 | ||
a5ca303d | 530 | #EXTRACFLAGS = -nologo -GF -W4 -wd4127 -wd4706 |
9453ddcd | 531 | EXTRACFLAGS = -nologo -GF -W3 |
312159d9 DD |
532 | !IF "$(__ICC)" == "define" |
533 | EXTRACFLAGS = $(EXTRACFLAGS) -Qstd=c99 | |
534 | !ENDIF | |
f9bbfafd SH |
535 | !IF "$(USE_CPLUSPLUS)" == "define" |
536 | EXTRACFLAGS = $(EXTRACFLAGS) $(CXX_FLAG) | |
537 | !ENDIF | |
bb275e72 | 538 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
9e42cd94 GS |
539 | $(PCHFLAGS) $(OPTIMIZE) |
540 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ | |
541 | -libpath:"$(INST_COREDIR)" \ | |
542 | -machine:$(PROCESSOR_ARCHITECTURE) | |
a9e3f359 | 543 | LIB_FLAGS = $(LIB_FLAGS) -nologo |
9e42cd94 GS |
544 | OBJOUT_FLAG = -Fo |
545 | EXEOUT_FLAG = -Fe | |
546 | ||
547 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) | |
548 | ||
5398666e | 549 | !IF "$(PREMSVC80)" == "undef" |
4ebea3c6 JD |
550 | LINK_FLAGS = $(LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" |
551 | !ELSE | |
552 | RSC_FLAGS = -DINCLUDE_MANIFEST | |
553 | !ENDIF | |
554 | ||
b2e53f8c SH |
555 | # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm |
556 | # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building | |
269713a1 DD |
557 | # Console vs GUI makes no difference for DLLs, so use default for cleaner |
558 | # building cmd lines | |
559 | !IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC120FREE" \ | |
b2e53f8c | 560 | || "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" |
269713a1 DD |
561 | ! IF "$(WIN64)" == "define" |
562 | LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.02" | |
563 | ! ELSE | |
564 | LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.01" | |
565 | ! ENDIF | |
566 | PRIV_LINK_FLAGS = | |
567 | ||
568 | !ELSE | |
569 | PRIV_LINK_FLAGS = -subsystem:console | |
570 | !ENDIF | |
571 | ||
572 | BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) | |
4ebea3c6 | 573 | |
9e42cd94 GS |
574 | #################### do not edit below this line ####################### |
575 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## | |
576 | ||
577 | o = .obj | |
578 | ||
579 | # | |
580 | # Rules | |
581 | # | |
582 | ||
9c958f05 | 583 | #clear the list, we dont support .cxx .bas .cbl .for .pas .f .f90 |
f4eedc6b DD |
584 | # .asm .cpp are not currently used but they are included for completeness |
585 | .SUFFIXES : | |
586 | .SUFFIXES : .c $(o) .cpp .asm .dll .lib .exe .rc .res | |
9e42cd94 GS |
587 | |
588 | .c$(o): | |
589 | $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< | |
590 | ||
61b311ca DD |
591 | .c.i: |
592 | $(CC) -c -I$(<D) $(CFLAGS_O) -P $(OBJOUT_FLAG)$@ $< | |
593 | ||
9e42cd94 GS |
594 | .y.c: |
595 | $(NOOP) | |
596 | ||
597 | $(o).dll: | |
269713a1 DD |
598 | $(LINK32) -dll -implib:$(*B).lib -def:$(*B).def \ |
599 | -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL) | |
c8e599d3 | 600 | $(EMBED_DLL_MANI) |
9e42cd94 GS |
601 | |
602 | .rc.res: | |
4ebea3c6 | 603 | $(RSC) -i.. $(RSC_FLAGS) $< |
9e42cd94 GS |
604 | |
605 | # | |
606 | # various targets | |
607 | ||
608 | # makedef.pl must be updated if this changes, and this should normally | |
609 | # only change when there is an incompatible revision of the public API. | |
ba40ea5b RS |
610 | PERLIMPLIB = ..\perl523.lib |
611 | PERLSTATICLIB = ..\perl523s.lib | |
612 | PERLDLL = ..\perl523.dll | |
9e42cd94 GS |
613 | |
614 | MINIPERL = ..\miniperl.exe | |
615 | MINIDIR = .\mini | |
616 | PERLEXE = ..\perl.exe | |
617 | WPERLEXE = ..\wperl.exe | |
4e036e4b | 618 | PERLEXESTATIC = ..\perl-static.exe |
9e42cd94 | 619 | GLOBEXE = ..\perlglob.exe |
04bae4fb | 620 | CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl |
202d1001 | 621 | GENUUDMAP = ..\generate_uudmap.exe |
eb4420e6 | 622 | !IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define" |
4e036e4b VK |
623 | PERLSTATIC = static |
624 | !ELSE | |
625 | PERLSTATIC = | |
626 | !ENDIF | |
5b04aee6 | 627 | |
ca12659b | 628 | # Unicode data files generated by mktables |
36ff7f95 SH |
629 | FIRSTUNIFILE = ..\lib\unicore\Decomposition.pl |
630 | UNIDATAFILES = ..\lib\unicore\Decomposition.pl \ | |
7ebf06b3 | 631 | ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \ |
1a234f2b KW |
632 | ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst \ |
633 | ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \ | |
3e344d15 | 634 | ..\lib\unicore\TestProp.pl |
ca12659b NC |
635 | |
636 | # Directories of Unicode data files generated by mktables | |
27a8011f SH |
637 | UNIDATADIR1 = ..\lib\unicore\To |
638 | UNIDATADIR2 = ..\lib\unicore\lib | |
ca12659b | 639 | |
4ebea3c6 | 640 | PERLEXE_MANIFEST= .\perlexe.manifest |
3890b58f RGS |
641 | PERLEXE_ICO = .\perlexe.ico |
642 | PERLEXE_RES = .\perlexe.res | |
643 | PERLDLL_RES = | |
644 | ||
9e42cd94 GS |
645 | # Nominate a target which causes extensions to be re-built |
646 | # This used to be $(PERLEXE), but at worst it is the .dll that they depend | |
647 | # on and really only the interface - i.e. the .def file used to export symbols | |
648 | # from the .dll | |
649 | PERLDEP = perldll.def | |
650 | ||
651 | PL2BAT = bin\pl2bat.pl | |
652 | GLOBBAT = bin\perlglob.bat | |
653 | ||
654 | UTILS = \ | |
655 | ..\utils\h2ph \ | |
656 | ..\utils\splain \ | |
9e42cd94 GS |
657 | ..\utils\perlbug \ |
658 | ..\utils\pl2pm \ | |
659 | ..\utils\c2ph \ | |
827a599d | 660 | ..\utils\pstruct \ |
9e42cd94 GS |
661 | ..\utils\h2xs \ |
662 | ..\utils\perldoc \ | |
9e42cd94 GS |
663 | ..\utils\perlivp \ |
664 | ..\utils\libnetcfg \ | |
827a599d | 665 | ..\utils\enc2xs \ |
59658819 | 666 | ..\utils\encguess \ |
827a599d | 667 | ..\utils\piconv \ |
18a1cebe | 668 | ..\utils\corelist \ |
83cd6e83 | 669 | ..\utils\cpan \ |
ea0e987d | 670 | ..\utils\xsubpp \ |
4b618757 | 671 | ..\utils\prove \ |
291d3373 | 672 | ..\utils\ptar \ |
b8669316 | 673 | ..\utils\ptardiff \ |
deabda19 | 674 | ..\utils\ptargrep \ |
08ad9465 | 675 | ..\utils\zipdetails \ |
3ddf9550 | 676 | ..\utils\shasum \ |
ea0e987d | 677 | ..\utils\instmodsh \ |
84f04405 | 678 | ..\utils\json_pp \ |
d658129c | 679 | ..\utils\pod2html \ |
9e42cd94 GS |
680 | bin\exetype.pl \ |
681 | bin\runperl.pl \ | |
682 | bin\pl2bat.pl \ | |
683 | bin\perlglob.pl \ | |
684 | bin\search.pl | |
685 | ||
686 | MAKE = nmake -nologo | |
687 | MAKE_BARE = nmake | |
688 | ||
689 | CFGSH_TMPL = config.vc | |
690 | CFGH_TMPL = config_H.vc | |
691 | ||
b6ed7314 YO |
692 | XCOPY = xcopy /f /r /i /d /y |
693 | RCOPY = xcopy /f /r /i /e /d /y | |
65980d94 | 694 | NOOP = @rem |
9e42cd94 GS |
695 | NULL = |
696 | ||
697 | DEL = del | |
698 | ||
9e42cd94 GS |
699 | MICROCORE_SRC = \ |
700 | ..\av.c \ | |
0f8f167c | 701 | ..\caretx.c \ |
9e42cd94 GS |
702 | ..\deb.c \ |
703 | ..\doio.c \ | |
704 | ..\doop.c \ | |
a55c5245 | 705 | ..\dquote.c \ |
9e42cd94 GS |
706 | ..\dump.c \ |
707 | ..\globals.c \ | |
708 | ..\gv.c \ | |
8b371338 | 709 | ..\mro_core.c \ |
9e42cd94 GS |
710 | ..\hv.c \ |
711 | ..\locale.c \ | |
26ea9e12 | 712 | ..\keywords.c \ |
a0d89a74 | 713 | ..\mathoms.c \ |
9e42cd94 GS |
714 | ..\mg.c \ |
715 | ..\numeric.c \ | |
716 | ..\op.c \ | |
295f0f84 | 717 | ..\pad.c \ |
9e42cd94 GS |
718 | ..\perl.c \ |
719 | ..\perlapi.c \ | |
720 | ..\perly.c \ | |
721 | ..\pp.c \ | |
722 | ..\pp_ctl.c \ | |
723 | ..\pp_hot.c \ | |
724 | ..\pp_pack.c \ | |
725 | ..\pp_sort.c \ | |
726 | ..\pp_sys.c \ | |
10bc17b6 | 727 | ..\reentr.c \ |
9e42cd94 GS |
728 | ..\regcomp.c \ |
729 | ..\regexec.c \ | |
730 | ..\run.c \ | |
731 | ..\scope.c \ | |
732 | ..\sv.c \ | |
733 | ..\taint.c \ | |
f832b29a | 734 | ..\time64.c \ |
9e42cd94 GS |
735 | ..\toke.c \ |
736 | ..\universal.c \ | |
737 | ..\utf8.c \ | |
48462a74 | 738 | ..\util.c |
9e42cd94 GS |
739 | |
740 | EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c | |
741 | ||
742 | !IF "$(PERL_MALLOC)" == "define" | |
743 | EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c | |
744 | !ENDIF | |
745 | ||
746 | EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c | |
747 | ||
748 | WIN32_SRC = \ | |
749 | .\win32.c \ | |
8c847e66 | 750 | .\win32io.c \ |
9e42cd94 | 751 | .\win32sck.c \ |
9cef8306 JD |
752 | .\win32thread.c \ |
753 | .\fcrypt.c | |
9e42cd94 | 754 | |
9e42cd94 GS |
755 | CORE_NOCFG_H = \ |
756 | ..\av.h \ | |
757 | ..\cop.h \ | |
758 | ..\cv.h \ | |
759 | ..\dosish.h \ | |
760 | ..\embed.h \ | |
761 | ..\form.h \ | |
762 | ..\gv.h \ | |
763 | ..\handy.h \ | |
764 | ..\hv.h \ | |
4d3a042d | 765 | ..\hv_func.h \ |
9e42cd94 GS |
766 | ..\iperlsys.h \ |
767 | ..\mg.h \ | |
768 | ..\nostdio.h \ | |
769 | ..\op.h \ | |
770 | ..\opcode.h \ | |
771 | ..\perl.h \ | |
772 | ..\perlapi.h \ | |
773 | ..\perlsdio.h \ | |
9e42cd94 GS |
774 | ..\perly.h \ |
775 | ..\pp.h \ | |
776 | ..\proto.h \ | |
cdb0f547 | 777 | ..\regcomp.h \ |
9e42cd94 GS |
778 | ..\regexp.h \ |
779 | ..\scope.h \ | |
780 | ..\sv.h \ | |
781 | ..\thread.h \ | |
782 | ..\unixish.h \ | |
783 | ..\utf8.h \ | |
784 | ..\util.h \ | |
785 | ..\warnings.h \ | |
786 | ..\XSUB.h \ | |
787 | ..\EXTERN.h \ | |
788 | ..\perlvars.h \ | |
789 | ..\intrpvar.h \ | |
9e42cd94 GS |
790 | .\include\dirent.h \ |
791 | .\include\netdb.h \ | |
c44e86c9 | 792 | .\include\sys\errno2.h \ |
9e42cd94 GS |
793 | .\include\sys\socket.h \ |
794 | .\win32.h | |
795 | ||
a148edb6 | 796 | CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h |
9e42cd94 | 797 | |
202d1001 | 798 | UUDMAP_H = ..\uudmap.h |
efa50c51 | 799 | BITCOUNT_H = ..\bitcount.h |
6f83ef0e | 800 | MG_DATA_H = ..\mg_data.h |
9387abf8 | 801 | GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H) |
202d1001 | 802 | |
9e42cd94 GS |
803 | MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj) |
804 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj) | |
805 | WIN32_OBJ = $(WIN32_SRC:.c=.obj) | |
806 | MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \ | |
807 | $(MINIDIR)\miniperlmain$(o) \ | |
808 | $(MINIDIR)\perlio$(o) | |
809 | MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\) | |
810 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) | |
281da5ea | 811 | DLL_OBJ = $(DYNALOADER) |
202d1001 | 812 | GENUUDMAP_OBJ = $(GENUUDMAP:.exe=.obj) |
9e42cd94 GS |
813 | |
814 | PERLDLL_OBJ = $(CORE_OBJ) | |
815 | PERLEXE_OBJ = perlmain$(o) | |
4e036e4b | 816 | PERLEXEST_OBJ = perlmainst$(o) |
9e42cd94 GS |
817 | |
818 | PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ) | |
9e42cd94 GS |
819 | |
820 | !IF "$(USE_SETARGV)" != "" | |
821 | SETARGV_OBJ = setargv$(o) | |
822 | !ENDIF | |
823 | ||
a1f2e719 VK |
824 | !IF "$(ALL_STATIC)" == "define" |
825 | # some exclusions, unfortunately, until fixed: | |
903f2d70 | 826 | # - MakeMaker isn't capable enough for SDBM_File (small bug) |
13cedc2a | 827 | STATIC_EXT = * !SDBM_File |
a1f2e719 VK |
828 | !ELSE |
829 | # specify static extensions here, for example: | |
7a278470 SH |
830 | # (be sure to include Win32CORE to load Win32 on demand) |
831 | #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib | |
78ff2d7b | 832 | STATIC_EXT = Win32CORE |
a1f2e719 | 833 | !ENDIF |
595589fa | 834 | |
281da5ea | 835 | DYNALOADER = ..\DynaLoader$(o) |
9e42cd94 | 836 | |
9e42cd94 | 837 | CFG_VARS = \ |
9e42cd94 GS |
838 | "INST_TOP=$(INST_TOP)" \ |
839 | "INST_VER=$(INST_VER)" \ | |
840 | "INST_ARCH=$(INST_ARCH)" \ | |
841 | "archname=$(ARCHNAME)" \ | |
842 | "cc=$(CC)" \ | |
843 | "ld=$(LINK32)" \ | |
bb275e72 | 844 | "ccflags=$(EXTRACFLAGS) $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \ |
f9bbfafd | 845 | "usecplusplus=$(USE_CPLUSPLUS)" \ |
9e42cd94 | 846 | "cf_email=$(EMAIL)" \ |
9e42cd94 GS |
847 | "d_mymalloc=$(PERL_MALLOC)" \ |
848 | "libs=$(LIBFILES)" \ | |
849 | "incpath=$(CCINCDIR:"=\")" \ | |
850 | "libperl=$(PERLIMPLIB:..\=)" \ | |
851 | "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \ | |
852 | "libc=$(LIBC)" \ | |
853 | "make=$(MAKE_BARE)" \ | |
d2b25974 | 854 | "static_ext=$(STATIC_EXT)" \ |
7e0017d3 | 855 | "usethreads=$(USE_ITHREADS)" \ |
9e42cd94 | 856 | "useithreads=$(USE_ITHREADS)" \ |
9e42cd94 | 857 | "usemultiplicity=$(USE_MULTI)" \ |
1f64ae15 | 858 | "use64bitint=$(USE_64_BIT_INT)" \ |
c674478b | 859 | "uselongdouble=undef" \ |
4a9d6100 | 860 | "uselargefiles=$(USE_LARGE_FILES)" \ |
7ada00a0 | 861 | "usesitecustomize=$(USE_SITECUST)" \ |
9e42cd94 | 862 | "LINK_FLAGS=$(LINK_FLAGS:"=\")" \ |
1f64ae15 SH |
863 | "optimize=$(OPTIMIZE:"=\")" \ |
864 | "WIN64=$(WIN64)" | |
9e42cd94 GS |
865 | |
866 | # | |
867 | # Top targets | |
868 | # | |
869 | ||
7b4d95f7 | 870 | all : .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \ |
e5a8a0fb | 871 | $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions $(PERLSTATIC) |
9e42cd94 GS |
872 | @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite. |
873 | ||
c900f745 | 874 | regnodes : ..\regnodes.h |
5d458dd8 | 875 | |
5b04aee6 | 876 | ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h |
e64b1bd1 YO |
877 | |
878 | ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h | |
879 | ||
7b4d95f7 | 880 | reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \ |
e5a8a0fb | 881 | $(UNIDATAFILES) $(PERLEXE) Extensions_reonly |
a24cc0c0 YO |
882 | @echo Perl and 're' are up to date. |
883 | ||
4e036e4b VK |
884 | static: $(PERLEXESTATIC) |
885 | ||
9e42cd94 GS |
886 | #------------------------------------------------------------ |
887 | ||
888 | $(GLOBEXE) : perlglob$(o) | |
269713a1 | 889 | $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ \ |
9e42cd94 | 890 | perlglob$(o) setargv$(o) |
c8e599d3 | 891 | $(EMBED_EXE_MANI) |
9e42cd94 GS |
892 | |
893 | perlglob$(o) : perlglob.c | |
894 | ||
895 | config.w32 : $(CFGSH_TMPL) | |
896 | copy $(CFGSH_TMPL) config.w32 | |
897 | ||
1f64ae15 SH |
898 | # |
899 | # Copy the template config.h and set configurables at the end of it | |
900 | # as per the options chosen and compiler used. | |
901 | # Note: This config.h is only used to build miniperl.exe anyway, but | |
902 | # it's as well to have its options correct to be sure that it builds | |
903 | # and so that it's "-V" options are correct for use by makedef.pl. The | |
904 | # real config.h used to build perl.exe is generated from the top-level | |
905 | # config_h.SH by config_h.PL (run by miniperl.exe). | |
906 | # | |
9e42cd94 GS |
907 | .\config.h : $(CFGH_TMPL) |
908 | -del /f config.h | |
909 | copy $(CFGH_TMPL) config.h | |
1f64ae15 SH |
910 | @echo.>>$@ |
911 | @echo #ifndef _config_h_footer_>>$@ | |
912 | @echo #define _config_h_footer_>>$@ | |
200b4fd9 SH |
913 | @echo #undef Off_t>>$@ |
914 | @echo #undef LSEEKSIZE>>$@ | |
915 | @echo #undef Off_t_size>>$@ | |
1f64ae15 SH |
916 | @echo #undef PTRSIZE>>$@ |
917 | @echo #undef SSize_t>>$@ | |
918 | @echo #undef HAS_ATOLL>>$@ | |
919 | @echo #undef HAS_STRTOLL>>$@ | |
920 | @echo #undef HAS_STRTOULL>>$@ | |
921 | @echo #undef IVTYPE>>$@ | |
922 | @echo #undef UVTYPE>>$@ | |
923 | @echo #undef IVSIZE>>$@ | |
924 | @echo #undef UVSIZE>>$@ | |
925 | @echo #undef NV_PRESERVES_UV>>$@ | |
926 | @echo #undef NV_PRESERVES_UV_BITS>>$@ | |
927 | @echo #undef IVdf>>$@ | |
928 | @echo #undef UVuf>>$@ | |
929 | @echo #undef UVof>>$@ | |
930 | @echo #undef UVxf>>$@ | |
931 | @echo #undef UVXf>>$@ | |
932 | @echo #undef USE_64_BIT_INT>>$@ | |
933 | @echo #undef Size_t_size>>$@ | |
f9bbfafd | 934 | @echo #undef USE_CPLUSPLUS>>$@ |
200b4fd9 SH |
935 | !IF "$(USE_LARGE_FILES)"=="define" |
936 | @echo #define Off_t __int64>>$@ | |
937 | @echo #define LSEEKSIZE ^8>>$@ | |
938 | @echo #define Off_t_size ^8>>$@ | |
939 | !ELSE | |
940 | @echo #define Off_t long>>$@ | |
941 | @echo #define LSEEKSIZE ^4>>$@ | |
942 | @echo #define Off_t_size ^4>>$@ | |
943 | !ENDIF | |
1f64ae15 SH |
944 | !IF "$(WIN64)"=="define" |
945 | @echo #define PTRSIZE ^8>>$@ | |
946 | @echo #define SSize_t __int64>>$@ | |
947 | @echo #define HAS_ATOLL>>$@ | |
948 | @echo #define HAS_STRTOLL>>$@ | |
949 | @echo #define HAS_STRTOULL>>$@ | |
950 | @echo #define Size_t_size ^8>>$@ | |
951 | !ELSE | |
952 | @echo #define PTRSIZE ^4>>$@ | |
953 | @echo #define SSize_t int>>$@ | |
954 | @echo #undef HAS_ATOLL>>$@ | |
955 | @echo #undef HAS_STRTOLL>>$@ | |
956 | @echo #undef HAS_STRTOULL>>$@ | |
957 | @echo #define Size_t_size ^4>>$@ | |
958 | !ENDIF | |
959 | !IF "$(USE_64_BIT_INT)"=="define" | |
960 | @echo #define IVTYPE __int64>>$@ | |
961 | @echo #define UVTYPE unsigned __int64>>$@ | |
962 | @echo #define IVSIZE ^8>>$@ | |
963 | @echo #define UVSIZE ^8>>$@ | |
964 | @echo #undef NV_PRESERVES_UV>>$@ | |
965 | @echo #define NV_PRESERVES_UV_BITS 53>>$@ | |
966 | @echo #define IVdf "I64d">>$@ | |
967 | @echo #define UVuf "I64u">>$@ | |
968 | @echo #define UVof "I64o">>$@ | |
969 | @echo #define UVxf "I64x">>$@ | |
970 | @echo #define UVXf "I64X">>$@ | |
971 | @echo #define USE_64_BIT_INT>>$@ | |
972 | !ELSE | |
973 | @echo #define IVTYPE long>>$@ | |
974 | @echo #define UVTYPE unsigned long>>$@ | |
975 | @echo #define IVSIZE ^4>>$@ | |
976 | @echo #define UVSIZE ^4>>$@ | |
977 | @echo #define NV_PRESERVES_UV>>$@ | |
978 | @echo #define NV_PRESERVES_UV_BITS 32>>$@ | |
979 | @echo #define IVdf "ld">>$@ | |
980 | @echo #define UVuf "lu">>$@ | |
981 | @echo #define UVof "lo">>$@ | |
982 | @echo #define UVxf "lx">>$@ | |
983 | @echo #define UVXf "lX">>$@ | |
984 | @echo #undef USE_64_BIT_INT>>$@ | |
985 | !ENDIF | |
f9bbfafd SH |
986 | !IF "$(USE_CPLUSPLUS)"=="define" |
987 | @echo #define USE_CPLUSPLUS>>$@ | |
988 | !ELSE | |
989 | @echo #undef USE_CPLUSPLUS>>$@ | |
990 | !ENDIF | |
1f64ae15 | 991 | @echo #endif>>$@ |
9e42cd94 | 992 | |
04bf47ee | 993 | ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl |
d801a0eb | 994 | cd .. && miniperl -Ilib make_patchnum.pl && cd win32 |
a148edb6 | 995 | |
931482b7 NC |
996 | # make sure that we recompile perl.c if the git version changes |
997 | ..\perl$(o) : ..\git_version.h | |
a148edb6 | 998 | |
c788c1c2 | 999 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm |
9e42cd94 GS |
1000 | $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh |
1001 | ||
1f64ae15 SH |
1002 | # This target is for when changes to the main config.sh happen. |
1003 | # Edit config.vc, then make perl in a minimal configuration (i.e. with MULTI, | |
8c847e66 | 1004 | # ITHREADS, IMP_SYS and LARGE_FILES off), then make this target |
76febb1c | 1005 | # to regenerate config_H.vc. |
9e42cd94 | 1006 | regen_config_h: |
76febb1c | 1007 | $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh |
4e73d6a4 | 1008 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
9e42cd94 | 1009 | -del /f $(CFGH_TMPL) |
f6b3c354 | 1010 | -$(MINIPERL) -I..\lib config_h.PL |
9e42cd94 GS |
1011 | rename config.h $(CFGH_TMPL) |
1012 | ||
7b4d95f7 | 1013 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL |
4e73d6a4 | 1014 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
9e42cd94 GS |
1015 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
1016 | $(XCOPY) *.h $(COREDIR)\*.* | |
9e42cd94 | 1017 | $(RCOPY) include $(COREDIR)\*.* |
f6b3c354 | 1018 | -$(MINIPERL) -I..\lib config_h.PL |
9e42cd94 GS |
1019 | if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM) |
1020 | ||
cb251201 NC |
1021 | # See the comment in Makefile.SH explaining this seemingly cranky ordering |
1022 | $(MINIPERL) : ..\lib\buildcustomize.pl | |
5e4c4c91 | 1023 | |
a9e545b9 | 1024 | ..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) ..\write_buildcustomize.pl |
269713a1 DD |
1025 | $(LINK32) -out:$(MINIPERL) @<< |
1026 | $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ) | |
9e42cd94 | 1027 | << |
02bfb73b | 1028 | $(EMBED_EXE_MANI:..\lib\buildcustomize.pl=..\miniperl.exe) |
b78ac715 | 1029 | $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl .. |
9e42cd94 GS |
1030 | |
1031 | $(MINIDIR) : | |
1032 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" | |
1033 | ||
1034 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) | |
8c4561fb | 1035 | $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c |
9e42cd94 GS |
1036 | |
1037 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) | |
a19baa61 | 1038 | $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c |
9e42cd94 GS |
1039 | |
1040 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c | |
1041 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h | |
1042 | !IF "$(USE_IMP_SYS)" == "define" | |
1043 | perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h | |
1044 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c | |
1045 | !ENDIF | |
1046 | ||
1047 | # 1. we don't want to rebuild miniperl.exe when config.h changes | |
1048 | # 2. we don't want to rebuild miniperl.exe with non-default config.h | |
931482b7 | 1049 | # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it |
9e42cd94 GS |
1050 | $(MINI_OBJ) : $(CORE_NOCFG_H) |
1051 | ||
1052 | $(WIN32_OBJ) : $(CORE_H) | |
1053 | $(CORE_OBJ) : $(CORE_H) | |
1054 | $(DLL_OBJ) : $(CORE_H) | |
9e42cd94 | 1055 | |
d500e60d | 1056 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl |
c6d234b8 | 1057 | $(MINIPERL) -I..\lib create_perllibst_h.pl |
c1effa61 | 1058 | $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \ |
080c3729 | 1059 | CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def |
9e42cd94 | 1060 | |
595589fa | 1061 | $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static |
9e7cf449 | 1062 | $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<< |
269713a1 | 1063 | $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES) |
9e42cd94 | 1064 | << |
c8e599d3 | 1065 | $(EMBED_DLL_MANI) |
9e42cd94 GS |
1066 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) |
1067 | ||
4e036e4b VK |
1068 | $(PERLSTATICLIB): Extensions_static |
1069 | $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static @<< | |
1070 | $(PERLDLL_OBJ) | |
1071 | << | |
1072 | $(XCOPY) $(PERLSTATICLIB) $(COREDIR) | |
1073 | ||
4ebea3c6 | 1074 | $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO) |
e84ac4e2 | 1075 | |
9387abf8 | 1076 | $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS) |
9444d213 | 1077 | |
6f83ef0e | 1078 | $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H) |
6999193b NC |
1079 | |
1080 | $(BITCOUNT_H) : $(GENUUDMAP) | |
9387abf8 | 1081 | $(GENUUDMAP) $(GENERATED_HEADERS) |
6f83ef0e NC |
1082 | |
1083 | $(GENUUDMAP_OBJ) : ..\mg_raw.h | |
9444d213 | 1084 | |
202d1001 | 1085 | $(GENUUDMAP) : $(GENUUDMAP_OBJ) |
269713a1 DD |
1086 | $(LINK32) -out:$@ @<< |
1087 | $(BLINK_FLAGS) $(LIBFILES) $(GENUUDMAP_OBJ) | |
202d1001 SH |
1088 | << |
1089 | $(EMBED_EXE_MANI) | |
9444d213 | 1090 | |
9e42cd94 GS |
1091 | perlmain.c : runperl.c |
1092 | copy runperl.c perlmain.c | |
1093 | ||
1094 | perlmain$(o) : perlmain.c | |
88c9158a | 1095 | $(CC) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c |
9e42cd94 | 1096 | |
4e036e4b VK |
1097 | perlmainst.c : runperl.c |
1098 | copy runperl.c perlmainst.c | |
1099 | ||
1100 | perlmainst$(o) : perlmainst.c | |
88c9158a | 1101 | $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c |
4e036e4b | 1102 | |
931482b7 | 1103 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) |
269713a1 | 1104 | $(LINK32) -out:$@ $(BLINK_FLAGS) \ |
aafd2430 | 1105 | $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ) |
c8e599d3 | 1106 | $(EMBED_EXE_MANI) |
9e42cd94 GS |
1107 | copy $(PERLEXE) $(WPERLEXE) |
1108 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS | |
9e42cd94 | 1109 | |
931482b7 | 1110 | $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) |
269713a1 | 1111 | $(LINK32) -out:$@ $(BLINK_FLAGS) \ |
aafd2430 | 1112 | $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ) |
4e036e4b VK |
1113 | $(EMBED_EXE_MANI) |
1114 | ||
d1a21686 | 1115 | MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs |
f6b3c354 | 1116 | $(MINIPERL) -I..\lib ..\mkppport |
42e07562 | 1117 | |
9dcb9602 | 1118 | #------------------------------------------------------------------------------- |
281da5ea | 1119 | # There's no direct way to mark a dependency on |
6afd19bc | 1120 | # DynaLoader.pm, so this will have to do |
5e4c4c91 | 1121 | Extensions: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER) |
a5ca303d | 1122 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1123 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic |
595589fa | 1124 | |
5e4c4c91 | 1125 | Extensions_reonly: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER) |
a5ca303d | 1126 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1127 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re |
a24cc0c0 | 1128 | |
183ebedc | 1129 | Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs |
a5ca303d | 1130 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1131 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static |
c6d234b8 | 1132 | $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static |
9e42cd94 | 1133 | |
291c8c21 | 1134 | Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod |
a34ce875 | 1135 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1136 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs |
a34ce875 | 1137 | |
5e4c4c91 | 1138 | $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs |
281da5ea NC |
1139 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
1140 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader | |
1141 | ||
9e42cd94 | 1142 | Extensions_clean: |
a193a2db | 1143 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean |
9e42cd94 | 1144 | |
b4dc1df6 | 1145 | Extensions_realclean: |
a193a2db | 1146 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean |
b4dc1df6 | 1147 | |
9dcb9602 | 1148 | #------------------------------------------------------------------------------- |
9e42cd94 | 1149 | |
0195b144 | 1150 | doc: $(PERLEXE) ..\pod\perltoc.pod |
a4e8ab8a | 1151 | $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \ |
f8dbed5a | 1152 | --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML::=|)" \ |
9b1d99d7 | 1153 | --recurse |
9e42cd94 | 1154 | |
0827416d NC |
1155 | ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL |
1156 | $(MINIPERL) -I..\lib ..\utils\Makefile.PL .. | |
1157 | ||
b0b6bf2b AT |
1158 | # Note that this next section is parsed (and regenerated) by pod/buildtoc |
1159 | # so please check that script before making structural changes here | |
1160 | ||
e5a8a0fb | 1161 | utils: $(PERLEXE) ..\utils\Makefile |
9e42cd94 GS |
1162 | cd ..\utils |
1163 | $(MAKE) PERL=$(MINIPERL) | |
1164 | cd ..\pod | |
b0b6bf2b AT |
1165 | copy ..\README.aix ..\pod\perlaix.pod |
1166 | copy ..\README.amiga ..\pod\perlamiga.pod | |
6001596e | 1167 | copy ..\README.android ..\pod\perlandroid.pod |
b0b6bf2b AT |
1168 | copy ..\README.bs2000 ..\pod\perlbs2000.pod |
1169 | copy ..\README.ce ..\pod\perlce.pod | |
1170 | copy ..\README.cn ..\pod\perlcn.pod | |
1171 | copy ..\README.cygwin ..\pod\perlcygwin.pod | |
b0b6bf2b | 1172 | copy ..\README.dos ..\pod\perldos.pod |
b0b6bf2b | 1173 | copy ..\README.freebsd ..\pod\perlfreebsd.pod |
9f968a8d | 1174 | copy ..\README.haiku ..\pod\perlhaiku.pod |
b0b6bf2b AT |
1175 | copy ..\README.hpux ..\pod\perlhpux.pod |
1176 | copy ..\README.hurd ..\pod\perlhurd.pod | |
1177 | copy ..\README.irix ..\pod\perlirix.pod | |
1178 | copy ..\README.jp ..\pod\perljp.pod | |
1179 | copy ..\README.ko ..\pod\perlko.pod | |
6477b319 | 1180 | copy ..\README.linux ..\pod\perllinux.pod |
b0b6bf2b AT |
1181 | copy ..\README.macos ..\pod\perlmacos.pod |
1182 | copy ..\README.macosx ..\pod\perlmacosx.pod | |
b0b6bf2b | 1183 | copy ..\README.netware ..\pod\perlnetware.pod |
b0846812 | 1184 | copy ..\README.openbsd ..\pod\perlopenbsd.pod |
b0b6bf2b AT |
1185 | copy ..\README.os2 ..\pod\perlos2.pod |
1186 | copy ..\README.os390 ..\pod\perlos390.pod | |
1187 | copy ..\README.os400 ..\pod\perlos400.pod | |
1188 | copy ..\README.plan9 ..\pod\perlplan9.pod | |
1189 | copy ..\README.qnx ..\pod\perlqnx.pod | |
2f08ed66 | 1190 | copy ..\README.riscos ..\pod\perlriscos.pod |
b0b6bf2b | 1191 | copy ..\README.solaris ..\pod\perlsolaris.pod |
27da23d5 | 1192 | copy ..\README.symbian ..\pod\perlsymbian.pod |
58534900 | 1193 | copy ..\README.synology ..\pod\perlsynology.pod |
b0b6bf2b AT |
1194 | copy ..\README.tru64 ..\pod\perltru64.pod |
1195 | copy ..\README.tw ..\pod\perltw.pod | |
b0b6bf2b AT |
1196 | copy ..\README.vos ..\pod\perlvos.pod |
1197 | copy ..\README.win32 ..\pod\perlwin32.pod | |
cf73ceda | 1198 | copy ..\pod\perldelta.pod ..\pod\perl5232delta.pod |
9e42cd94 GS |
1199 | cd ..\win32 |
1200 | $(PERLEXE) $(PL2BAT) $(UTILS) | |
f8d6280f | 1201 | $(MINIPERL) -I..\lib ..\autodoc.pl .. |
f556af6c | 1202 | $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q .. |
0195b144 NC |
1203 | |
1204 | ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs | |
b78c1104 | 1205 | $(PERLEXE) -f ..\pod\buildtoc -q |
9e42cd94 | 1206 | |
b0b6bf2b AT |
1207 | # Note that the pod cleanup in this next section is parsed (and regenerated |
1208 | # by pod/buildtoc so please check that script before making changes here | |
1209 | ||
b4dc1df6 | 1210 | distclean: realclean |
9e42cd94 | 1211 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ |
7b4d95f7 | 1212 | $(PERLIMPLIB) ..\miniperl.lib $(PERLEXESTATIC) $(PERLSTATICLIB) |
ca67812f SH |
1213 | -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm |
1214 | -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm | |
48462a74 | 1215 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm |
9e42cd94 GS |
1216 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
1217 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm | |
1218 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm | |
1219 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm | |
9e42cd94 GS |
1220 | -del /f $(LIBDIR)\File\Glob.pm |
1221 | -del /f $(LIBDIR)\Storable.pm | |
ca67812f | 1222 | -del /f $(LIBDIR)\Sys\Hostname.pm |
9e42cd94 | 1223 | -del /f $(LIBDIR)\Time\HiRes.pm |
9e42cd94 | 1224 | -del /f $(LIBDIR)\Unicode\Normalize.pm |
4e74047c | 1225 | -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm |
b4ad57f4 | 1226 | -del /f $(LIBDIR)\Win32.pm |
37ca3c28 | 1227 | -del /f $(LIBDIR)\Win32CORE.pm |
00701878 SH |
1228 | -del /f $(LIBDIR)\Win32API\File.pm |
1229 | -del /f $(LIBDIR)\Win32API\File\cFile.pc | |
5e4c4c91 | 1230 | -del /f $(LIBDIR)\buildcustomize.pl |
a85e0e8c | 1231 | -del /f $(DISTDIR)\XSLoader\XSLoader.pm |
5daeb5b0 | 1232 | -del /f *.def *.map |
1a6c65ed SH |
1233 | -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App |
1234 | -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive | |
1235 | -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute | |
1236 | -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie | |
7afc9753 | 1237 | -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp |
46ffdcf0 | 1238 | -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress |
7afc9753 NC |
1239 | -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl |
1240 | -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN | |
9e42cd94 | 1241 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data |
1a6c65ed SH |
1242 | -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel |
1243 | -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest | |
ca67812f | 1244 | -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode |
1a6c65ed | 1245 | -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding |
7afc9753 | 1246 | -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter |
1a6c65ed SH |
1247 | -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder |
1248 | -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command | |
1249 | -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant | |
1250 | -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist | |
1251 | -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker | |
7afc9753 NC |
1252 | -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS |
1253 | -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps | |
1a6c65ed SH |
1254 | -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec |
1255 | -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter | |
96c33d98 | 1256 | -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash |
7afc9753 NC |
1257 | -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP |
1258 | -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N | |
1a6c65ed SH |
1259 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO |
1260 | -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC | |
7afc9753 | 1261 | -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON |
69f57184 | 1262 | -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List |
1a6c65ed | 1263 | -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale |
1a6c65ed SH |
1264 | -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math |
1265 | -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize | |
69f57184 | 1266 | -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME |
1a6c65ed | 1267 | -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module |
1a6c65ed | 1268 | -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP |
1a6c65ed SH |
1269 | -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params |
1270 | -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse | |
7afc9753 | 1271 | -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl |
1a6c65ed SH |
1272 | -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO |
1273 | -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc | |
1274 | -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple | |
1275 | -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text | |
9e42cd94 | 1276 | -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar |
7afc9753 | 1277 | -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search |
d81c2d6a | 1278 | -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub |
6c4b87ea | 1279 | -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys |
1a6c65ed | 1280 | -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP |
7afc9753 | 1281 | -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term |
1a6c65ed | 1282 | -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test |
7afc9753 | 1283 | -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text |
1a6c65ed | 1284 | -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread |
6c4b87ea | 1285 | -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads |
8cf6f931 | 1286 | -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash |
1a6c65ed | 1287 | -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate |
7afc9753 | 1288 | -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale |
fb794281 | 1289 | -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version |
7afc9753 | 1290 | -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS |
00701878 | 1291 | -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API |
7afc9753 | 1292 | -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS |
60f0ee9d | 1293 | -cd $(PODDIR) && del /f *.html *.bat roffitall \ |
cf73ceda | 1294 | perl5232delta.pod perlaix.pod perlamiga.pod perlandroid.pod \ |
6001596e BF |
1295 | perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \ |
1296 | perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \ | |
1297 | perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \ | |
1298 | perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \ | |
1299 | perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \ | |
1300 | perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \ | |
1301 | perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \ | |
1302 | perltru64.pod perltw.pod perluniprops.pod perlvos.pod \ | |
1303 | perlwin32.pod | |
ca67812f | 1304 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \ |
59658819 | 1305 | perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \ |
2ea3abd4 | 1306 | xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails |
19ec6f53 | 1307 | -del /f ..\config.sh perlmain.c dlutils.c config.h.new \ |
4e036e4b | 1308 | perlmainst.c |
9e42cd94 | 1309 | -del /f $(CONFIGPM) |
a148edb6 | 1310 | -del /f ..\lib\Config_git.pl |
9e42cd94 | 1311 | -del /f bin\*.bat |
322fd642 | 1312 | -del /f perllibst.h |
4ebea3c6 | 1313 | -del /f $(PERLEXE_RES) perl.base |
85741d00 | 1314 | -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h |
ca67812f | 1315 | -cd $(EXTDIR) && del /s *.def Makefile Makefile.old |
a193a2db | 1316 | -cd $(DISTDIR) && del /s *.def Makefile Makefile.old |
b212a3c6 | 1317 | -cd $(CPANDIR) && del /s *.def Makefile Makefile.old |
0827416d | 1318 | -del /s ..\utils\Makefile |
9e42cd94 | 1319 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) |
9e42cd94 | 1320 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) |
b4a41557 | 1321 | -if exist pod2htmd.tmp del pod2htmd.tmp |
b4a41557 | 1322 | -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR) |
0279961e | 1323 | -del /f ..\t\test_state |
9e42cd94 GS |
1324 | |
1325 | install : all installbare installhtml | |
1326 | ||
0195b144 | 1327 | installbare : utils ..\pod\perltoc.pod |
9e42cd94 GS |
1328 | $(PERLEXE) ..\installperl |
1329 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* | |
5548433c | 1330 | if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.* |
9e42cd94 | 1331 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
ec25c072 | 1332 | if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.* |
9e42cd94 GS |
1333 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
1334 | ||
1335 | installhtml : doc | |
b4a41557 | 1336 | $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.* |
9e42cd94 GS |
1337 | |
1338 | inst_lib : $(CONFIGPM) | |
9e42cd94 GS |
1339 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
1340 | ||
58fa074c | 1341 | $(UNIDATAFILES) ..\pod\perluniprops.pod : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs |
27a8011f | 1342 | cd ..\lib\unicore && \ |
a84da042 | 1343 | ..\$(MINIPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE) |
ca12659b | 1344 | |
735ecbe9 | 1345 | minitest : .\config.h $(MINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) |
6c85d12e SH |
1346 | $(XCOPY) $(MINIPERL) ..\t\$(NULL) |
1347 | if exist ..\t\perl.exe del /f ..\t\perl.exe | |
1348 | rename ..\t\miniperl.exe perl.exe | |
9e42cd94 | 1349 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
a4e8ab8a | 1350 | # Note this perl.exe is miniperl |
49bf91e4 | 1351 | 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 |
9e42cd94 | 1352 | |
3bef022b | 1353 | test-prep : all utils ../pod/perltoc.pod |
9e42cd94 GS |
1354 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
1355 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1356 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
0b4dcbc1 | 1357 | set PERL_STATIC_EXT=$(STATIC_EXT) |
9e42cd94 GS |
1358 | |
1359 | test : test-prep | |
1360 | cd ..\t | |
a4e8ab8a | 1361 | perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
9e42cd94 GS |
1362 | cd ..\win32 |
1363 | ||
247c55c0 CBW |
1364 | test_porting : test-prep |
1365 | cd ..\t | |
a4e8ab8a | 1366 | perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t |
247c55c0 CBW |
1367 | cd ..\win32 |
1368 | ||
6ae7e459 YO |
1369 | test-reonly : reonly utils |
1370 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1371 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1372 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1373 | cd ..\t | |
a4e8ab8a | 1374 | perl.exe harness $(OPT) -re \bre\\/ $(EXTRA) |
6ae7e459 | 1375 | cd ..\win32 |
7bcddc65 | 1376 | |
c900f745 | 1377 | regen : |
7bcddc65 YO |
1378 | cd .. |
1379 | regen.pl | |
1380 | cd win32 | |
1381 | ||
9e42cd94 GS |
1382 | test-notty : test-prep |
1383 | set PERL_SKIP_TTY_TEST=1 | |
1384 | cd ..\t | |
a4e8ab8a | 1385 | perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
9e42cd94 GS |
1386 | cd ..\win32 |
1387 | ||
b4a93add NK |
1388 | _test : |
1389 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1390 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1391 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1392 | cd ..\t | |
a4e8ab8a | 1393 | perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
b4a93add NK |
1394 | cd ..\win32 |
1395 | ||
b4dc1df6 | 1396 | _clean : |
9e42cd94 GS |
1397 | -@$(DEL) miniperlmain$(o) |
1398 | -@$(DEL) $(MINIPERL) | |
1399 | -@$(DEL) perlglob$(o) | |
1400 | -@$(DEL) perlmain$(o) | |
4e036e4b | 1401 | -@$(DEL) perlmainst$(o) |
9e42cd94 GS |
1402 | -@$(DEL) config.w32 |
1403 | -@$(DEL) config.h | |
a148edb6 | 1404 | -@$(DEL) ..\git_version.h |
9e42cd94 GS |
1405 | -@$(DEL) $(GLOBEXE) |
1406 | -@$(DEL) $(PERLEXE) | |
1407 | -@$(DEL) $(WPERLEXE) | |
4e036e4b VK |
1408 | -@$(DEL) $(PERLEXESTATIC) |
1409 | -@$(DEL) $(PERLSTATICLIB) | |
9e42cd94 GS |
1410 | -@$(DEL) $(PERLDLL) |
1411 | -@$(DEL) $(CORE_OBJ) | |
9387abf8 | 1412 | -@$(DEL) $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS) |
9e42cd94 | 1413 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) |
27a8011f | 1414 | -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1) |
27a8011f | 1415 | -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2) |
ca12659b | 1416 | -@$(DEL) $(UNIDATAFILES) |
27a8011f | 1417 | -@$(DEL) $(WIN32_OBJ) |
9e42cd94 | 1418 | -@$(DEL) $(DLL_OBJ) |
9e42cd94 GS |
1419 | -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res |
1420 | -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat | |
9e42cd94 GS |
1421 | -@$(DEL) *.ilk |
1422 | -@$(DEL) *.pdb | |
9e7cf449 | 1423 | -@$(DEL) Extensions_static |
9e42cd94 | 1424 | |
6e2cec71 | 1425 | clean : Extensions_clean _clean |
b4dc1df6 | 1426 | |
85741d00 | 1427 | realclean : Extensions_realclean _clean |
b4dc1df6 | 1428 | |
9e42cd94 GS |
1429 | # Handy way to run perlbug -ok without having to install and run the |
1430 | # installed perlbug. We don't re-run the tests here - we trust the user. | |
1431 | # Please *don't* use this unless all tests pass. | |
1432 | # If you want to report test failures, use "nmake nok" instead. | |
1433 | ok: utils | |
a4e8ab8a | 1434 | $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" |
9e42cd94 GS |
1435 | |
1436 | okfile: utils | |
a4e8ab8a | 1437 | $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok |
9e42cd94 GS |
1438 | |
1439 | nok: utils | |
a4e8ab8a | 1440 | $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" |
9e42cd94 GS |
1441 | |
1442 | nokfile: utils | |
a4e8ab8a | 1443 | $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |