Commit | Line | Data |
---|---|---|
9e42cd94 GS |
1 | # |
2 | # Makefile to build perl on Windows NT using Microsoft NMAKE. | |
3 | # Supported compilers: | |
a7d225ec | 4 | # Visual C++ 2.0 or later |
9453ddcd | 5 | # MS Platform 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 | |
cb47d8a5 | 8 | # (perl513.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. | |
29 | #WIN64 = undef | |
30 | ||
31 | # | |
9e42cd94 GS |
32 | # Comment this out if you DON'T want your perl installation to be versioned. |
33 | # This means that the new installation will overwrite any files from the | |
34 | # old installation at the same INST_TOP location. Leaving it enabled is | |
35 | # the safest route, as perl adds the extra version directory to all the | |
36 | # locations it installs files to. If you disable it, an alternative | |
37 | # versioned installation can be obtained by setting INST_TOP above to a | |
38 | # path that includes an arbitrary version string. | |
39 | # | |
75584f80 | 40 | #INST_VER = \5.13.3 |
9e42cd94 GS |
41 | |
42 | # | |
43 | # Comment this out if you DON'T want your perl installation to have | |
44 | # architecture specific components. This means that architecture- | |
45 | # specific files will be installed along with the architecture-neutral | |
46 | # files. Leaving it enabled is safer and more flexible, in case you | |
47 | # want to build multiple flavors of perl and install them together in | |
48 | # the same location. Commenting it out gives you a simpler | |
49 | # installation that is easier to understand for beginners. | |
50 | # | |
bdb4cb88 | 51 | #INST_ARCH = \$(ARCHNAME) |
9e42cd94 GS |
52 | |
53 | # | |
7ada00a0 SH |
54 | # Uncomment this if you want perl to run |
55 | # $Config{sitelibexp}\sitecustomize.pl | |
56 | # before anything else. This script can then be set up, for example, | |
57 | # to add additional entries to @INC. | |
58 | # | |
59 | #USE_SITECUST = define | |
60 | ||
61 | # | |
9e42cd94 | 62 | # uncomment to enable multiple interpreters. This is need for fork() |
f7d585d3 | 63 | # emulation and for thread support. |
9e42cd94 | 64 | # |
bdb4cb88 | 65 | USE_MULTI = define |
9e42cd94 GS |
66 | |
67 | # | |
f7d585d3 | 68 | # Beginnings of interpreter cloning/threads; now reasonably complete. |
9e42cd94 GS |
69 | # This should be enabled to get the fork() emulation. This needs |
70 | # USE_MULTI as well. | |
71 | # | |
bdb4cb88 | 72 | USE_ITHREADS = define |
9e42cd94 GS |
73 | |
74 | # | |
75 | # uncomment to enable the implicit "host" layer for all system calls | |
76 | # made by perl. This needs USE_MULTI above. This is also needed to | |
77 | # get fork(). | |
78 | # | |
bdb4cb88 | 79 | USE_IMP_SYS = define |
9e42cd94 GS |
80 | |
81 | # | |
f7d585d3 GS |
82 | # Comment out next assign to disable perl's I/O subsystem and use compiler's |
83 | # stdio for IO - depending on your compiler vendor and run time library you may | |
84 | # then get a number of fails from make test i.e. bugs - complain to them not us ;-). | |
85 | # You will also be unable to take full advantage of perl5.8's support for multiple | |
86 | # encodings and may see lower IO performance. You have been warned. | |
9e42cd94 GS |
87 | USE_PERLIO = define |
88 | ||
89 | # | |
4a9d6100 GS |
90 | # Comment this out if you don't want to enable large file support for |
91 | # some reason. Should normally only be changed to maintain compatibility | |
92 | # with an older release of perl. | |
bdb4cb88 | 93 | USE_LARGE_FILES = define |
4a9d6100 GS |
94 | |
95 | # | |
da2c7419 | 96 | # uncomment exactly one of the following |
9e42cd94 | 97 | # |
da2c7419 | 98 | # Visual C++ 2.x |
9e42cd94 | 99 | #CCTYPE = MSVC20 |
da2c7419 SH |
100 | # Visual C++ > 2.x and < 6.x |
101 | #CCTYPE = MSVC | |
1c847d4b | 102 | # Visual C++ 6.x (aka Visual C++ 98) |
4a9d6100 | 103 | CCTYPE = MSVC60 |
1c847d4b | 104 | # Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools) |
da2c7419 | 105 | #CCTYPE = MSVC70FREE |
1c847d4b | 106 | # Visual C++ .NET 2003 (aka Visual C++ 7.x) (full version) |
da2c7419 | 107 | #CCTYPE = MSVC70 |
1c847d4b | 108 | # Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version) |
73c9ebc7 | 109 | #CCTYPE = MSVC80FREE |
1c847d4b | 110 | # Visual C++ 2005 (aka Visual C++ 8.x) (full version) |
73c9ebc7 | 111 | #CCTYPE = MSVC80 |
4a3cf07b SH |
112 | # Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version) |
113 | #CCTYPE = MSVC90FREE | |
114 | # Visual C++ 2008 (aka Visual C++ 9.x) (full version) | |
115 | #CCTYPE = MSVC90 | |
9e42cd94 GS |
116 | |
117 | # | |
118 | # uncomment next line if you want debug version of perl (big,slow) | |
f7d585d3 GS |
119 | # If not enabled, we automatically try to use maximum optimization |
120 | # with all compilers that are known to have a working optimizer. | |
9e42cd94 GS |
121 | # |
122 | #CFG = Debug | |
123 | ||
124 | # | |
125 | # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. | |
126 | # It has patches that fix known bugs in older versions of MSVCRT.DLL. | |
127 | # This currently requires VC 5.0 with Service Pack 3 or later. | |
128 | # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/ | |
129 | # and follow the directions in the package to install. | |
130 | # | |
131 | # Not recommended if you have VC 6.x and you're not running Windows 9x. | |
132 | # | |
133 | #USE_PERLCRT = define | |
134 | ||
135 | # | |
136 | # uncomment to enable linking with setargv.obj under the Visual C | |
137 | # compiler. Setting this options enables perl to expand wildcards in | |
138 | # arguments, but it may be harder to use alternate methods like | |
139 | # File::DosGlob that are more powerful. This option is supported only with | |
140 | # Visual C. | |
141 | # | |
142 | #USE_SETARGV = define | |
143 | ||
144 | # | |
4ace4afb SH |
145 | # if you want to have the crypt() builtin function implemented, leave this or |
146 | # CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable | |
147 | # version of des_fcrypt(). | |
9e42cd94 | 148 | # |
4ace4afb | 149 | CRYPT_SRC = fcrypt.c |
9e42cd94 GS |
150 | |
151 | # | |
152 | # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a | |
153 | # library, uncomment this, and make sure the library exists (see README.win32) | |
154 | # Specify the full pathname of the library. | |
155 | # | |
156 | #CRYPT_LIB = fcrypt.lib | |
157 | ||
158 | # | |
159 | # set this if you wish to use perl's malloc | |
160 | # WARNING: Turning this on/off WILL break binary compatibility with extensions | |
161 | # you may have compiled with/without it. Be prepared to recompile all | |
162 | # extensions if you change the default. Currently, this cannot be enabled | |
163 | # if you ask for USE_IMP_SYS above. | |
164 | # | |
165 | #PERL_MALLOC = define | |
166 | ||
167 | # | |
06c896bb SH |
168 | # set this to enable debugging mstats |
169 | # This must be enabled to use the Devel::Peek::mstat() function. This cannot | |
170 | # be enabled without PERL_MALLOC as well. | |
171 | # | |
bdb4cb88 | 172 | #DEBUG_MSTATS = define |
06c896bb SH |
173 | |
174 | # | |
4e036e4b VK |
175 | # set this to additionally provide a statically linked perl-static.exe. |
176 | # Note that dynamic loading will not work with this perl, so you must | |
a1f2e719 | 177 | # include required modules statically using the STATIC_EXT or ALL_STATIC |
cb47d8a5 | 178 | # variables below. A static library perl513s.lib will also be created. |
4e036e4b VK |
179 | # Ordinary perl.exe is not affected by this option. |
180 | # | |
181 | #BUILD_STATIC = define | |
182 | ||
183 | # | |
a1f2e719 VK |
184 | # in addition to BUILD_STATIC the option ALL_STATIC makes *every* |
185 | # extension get statically built | |
186 | # This will result in a very large perl executable, but the main purpose | |
187 | # is to have proper linking set so as to be able to create miscellaneous | |
188 | # executables with different built-in extensions | |
189 | # | |
190 | #ALL_STATIC = define | |
191 | ||
192 | # | |
06c896bb | 193 | # |
9e42cd94 GS |
194 | # set the install locations of the compiler include/libraries |
195 | # Running VCVARS32.BAT is *required* when using Visual C. | |
196 | # Some versions of Visual C don't define MSVCDIR in the environment, | |
197 | # so you may have to set CCHOME explicitly (spaces in the path name should | |
198 | # not be quoted) | |
199 | # | |
200 | #CCHOME = f:\msvc20 | |
201 | CCHOME = $(MSVCDIR) | |
202 | CCINCDIR = $(CCHOME)\include | |
203 | CCLIBDIR = $(CCHOME)\lib | |
204 | ||
205 | # | |
206 | # Additional compiler flags can be specified here. | |
207 | # | |
2e30e1e1 | 208 | BUILDOPT = $(BUILDOPTEXTRA) |
9e42cd94 | 209 | |
7ada00a0 | 210 | # |
2eb87578 SH |
211 | # Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's |
212 | # internal hash function unless the PERL_HASH_SEED environment variable is set. | |
213 | # Alternatively, adding -DNO_HASH_SEED will completely disable the | |
214 | # randomization feature. | |
215 | # The latter is required to maintain binary compatibility with Perl 5.8.0. | |
216 | # | |
217 | #BUILDOPT = $(BUILDOPT) -DPERL_HASH_SEED_EXPLICIT | |
218 | #BUILDOPT = $(BUILDOPT) -DNO_HASH_SEED | |
219 | ||
9e42cd94 GS |
220 | # |
221 | # This should normally be disabled. Adding -DPERL_POLLUTE enables support | |
222 | # for old symbols by default, at the expense of extreme pollution. You most | |
223 | # probably just want to build modules that won't compile with | |
224 | # perl Makefile.PL POLLUTE=1 | |
225 | # instead of enabling this. Please report such modules to the respective | |
226 | # authors. | |
227 | # | |
228 | #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE | |
229 | ||
230 | # | |
231 | # This should normally be disabled. Enabling it will disable the File::Glob | |
232 | # implementation of CORE::glob. | |
233 | # | |
234 | #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB | |
235 | ||
236 | # | |
237 | # This should normally be disabled. Enabling it causes perl to read scripts | |
238 | # in text mode (which is the 5.005 behavior) and will break ByteLoader. | |
bdb4cb88 | 239 | # |
9e42cd94 GS |
240 | #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS |
241 | ||
242 | # | |
243 | # specify semicolon-separated list of extra directories that modules will | |
244 | # look for libraries (spaces in path names need not be quoted) | |
245 | # | |
246 | EXTRALIBDIRS = | |
247 | ||
248 | # | |
249 | # set this to your email address (perl will guess a value from | |
250 | # from your loginname and your hostname, which may not be right) | |
251 | # | |
252 | #EMAIL = | |
253 | ||
254 | ## | |
255 | ## Build configuration ends. | |
256 | ## | |
257 | ||
258 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### | |
259 | ||
260 | !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" | |
261 | D_CRYPT = undef | |
262 | !ELSE | |
263 | D_CRYPT = define | |
264 | CRYPT_FLAG = -DHAVE_DES_FCRYPT | |
265 | !ENDIF | |
266 | ||
646e33b6 SH |
267 | !IF "$(USE_IMP_SYS)" == "define" |
268 | PERL_MALLOC = undef | |
269 | DEBUG_MSTATS = undef | |
270 | !ENDIF | |
271 | ||
9e42cd94 GS |
272 | !IF "$(PERL_MALLOC)" == "" |
273 | PERL_MALLOC = undef | |
646e33b6 | 274 | DEBUG_MSTATS = undef |
06c896bb SH |
275 | !ENDIF |
276 | ||
277 | !IF "$(DEBUG_MSTATS)" == "" | |
646e33b6 | 278 | DEBUG_MSTATS = undef |
06c896bb SH |
279 | !ENDIF |
280 | ||
281 | !IF "$(DEBUG_MSTATS)" == "define" | |
646e33b6 | 282 | BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS |
9e42cd94 GS |
283 | !ENDIF |
284 | ||
7ada00a0 SH |
285 | !IF "$(USE_SITECUST)" == "" |
286 | USE_SITECUST = undef | |
287 | !ENDIF | |
288 | ||
9e42cd94 GS |
289 | !IF "$(USE_MULTI)" == "" |
290 | USE_MULTI = undef | |
291 | !ENDIF | |
292 | ||
293 | !IF "$(USE_ITHREADS)" == "" | |
294 | USE_ITHREADS = undef | |
295 | !ENDIF | |
296 | ||
297 | !IF "$(USE_IMP_SYS)" == "" | |
298 | USE_IMP_SYS = undef | |
299 | !ENDIF | |
300 | ||
301 | !IF "$(USE_PERLIO)" == "" | |
302 | USE_PERLIO = undef | |
303 | !ENDIF | |
304 | ||
4a9d6100 GS |
305 | !IF "$(USE_LARGE_FILES)" == "" |
306 | USE_LARGE_FILES = undef | |
307 | !ENDIF | |
308 | ||
9e42cd94 GS |
309 | !IF "$(USE_PERLCRT)" == "" |
310 | USE_PERLCRT = undef | |
311 | !ENDIF | |
312 | ||
3db8f154 | 313 | !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef" |
9e42cd94 GS |
314 | USE_MULTI = define |
315 | !ENDIF | |
316 | ||
317 | !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" | |
318 | USE_MULTI = define | |
9e42cd94 GS |
319 | !ENDIF |
320 | ||
7ada00a0 SH |
321 | !IF "$(USE_SITECUST)" == "define" |
322 | BUILDOPT = $(BUILDOPT) -DUSE_SITECUSTOMIZE | |
323 | !ENDIF | |
324 | ||
3db8f154 | 325 | !IF "$(USE_MULTI)" != "undef" |
9e42cd94 GS |
326 | BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT |
327 | !ENDIF | |
328 | ||
329 | !IF "$(USE_IMP_SYS)" != "undef" | |
330 | BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS | |
331 | !ENDIF | |
332 | ||
333 | !IF "$(PROCESSOR_ARCHITECTURE)" == "" | |
334 | PROCESSOR_ARCHITECTURE = x86 | |
335 | !ENDIF | |
336 | ||
c623ac67 | 337 | !IF "$(WIN64)" == "" |
bf2a35e5 JD |
338 | # When we are running from a 32bit cmd.exe on AMD64 then |
339 | # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432 | |
340 | # is set to AMD64 | |
c623ac67 GS |
341 | !IF "$(PROCESSOR_ARCHITEW6432)" != "" |
342 | PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432) | |
343 | WIN64 = define | |
344 | !ELSE | |
bf2a35e5 | 345 | !IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64" |
c623ac67 GS |
346 | WIN64 = define |
347 | !ELSE | |
348 | WIN64 = undef | |
349 | !ENDIF | |
350 | !ENDIF | |
351 | !ENDIF | |
352 | ||
bf2a35e5 JD |
353 | ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) |
354 | !IF "$(ARCHITECTURE)" == "AMD64" | |
355 | ARCHITECTURE = x64 | |
9453ddcd | 356 | !ENDIF |
bf2a35e5 JD |
357 | !IF "$(ARCHITECTURE)" == "IA64" |
358 | ARCHITECTURE = ia64 | |
9453ddcd SH |
359 | !ENDIF |
360 | ||
9e42cd94 | 361 | !IF "$(USE_MULTI)" == "define" |
bf2a35e5 | 362 | ARCHNAME = MSWin32-$(ARCHITECTURE)-multi |
9e42cd94 GS |
363 | !ELSE |
364 | !IF "$(USE_PERLIO)" == "define" | |
bf2a35e5 | 365 | ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio |
9e42cd94 | 366 | !ELSE |
bf2a35e5 | 367 | ARCHNAME = MSWin32-$(ARCHITECTURE) |
9e42cd94 GS |
368 | !ENDIF |
369 | !ENDIF | |
9e42cd94 GS |
370 | |
371 | !IF "$(USE_PERLIO)" == "define" | |
372 | BUILDOPT = $(BUILDOPT) -DUSE_PERLIO | |
373 | !ENDIF | |
374 | ||
375 | !IF "$(USE_ITHREADS)" == "define" | |
376 | ARCHNAME = $(ARCHNAME)-thread | |
377 | !ENDIF | |
378 | ||
4a3cf07b SH |
379 | # Visual C++ 98, .NET 2003, 2005 and 2008 specific. |
380 | # VC++ 6.x, 7.x, 8.x and 9.x can load DLL's on demand. Makes the test suite run | |
381 | # in about 10% less time. (The free version of 7.x can't do this, but the free | |
382 | # versions of 8.x and 9.x can.) | |
383 | !IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70" || \ | |
384 | "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \ | |
385 | "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE" | |
d1a8253e | 386 | DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib |
9e42cd94 GS |
387 | !ENDIF |
388 | ||
4a3cf07b SH |
389 | # Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and |
390 | # DLLs. These either need copying everywhere with the binaries, or else need | |
3ddd48aa SH |
391 | # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For |
392 | # simplicity, embed them if they exist (and delete them afterwards so that they | |
393 | # don't get installed too). | |
4adc95e6 SH |
394 | EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \ |
395 | if exist $@.manifest del $@.manifest | |
396 | EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \ | |
397 | if exist $@.manifest del $@.manifest | |
c8e599d3 | 398 | |
9e42cd94 GS |
399 | ARCHDIR = ..\lib\$(ARCHNAME) |
400 | COREDIR = ..\lib\CORE | |
401 | AUTODIR = ..\lib\auto | |
402 | LIBDIR = ..\lib | |
403 | EXTDIR = ..\ext | |
a193a2db | 404 | DISTDIR = ..\dist |
b212a3c6 | 405 | CPANDIR = ..\cpan |
9e42cd94 GS |
406 | PODDIR = ..\pod |
407 | EXTUTILSDIR = $(LIBDIR)\ExtUtils | |
b4a41557 | 408 | HTMLDIR = .\html |
9e42cd94 GS |
409 | |
410 | # | |
411 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin | |
412 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) | |
413 | INST_LIB = $(INST_TOP)$(INST_VER)\lib | |
414 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) | |
415 | INST_COREDIR = $(INST_ARCHLIB)\CORE | |
9e42cd94 GS |
416 | INST_HTML = $(INST_TOP)$(INST_VER)\html |
417 | ||
418 | # | |
419 | # Programs to compile, build .lib files and link | |
420 | # | |
421 | ||
422 | CC = cl | |
423 | LINK32 = link | |
424 | LIB32 = $(LINK32) -lib | |
425 | RSC = rc | |
426 | ||
427 | # | |
428 | # Options | |
429 | # | |
430 | ||
431 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. | |
432 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX | |
433 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) | |
434 | LOCDEFS = -DPERLDLL -DPERL_CORE | |
435 | SUBSYS = console | |
a7d225ec | 436 | CXX_FLAG = -TP -EHsc |
9e42cd94 GS |
437 | |
438 | !IF "$(USE_PERLCRT)" != "define" | |
439 | LIBC = msvcrt.lib | |
440 | !ELSE | |
441 | LIBC = PerlCRT.lib | |
442 | !ENDIF | |
443 | ||
9e42cd94 GS |
444 | !IF "$(CFG)" == "Debug" |
445 | ! IF "$(CCTYPE)" == "MSVC20" | |
446 | OPTIMIZE = -Od -MD -Z7 -DDEBUGGING | |
447 | ! ELSE | |
448 | OPTIMIZE = -Od -MD -Zi -DDEBUGGING | |
449 | ! ENDIF | |
c623ac67 | 450 | LINK_DBG = -debug |
9e42cd94 | 451 | !ELSE |
ec25c072 SH |
452 | OPTIMIZE = -MD -Zi -DNDEBUG |
453 | # we enable debug symbols in release builds also | |
454 | LINK_DBG = -debug -opt:ref,icf | |
455 | # you may want to enable this if you want COFF symbols in the executables | |
456 | # in addition to the PDB symbols. The default Dr. Watson that ships with | |
457 | # Windows can use the the former but not latter. The free WinDbg can be | |
458 | # installed to get better stack traces from just the PDB symbols, so we | |
459 | # avoid the bloat of COFF symbols by default. | |
460 | #LINK_DBG = $(LINK_DBG) -debugtype:both | |
d921a5fb GS |
461 | ! IF "$(WIN64)" == "define" |
462 | # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) | |
463 | OPTIMIZE = $(OPTIMIZE) -Ox -GL | |
464 | LINK_DBG = $(LINK_DBG) -ltcg | |
465 | ! ELSE | |
466 | # -O1 yields smaller code, which turns out to be faster than -O2 on x86 | |
467 | OPTIMIZE = $(OPTIMIZE) -O1 | |
468 | #OPTIMIZE = $(OPTIMIZE) -O2 | |
469 | ! ENDIF | |
9e42cd94 GS |
470 | !ENDIF |
471 | ||
c623ac67 GS |
472 | !IF "$(WIN64)" == "define" |
473 | DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE | |
9453ddcd | 474 | OPTIMIZE = $(OPTIMIZE) -Wp64 -fp:precise |
da2c7419 SH |
475 | !ENDIF |
476 | ||
4a3cf07b SH |
477 | # For now, silence VC++ 8.x's and 9.x's warnings about "unsafe" CRT functions |
478 | # and POSIX CRT function names being deprecated. | |
479 | !IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \ | |
480 | "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE" | |
26a6faa8 | 481 | DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE |
c5b31784 SH |
482 | !ENDIF |
483 | ||
46e77f11 SH |
484 | # Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using |
485 | # VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which | |
486 | # do not require the fix. | |
487 | !IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60" | |
488 | ! IF "$(USE_PERLCRT)" != "define" | |
9e42cd94 | 489 | BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX |
46e77f11 | 490 | ! ENDIF |
9e42cd94 GS |
491 | !ENDIF |
492 | ||
493 | LIBBASEFILES = $(CRYPT_LIB) \ | |
494 | oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ | |
495 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ | |
036c1c1e | 496 | netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \ |
4ebea3c6 | 497 | version.lib odbc32.lib odbccp32.lib comctl32.lib |
c623ac67 | 498 | |
9453ddcd SH |
499 | # The 64 bit Platform SDK compilers contain a runtime library that doesn't |
500 | # include the buffer overrun verification code used by the /GS switch. | |
501 | # Since the code links against libraries that are compiled with /GS, this | |
502 | # "security cookie verification" must be included via bufferoverlow.lib. | |
503 | !IF "$(WIN64)" == "define" | |
504 | LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib | |
c623ac67 | 505 | !ENDIF |
9e42cd94 GS |
506 | |
507 | # we add LIBC here, since we may be using PerlCRT.dll | |
508 | LIBFILES = $(LIBBASEFILES) $(LIBC) | |
509 | ||
a5ca303d | 510 | #EXTRACFLAGS = -nologo -GF -W4 -wd4127 -wd4706 |
9453ddcd | 511 | EXTRACFLAGS = -nologo -GF -W3 |
bb275e72 | 512 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
9e42cd94 GS |
513 | $(PCHFLAGS) $(OPTIMIZE) |
514 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ | |
515 | -libpath:"$(INST_COREDIR)" \ | |
516 | -machine:$(PROCESSOR_ARCHITECTURE) | |
4e036e4b | 517 | LIB_FLAGS = -nologo |
9e42cd94 GS |
518 | OBJOUT_FLAG = -Fo |
519 | EXEOUT_FLAG = -Fe | |
520 | ||
521 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) | |
522 | ||
4ebea3c6 JD |
523 | !IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \ |
524 | "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE" | |
525 | LINK_FLAGS = $(LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" | |
526 | !ELSE | |
527 | RSC_FLAGS = -DINCLUDE_MANIFEST | |
528 | !ENDIF | |
529 | ||
530 | ||
9e42cd94 GS |
531 | #################### do not edit below this line ####################### |
532 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## | |
533 | ||
534 | o = .obj | |
535 | ||
536 | # | |
537 | # Rules | |
538 | # | |
539 | ||
540 | .SUFFIXES : .c $(o) .dll .lib .exe .rc .res | |
541 | ||
542 | .c$(o): | |
543 | $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< | |
544 | ||
545 | .y.c: | |
546 | $(NOOP) | |
547 | ||
548 | $(o).dll: | |
549 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ | |
550 | -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) | |
c8e599d3 | 551 | $(EMBED_DLL_MANI) |
9e42cd94 GS |
552 | |
553 | .rc.res: | |
4ebea3c6 | 554 | $(RSC) -i.. $(RSC_FLAGS) $< |
9e42cd94 GS |
555 | |
556 | # | |
557 | # various targets | |
558 | ||
559 | # makedef.pl must be updated if this changes, and this should normally | |
560 | # only change when there is an incompatible revision of the public API. | |
cb47d8a5 JV |
561 | PERLIMPLIB = ..\perl513.lib |
562 | PERLSTATICLIB = ..\perl513s.lib | |
563 | PERLDLL = ..\perl513.dll | |
9e42cd94 GS |
564 | |
565 | MINIPERL = ..\miniperl.exe | |
566 | MINIDIR = .\mini | |
567 | PERLEXE = ..\perl.exe | |
568 | WPERLEXE = ..\wperl.exe | |
4e036e4b | 569 | PERLEXESTATIC = ..\perl-static.exe |
9e42cd94 | 570 | GLOBEXE = ..\perlglob.exe |
04bae4fb | 571 | CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl |
9e42cd94 GS |
572 | MINIMOD = ..\lib\ExtUtils\Miniperl.pm |
573 | X2P = ..\x2p\a2p.exe | |
202d1001 | 574 | GENUUDMAP = ..\generate_uudmap.exe |
4e036e4b VK |
575 | !IF "$(BUILD_STATIC)" == "define" |
576 | PERLSTATIC = static | |
577 | !ELSE | |
578 | PERLSTATIC = | |
579 | !ENDIF | |
73c9ebc7 | 580 | |
ca12659b | 581 | # Unicode data files generated by mktables |
36ff7f95 SH |
582 | FIRSTUNIFILE = ..\lib\unicore\Decomposition.pl |
583 | UNIDATAFILES = ..\lib\unicore\Decomposition.pl \ | |
7ebf06b3 | 584 | ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \ |
860054a8 | 585 | ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst \ |
3e344d15 | 586 | ..\lib\unicore\TestProp.pl |
ca12659b NC |
587 | |
588 | # Directories of Unicode data files generated by mktables | |
27a8011f SH |
589 | UNIDATADIR1 = ..\lib\unicore\To |
590 | UNIDATADIR2 = ..\lib\unicore\lib | |
ca12659b | 591 | |
4ebea3c6 | 592 | PERLEXE_MANIFEST= .\perlexe.manifest |
3890b58f RGS |
593 | PERLEXE_ICO = .\perlexe.ico |
594 | PERLEXE_RES = .\perlexe.res | |
595 | PERLDLL_RES = | |
596 | ||
9e42cd94 GS |
597 | # Nominate a target which causes extensions to be re-built |
598 | # This used to be $(PERLEXE), but at worst it is the .dll that they depend | |
599 | # on and really only the interface - i.e. the .def file used to export symbols | |
600 | # from the .dll | |
601 | PERLDEP = perldll.def | |
602 | ||
603 | PL2BAT = bin\pl2bat.pl | |
604 | GLOBBAT = bin\perlglob.bat | |
605 | ||
606 | UTILS = \ | |
607 | ..\utils\h2ph \ | |
608 | ..\utils\splain \ | |
609 | ..\utils\dprofpp \ | |
610 | ..\utils\perlbug \ | |
611 | ..\utils\pl2pm \ | |
612 | ..\utils\c2ph \ | |
827a599d | 613 | ..\utils\pstruct \ |
9e42cd94 GS |
614 | ..\utils\h2xs \ |
615 | ..\utils\perldoc \ | |
9e42cd94 GS |
616 | ..\utils\perlivp \ |
617 | ..\utils\libnetcfg \ | |
827a599d GS |
618 | ..\utils\enc2xs \ |
619 | ..\utils\piconv \ | |
bb4e9162 | 620 | ..\utils\config_data \ |
18a1cebe | 621 | ..\utils\corelist \ |
83cd6e83 | 622 | ..\utils\cpan \ |
ea0e987d | 623 | ..\utils\xsubpp \ |
4b618757 | 624 | ..\utils\prove \ |
291d3373 | 625 | ..\utils\ptar \ |
b8669316 | 626 | ..\utils\ptardiff \ |
6aaee015 RGS |
627 | ..\utils\cpanp-run-perl \ |
628 | ..\utils\cpanp \ | |
629 | ..\utils\cpan2dist \ | |
3ddf9550 | 630 | ..\utils\shasum \ |
ea0e987d | 631 | ..\utils\instmodsh \ |
9e42cd94 GS |
632 | ..\pod\pod2html \ |
633 | ..\pod\pod2latex \ | |
634 | ..\pod\pod2man \ | |
635 | ..\pod\pod2text \ | |
636 | ..\pod\pod2usage \ | |
637 | ..\pod\podchecker \ | |
638 | ..\pod\podselect \ | |
639 | ..\x2p\find2perl \ | |
827a599d | 640 | ..\x2p\psed \ |
9e42cd94 | 641 | ..\x2p\s2p \ |
9e42cd94 GS |
642 | bin\exetype.pl \ |
643 | bin\runperl.pl \ | |
644 | bin\pl2bat.pl \ | |
645 | bin\perlglob.pl \ | |
646 | bin\search.pl | |
647 | ||
648 | MAKE = nmake -nologo | |
649 | MAKE_BARE = nmake | |
650 | ||
c623ac67 GS |
651 | !IF "$(WIN64)" == "define" |
652 | CFGSH_TMPL = config.vc64 | |
653 | CFGH_TMPL = config_H.vc64 | |
654 | !ELSE | |
9e42cd94 GS |
655 | CFGSH_TMPL = config.vc |
656 | CFGH_TMPL = config_H.vc | |
c623ac67 | 657 | !ENDIF |
9e42cd94 | 658 | |
b6ed7314 YO |
659 | XCOPY = xcopy /f /r /i /d /y |
660 | RCOPY = xcopy /f /r /i /e /d /y | |
65980d94 | 661 | NOOP = @rem |
9e42cd94 GS |
662 | NULL = |
663 | ||
664 | DEL = del | |
665 | ||
9e42cd94 GS |
666 | MICROCORE_SRC = \ |
667 | ..\av.c \ | |
668 | ..\deb.c \ | |
669 | ..\doio.c \ | |
670 | ..\doop.c \ | |
671 | ..\dump.c \ | |
672 | ..\globals.c \ | |
673 | ..\gv.c \ | |
e1a479c5 | 674 | ..\mro.c \ |
9e42cd94 GS |
675 | ..\hv.c \ |
676 | ..\locale.c \ | |
a0d89a74 | 677 | ..\mathoms.c \ |
9e42cd94 GS |
678 | ..\mg.c \ |
679 | ..\numeric.c \ | |
680 | ..\op.c \ | |
295f0f84 | 681 | ..\pad.c \ |
9e42cd94 GS |
682 | ..\perl.c \ |
683 | ..\perlapi.c \ | |
684 | ..\perly.c \ | |
685 | ..\pp.c \ | |
686 | ..\pp_ctl.c \ | |
687 | ..\pp_hot.c \ | |
688 | ..\pp_pack.c \ | |
689 | ..\pp_sort.c \ | |
690 | ..\pp_sys.c \ | |
10bc17b6 | 691 | ..\reentr.c \ |
9e42cd94 GS |
692 | ..\regcomp.c \ |
693 | ..\regexec.c \ | |
694 | ..\run.c \ | |
695 | ..\scope.c \ | |
696 | ..\sv.c \ | |
697 | ..\taint.c \ | |
698 | ..\toke.c \ | |
699 | ..\universal.c \ | |
700 | ..\utf8.c \ | |
48462a74 | 701 | ..\util.c |
9e42cd94 GS |
702 | |
703 | EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c | |
704 | ||
705 | !IF "$(PERL_MALLOC)" == "define" | |
706 | EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c | |
707 | !ENDIF | |
708 | ||
709 | EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c | |
710 | ||
711 | WIN32_SRC = \ | |
712 | .\win32.c \ | |
713 | .\win32sck.c \ | |
714 | .\win32thread.c | |
715 | ||
f7d585d3 GS |
716 | # We need this for miniperl build unless we override canned |
717 | # config.h #define building mini\* | |
718 | #!IF "$(USE_PERLIO)" == "define" | |
9e42cd94 | 719 | WIN32_SRC = $(WIN32_SRC) .\win32io.c |
f7d585d3 | 720 | #!ENDIF |
9e42cd94 GS |
721 | |
722 | !IF "$(CRYPT_SRC)" != "" | |
723 | WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC) | |
724 | !ENDIF | |
725 | ||
9e42cd94 GS |
726 | X2P_SRC = \ |
727 | ..\x2p\a2p.c \ | |
728 | ..\x2p\hash.c \ | |
729 | ..\x2p\str.c \ | |
730 | ..\x2p\util.c \ | |
731 | ..\x2p\walk.c | |
732 | ||
733 | CORE_NOCFG_H = \ | |
734 | ..\av.h \ | |
735 | ..\cop.h \ | |
736 | ..\cv.h \ | |
737 | ..\dosish.h \ | |
738 | ..\embed.h \ | |
739 | ..\form.h \ | |
740 | ..\gv.h \ | |
741 | ..\handy.h \ | |
742 | ..\hv.h \ | |
743 | ..\iperlsys.h \ | |
744 | ..\mg.h \ | |
745 | ..\nostdio.h \ | |
746 | ..\op.h \ | |
747 | ..\opcode.h \ | |
748 | ..\perl.h \ | |
749 | ..\perlapi.h \ | |
750 | ..\perlsdio.h \ | |
751 | ..\perlsfio.h \ | |
752 | ..\perly.h \ | |
753 | ..\pp.h \ | |
754 | ..\proto.h \ | |
cdb0f547 | 755 | ..\regcomp.h \ |
9e42cd94 GS |
756 | ..\regexp.h \ |
757 | ..\scope.h \ | |
758 | ..\sv.h \ | |
759 | ..\thread.h \ | |
760 | ..\unixish.h \ | |
761 | ..\utf8.h \ | |
762 | ..\util.h \ | |
763 | ..\warnings.h \ | |
764 | ..\XSUB.h \ | |
765 | ..\EXTERN.h \ | |
766 | ..\perlvars.h \ | |
767 | ..\intrpvar.h \ | |
9e42cd94 GS |
768 | .\include\dirent.h \ |
769 | .\include\netdb.h \ | |
770 | .\include\sys\socket.h \ | |
771 | .\win32.h | |
772 | ||
a148edb6 | 773 | CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h |
9e42cd94 | 774 | |
202d1001 | 775 | UUDMAP_H = ..\uudmap.h |
efa50c51 | 776 | BITCOUNT_H = ..\bitcount.h |
202d1001 | 777 | |
9e42cd94 GS |
778 | MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj) |
779 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj) | |
780 | WIN32_OBJ = $(WIN32_SRC:.c=.obj) | |
781 | MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \ | |
782 | $(MINIDIR)\miniperlmain$(o) \ | |
783 | $(MINIDIR)\perlio$(o) | |
784 | MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\) | |
785 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) | |
281da5ea | 786 | DLL_OBJ = $(DYNALOADER) |
9e42cd94 | 787 | X2P_OBJ = $(X2P_SRC:.c=.obj) |
202d1001 | 788 | GENUUDMAP_OBJ = $(GENUUDMAP:.exe=.obj) |
9e42cd94 GS |
789 | |
790 | PERLDLL_OBJ = $(CORE_OBJ) | |
791 | PERLEXE_OBJ = perlmain$(o) | |
4e036e4b | 792 | PERLEXEST_OBJ = perlmainst$(o) |
9e42cd94 GS |
793 | |
794 | PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ) | |
9e42cd94 GS |
795 | |
796 | !IF "$(USE_SETARGV)" != "" | |
797 | SETARGV_OBJ = setargv$(o) | |
798 | !ENDIF | |
799 | ||
a1f2e719 VK |
800 | !IF "$(ALL_STATIC)" == "define" |
801 | # some exclusions, unfortunately, until fixed: | |
802 | # - Win32 extension contains overlapped symbols with win32.c (BUG!) | |
803 | # - MakeMaker isn't capable enough for SDBM_File (smaller bug) | |
804 | # - Encode (encoding search algorithm relies on shared library?) | |
9788a75a | 805 | STATIC_EXT = * !Win32 !SDBM_File !Encode |
a1f2e719 VK |
806 | !ELSE |
807 | # specify static extensions here, for example: | |
4e036e4b | 808 | #STATIC_EXT = Cwd Compress/Raw/Zlib |
78ff2d7b | 809 | STATIC_EXT = Win32CORE |
a1f2e719 | 810 | !ENDIF |
595589fa | 811 | |
281da5ea | 812 | DYNALOADER = ..\DynaLoader$(o) |
9e42cd94 | 813 | |
9e42cd94 GS |
814 | CFG_VARS = \ |
815 | "INST_DRV=$(INST_DRV)" \ | |
816 | "INST_TOP=$(INST_TOP)" \ | |
817 | "INST_VER=$(INST_VER)" \ | |
818 | "INST_ARCH=$(INST_ARCH)" \ | |
819 | "archname=$(ARCHNAME)" \ | |
820 | "cc=$(CC)" \ | |
821 | "ld=$(LINK32)" \ | |
bb275e72 | 822 | "ccflags=$(EXTRACFLAGS) $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \ |
9e42cd94 GS |
823 | "cf_email=$(EMAIL)" \ |
824 | "d_crypt=$(D_CRYPT)" \ | |
825 | "d_mymalloc=$(PERL_MALLOC)" \ | |
826 | "libs=$(LIBFILES)" \ | |
827 | "incpath=$(CCINCDIR:"=\")" \ | |
828 | "libperl=$(PERLIMPLIB:..\=)" \ | |
829 | "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \ | |
830 | "libc=$(LIBC)" \ | |
831 | "make=$(MAKE_BARE)" \ | |
d2b25974 | 832 | "static_ext=$(STATIC_EXT)" \ |
7e0017d3 | 833 | "usethreads=$(USE_ITHREADS)" \ |
9e42cd94 | 834 | "useithreads=$(USE_ITHREADS)" \ |
9e42cd94 GS |
835 | "usemultiplicity=$(USE_MULTI)" \ |
836 | "useperlio=$(USE_PERLIO)" \ | |
4a9d6100 | 837 | "uselargefiles=$(USE_LARGE_FILES)" \ |
7ada00a0 | 838 | "usesitecustomize=$(USE_SITECUST)" \ |
9e42cd94 GS |
839 | "LINK_FLAGS=$(LINK_FLAGS:"=\")" \ |
840 | "optimize=$(OPTIMIZE:"=\")" | |
841 | ||
1487a039 | 842 | ICWD = -I..\cpan\Cwd -I..\cpan\Cwd\lib |
403f501d | 843 | |
9e42cd94 GS |
844 | # |
845 | # Top targets | |
846 | # | |
847 | ||
a148edb6 | 848 | all : .\config.h ..\git_version.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) \ |
a34ce875 | 849 | $(UNIDATAFILES) MakePPPort $(PERLEXE) $(X2P) Extensions_nonxs Extensions $(PERLSTATIC) |
9e42cd94 GS |
850 | @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite. |
851 | ||
e64b1bd1 YO |
852 | ..\regcharclass.h : ..\Porting\regcharclass.pl |
853 | cd .. | |
e094b17e | 854 | miniperl Porting\regcharclass.pl |
e64b1bd1 | 855 | cd win32 |
5d458dd8 | 856 | |
c900f745 | 857 | regnodes : ..\regnodes.h |
5d458dd8 | 858 | |
e64b1bd1 YO |
859 | ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h |
860 | ||
861 | ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h | |
862 | ||
a148edb6 SH |
863 | reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) \ |
864 | $(UNIDATAFILES) $(PERLEXE) $(X2P) Extensions_reonly | |
a24cc0c0 YO |
865 | @echo Perl and 're' are up to date. |
866 | ||
4e036e4b VK |
867 | static: $(PERLEXESTATIC) |
868 | ||
9e42cd94 GS |
869 | #------------------------------------------------------------ |
870 | ||
871 | $(GLOBEXE) : perlglob$(o) | |
872 | $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ | |
873 | perlglob$(o) setargv$(o) | |
c8e599d3 | 874 | $(EMBED_EXE_MANI) |
9e42cd94 GS |
875 | |
876 | perlglob$(o) : perlglob.c | |
877 | ||
878 | config.w32 : $(CFGSH_TMPL) | |
879 | copy $(CFGSH_TMPL) config.w32 | |
880 | ||
881 | .\config.h : $(CFGH_TMPL) | |
882 | -del /f config.h | |
883 | copy $(CFGH_TMPL) config.h | |
884 | ||
04bf47ee | 885 | ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl |
a148edb6 | 886 | cd .. |
16ad9bfa | 887 | miniperl -Ilib make_patchnum.pl |
a148edb6 SH |
888 | cd win32 |
889 | ||
931482b7 NC |
890 | # make sure that we recompile perl.c if the git version changes |
891 | ..\perl$(o) : ..\git_version.h | |
a148edb6 | 892 | |
9e42cd94 GS |
893 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL |
894 | $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh | |
895 | ||
76febb1c SH |
896 | # this target is for when changes to the main config.sh happen. |
897 | # edit config.vc, then make perl in a minimal configuration (i.e. with MULTI, | |
898 | # ITHREADS, IMP_SYS, LARGE_FILES, PERLIO and CRYPT off), then make this target | |
899 | # to regenerate config_H.vc. | |
900 | # repeat for config.vc64 and config_H.vc64 if you have a suitable build | |
901 | # environment, otherwise hand-edit them to maintain the same differences with | |
902 | # config.vc and config_H.vc as before. | |
903 | # unfortunately, some further manual editing is also then required to restore all | |
904 | # the special __GNUC__ handling that is otherwise lost. | |
9e42cd94 | 905 | regen_config_h: |
76febb1c | 906 | $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh |
4e73d6a4 | 907 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
9e42cd94 | 908 | -del /f $(CFGH_TMPL) |
38cd195c | 909 | -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)" |
9e42cd94 GS |
910 | rename config.h $(CFGH_TMPL) |
911 | ||
912 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl | |
4e73d6a4 | 913 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
9e42cd94 GS |
914 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) |
915 | $(XCOPY) ..\*.h $(COREDIR)\*.* | |
916 | $(XCOPY) *.h $(COREDIR)\*.* | |
917 | $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.* | |
918 | $(RCOPY) include $(COREDIR)\*.* | |
38cd195c | 919 | -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)" |
9e42cd94 GS |
920 | if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM) |
921 | ||
922 | $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) | |
923 | $(LINK32) -subsystem:console -out:$@ @<< | |
924 | $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ) | |
925 | << | |
c8e599d3 | 926 | $(EMBED_EXE_MANI) |
9e42cd94 GS |
927 | |
928 | $(MINIDIR) : | |
929 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" | |
930 | ||
931 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) | |
8c4561fb | 932 | $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c |
9e42cd94 GS |
933 | |
934 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) | |
935 | $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c | |
936 | ||
937 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c | |
938 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h | |
939 | !IF "$(USE_IMP_SYS)" == "define" | |
940 | perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h | |
941 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c | |
942 | !ENDIF | |
943 | ||
944 | # 1. we don't want to rebuild miniperl.exe when config.h changes | |
945 | # 2. we don't want to rebuild miniperl.exe with non-default config.h | |
931482b7 | 946 | # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it |
9e42cd94 GS |
947 | $(MINI_OBJ) : $(CORE_NOCFG_H) |
948 | ||
949 | $(WIN32_OBJ) : $(CORE_H) | |
950 | $(CORE_OBJ) : $(CORE_H) | |
951 | $(DLL_OBJ) : $(CORE_H) | |
952 | $(X2P_OBJ) : $(CORE_H) | |
953 | ||
c6d234b8 NC |
954 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl create_perllibst_h.pl |
955 | $(MINIPERL) -I..\lib create_perllibst_h.pl | |
c1effa61 | 956 | $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \ |
9e42cd94 GS |
957 | CCTYPE=$(CCTYPE) > perldll.def |
958 | ||
595589fa | 959 | $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static |
9e7cf449 | 960 | $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<< |
9e42cd94 GS |
961 | $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES) |
962 | << | |
c8e599d3 | 963 | $(EMBED_DLL_MANI) |
9e42cd94 GS |
964 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) |
965 | ||
4e036e4b VK |
966 | $(PERLSTATICLIB): Extensions_static |
967 | $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static @<< | |
968 | $(PERLDLL_OBJ) | |
969 | << | |
970 | $(XCOPY) $(PERLSTATICLIB) $(COREDIR) | |
971 | ||
4ebea3c6 | 972 | $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO) |
e84ac4e2 | 973 | |
9e42cd94 GS |
974 | $(MINIMOD) : $(MINIPERL) ..\minimod.pl |
975 | cd .. | |
976 | miniperl minimod.pl > lib\ExtUtils\Miniperl.pm | |
977 | cd win32 | |
978 | ||
979 | ..\x2p\a2p$(o) : ..\x2p\a2p.c | |
980 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c | |
981 | ||
982 | ..\x2p\hash$(o) : ..\x2p\hash.c | |
983 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c | |
984 | ||
985 | ..\x2p\str$(o) : ..\x2p\str.c | |
986 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c | |
987 | ||
988 | ..\x2p\util$(o) : ..\x2p\util.c | |
989 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c | |
990 | ||
991 | ..\x2p\walk$(o) : ..\x2p\walk.c | |
992 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c | |
993 | ||
403f501d | 994 | $(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions |
c1effa61 NC |
995 | $(MINIPERL) -I..\lib ..\x2p\find2perl.PL |
996 | $(MINIPERL) -I..\lib ..\x2p\s2p.PL | |
9e42cd94 GS |
997 | $(LINK32) -subsystem:console -out:$@ @<< |
998 | $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ) | |
999 | << | |
c8e599d3 | 1000 | $(EMBED_EXE_MANI) |
9e42cd94 | 1001 | |
efa50c51 | 1002 | $(MINIDIR)\globals$(o) : $(UUDMAP_H) $(BITCOUNT_H) |
9444d213 | 1003 | |
efa50c51 NC |
1004 | $(UUDMAP_H) $(BITCOUNT_H) : $(GENUUDMAP) |
1005 | $(GENUUDMAP) $(UUDMAP_H) $(BITCOUNT_H) | |
9444d213 | 1006 | |
202d1001 | 1007 | $(GENUUDMAP) : $(GENUUDMAP_OBJ) |
9444d213 | 1008 | $(LINK32) -subsystem:console -out:$@ @<< |
202d1001 SH |
1009 | $(LINK_FLAGS) $(LIBFILES) $(GENUUDMAP_OBJ) |
1010 | << | |
1011 | $(EMBED_EXE_MANI) | |
9444d213 | 1012 | |
9e42cd94 GS |
1013 | perlmain.c : runperl.c |
1014 | copy runperl.c perlmain.c | |
1015 | ||
1016 | perlmain$(o) : perlmain.c | |
88c9158a | 1017 | $(CC) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c |
9e42cd94 | 1018 | |
4e036e4b VK |
1019 | perlmainst.c : runperl.c |
1020 | copy runperl.c perlmainst.c | |
1021 | ||
1022 | perlmainst$(o) : perlmainst.c | |
88c9158a | 1023 | $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c |
4e036e4b | 1024 | |
931482b7 | 1025 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) |
9e42cd94 GS |
1026 | $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \ |
1027 | $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES) | |
c8e599d3 | 1028 | $(EMBED_EXE_MANI) |
9e42cd94 GS |
1029 | copy $(PERLEXE) $(WPERLEXE) |
1030 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS | |
9e42cd94 | 1031 | |
931482b7 | 1032 | $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) |
4e036e4b | 1033 | $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \ |
a1f2e719 | 1034 | @Extensions_static $(PERLSTATICLIB) /PDB:NONE \ |
4e036e4b VK |
1035 | $(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES) |
1036 | $(EMBED_EXE_MANI) | |
1037 | ||
d1a21686 | 1038 | MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs |
403f501d | 1039 | $(MINIPERL) -I..\lib $(ICWD) ..\mkppport |
42e07562 | 1040 | |
9dcb9602 | 1041 | #------------------------------------------------------------------------------- |
281da5ea | 1042 | # There's no direct way to mark a dependency on |
6afd19bc | 1043 | # DynaLoader.pm, so this will have to do |
281da5ea | 1044 | Extensions: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER) |
a5ca303d | 1045 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1046 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic |
595589fa | 1047 | |
281da5ea | 1048 | Extensions_reonly: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER) |
a5ca303d | 1049 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1050 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re |
a24cc0c0 | 1051 | |
286d62c2 | 1052 | Extensions_static : ..\make_ext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) |
a5ca303d | 1053 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1054 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static |
c6d234b8 | 1055 | $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static |
9e42cd94 | 1056 | |
9ddff148 | 1057 | Extensions_nonxs: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) |
a34ce875 | 1058 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1059 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs |
a34ce875 | 1060 | |
281da5ea NC |
1061 | $(DYNALOADER) : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs |
1062 | $(XCOPY) ..\*.h $(COREDIR)\*.* | |
1063 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader | |
1064 | ||
9e42cd94 | 1065 | Extensions_clean: |
a193a2db | 1066 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean |
9e42cd94 | 1067 | |
b4dc1df6 | 1068 | Extensions_realclean: |
a193a2db | 1069 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean |
b4dc1df6 | 1070 | |
9dcb9602 | 1071 | #------------------------------------------------------------------------------- |
9e42cd94 | 1072 | |
0195b144 | 1073 | doc: $(PERLEXE) ..\pod\perltoc.pod |
b4a41557 | 1074 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \ |
9e42cd94 GS |
1075 | --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \ |
1076 | --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse | |
1077 | ||
b0b6bf2b AT |
1078 | # Note that this next section is parsed (and regenerated) by pod/buildtoc |
1079 | # so please check that script before making structural changes here | |
1080 | ||
9ddff148 | 1081 | utils: $(PERLEXE) $(X2P) |
9e42cd94 GS |
1082 | cd ..\utils |
1083 | $(MAKE) PERL=$(MINIPERL) | |
1084 | cd ..\pod | |
b0b6bf2b AT |
1085 | copy ..\README.aix ..\pod\perlaix.pod |
1086 | copy ..\README.amiga ..\pod\perlamiga.pod | |
1087 | copy ..\README.apollo ..\pod\perlapollo.pod | |
1088 | copy ..\README.beos ..\pod\perlbeos.pod | |
1089 | copy ..\README.bs2000 ..\pod\perlbs2000.pod | |
1090 | copy ..\README.ce ..\pod\perlce.pod | |
1091 | copy ..\README.cn ..\pod\perlcn.pod | |
1092 | copy ..\README.cygwin ..\pod\perlcygwin.pod | |
1093 | copy ..\README.dgux ..\pod\perldgux.pod | |
1094 | copy ..\README.dos ..\pod\perldos.pod | |
1095 | copy ..\README.epoc ..\pod\perlepoc.pod | |
1096 | copy ..\README.freebsd ..\pod\perlfreebsd.pod | |
9f968a8d | 1097 | copy ..\README.haiku ..\pod\perlhaiku.pod |
b0b6bf2b AT |
1098 | copy ..\README.hpux ..\pod\perlhpux.pod |
1099 | copy ..\README.hurd ..\pod\perlhurd.pod | |
1100 | copy ..\README.irix ..\pod\perlirix.pod | |
1101 | copy ..\README.jp ..\pod\perljp.pod | |
1102 | copy ..\README.ko ..\pod\perlko.pod | |
6477b319 | 1103 | copy ..\README.linux ..\pod\perllinux.pod |
b0b6bf2b AT |
1104 | copy ..\README.macos ..\pod\perlmacos.pod |
1105 | copy ..\README.macosx ..\pod\perlmacosx.pod | |
b0b6bf2b AT |
1106 | copy ..\README.mpeix ..\pod\perlmpeix.pod |
1107 | copy ..\README.netware ..\pod\perlnetware.pod | |
b0846812 | 1108 | copy ..\README.openbsd ..\pod\perlopenbsd.pod |
b0b6bf2b AT |
1109 | copy ..\README.os2 ..\pod\perlos2.pod |
1110 | copy ..\README.os390 ..\pod\perlos390.pod | |
1111 | copy ..\README.os400 ..\pod\perlos400.pod | |
1112 | copy ..\README.plan9 ..\pod\perlplan9.pod | |
1113 | copy ..\README.qnx ..\pod\perlqnx.pod | |
2f08ed66 | 1114 | copy ..\README.riscos ..\pod\perlriscos.pod |
b0b6bf2b | 1115 | copy ..\README.solaris ..\pod\perlsolaris.pod |
27da23d5 | 1116 | copy ..\README.symbian ..\pod\perlsymbian.pod |
b0b6bf2b AT |
1117 | copy ..\README.tru64 ..\pod\perltru64.pod |
1118 | copy ..\README.tw ..\pod\perltw.pod | |
1119 | copy ..\README.uts ..\pod\perluts.pod | |
1120 | copy ..\README.vmesa ..\pod\perlvmesa.pod | |
b0b6bf2b AT |
1121 | copy ..\README.vos ..\pod\perlvos.pod |
1122 | copy ..\README.win32 ..\pod\perlwin32.pod | |
cea2f1cb | 1123 | copy ..\pod\perl5134delta.pod ..\pod\perldelta.pod |
9e42cd94 | 1124 | $(MAKE) -f ..\win32\pod.mak converters |
9e42cd94 GS |
1125 | cd ..\win32 |
1126 | $(PERLEXE) $(PL2BAT) $(UTILS) | |
403f501d NC |
1127 | $(PERLEXE) $(ICWD) ..\autodoc.pl .. |
1128 | $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q | |
0195b144 NC |
1129 | |
1130 | ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs | |
87e06404 | 1131 | $(PERLEXE) -f ..\pod\buildtoc --build-toc -q |
9e42cd94 | 1132 | |
b0b6bf2b AT |
1133 | # Note that the pod cleanup in this next section is parsed (and regenerated |
1134 | # by pod/buildtoc so please check that script before making changes here | |
1135 | ||
b4dc1df6 | 1136 | distclean: realclean |
9e42cd94 | 1137 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ |
4e036e4b VK |
1138 | $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) \ |
1139 | $(PERLEXESTATIC) $(PERLSTATICLIB) | |
9e42cd94 | 1140 | -del /f *.def *.map |
ca67812f SH |
1141 | -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm |
1142 | -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm | |
48462a74 | 1143 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm |
9e42cd94 GS |
1144 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
1145 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm | |
1146 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm | |
1147 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm | |
9e42cd94 GS |
1148 | -del /f $(LIBDIR)\File\Glob.pm |
1149 | -del /f $(LIBDIR)\Storable.pm | |
ca67812f | 1150 | -del /f $(LIBDIR)\Sys\Hostname.pm |
9e42cd94 | 1151 | -del /f $(LIBDIR)\Time\HiRes.pm |
9e42cd94 | 1152 | -del /f $(LIBDIR)\Unicode\Normalize.pm |
4e74047c | 1153 | -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm |
b4ad57f4 | 1154 | -del /f $(LIBDIR)\Win32.pm |
37ca3c28 | 1155 | -del /f $(LIBDIR)\Win32CORE.pm |
00701878 SH |
1156 | -del /f $(LIBDIR)\Win32API\File.pm |
1157 | -del /f $(LIBDIR)\Win32API\File\cFile.pc | |
a85e0e8c | 1158 | -del /f $(DISTDIR)\XSLoader\XSLoader.pm |
1a6c65ed SH |
1159 | -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App |
1160 | -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive | |
1161 | -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute | |
1162 | -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie | |
9e42cd94 | 1163 | -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B |
1a6c65ed SH |
1164 | -if exist $(LIBDIR)\CGI rmdir /s /q $(LIBDIR)\CGI |
1165 | -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN | |
1166 | -if exist $(LIBDIR)\CPANPLUS rmdir /s /q $(LIBDIR)\CPANPLUS | |
46ffdcf0 | 1167 | -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress |
9e42cd94 | 1168 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data |
1a6c65ed SH |
1169 | -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel |
1170 | -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest | |
ca67812f | 1171 | -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode |
1a6c65ed SH |
1172 | -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding |
1173 | -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder | |
1174 | -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command | |
1175 | -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant | |
1176 | -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist | |
1177 | -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker | |
1178 | -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec | |
1179 | -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter | |
96c33d98 | 1180 | -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash |
1a6c65ed SH |
1181 | -if exist $(LIBDIR)\I18N\LangTags rmdir /s /q $(LIBDIR)\I18N\LangTags |
1182 | -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc | |
c146e560 | 1183 | -if exist $(LIBDIR)\Module\Pluggable rmdir /s /q $(LIBDIR)\Module\Pluggable |
1a6c65ed SH |
1184 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO |
1185 | -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC | |
69f57184 | 1186 | -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List |
1a6c65ed SH |
1187 | -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale |
1188 | -if exist $(LIBDIR)\Log rmdir /s /q $(LIBDIR)\Log | |
1189 | -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math | |
1190 | -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize | |
69f57184 | 1191 | -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME |
1a6c65ed SH |
1192 | -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module |
1193 | -if exist $(LIBDIR)\mro rmdir /s /q $(LIBDIR)\mro | |
1194 | -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP | |
1195 | -if exist $(LIBDIR)\Object rmdir /s /q $(LIBDIR)\Object | |
1196 | -if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package | |
1197 | -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params | |
1198 | -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse | |
1199 | -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO | |
1200 | -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc | |
1201 | -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple | |
1202 | -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text | |
849a608a | 1203 | -if exist $(LIBDIR)\re rmdir /s /q $(LIBDIR)\re |
9e42cd94 | 1204 | -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar |
6c4b87ea | 1205 | -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys |
1a6c65ed SH |
1206 | -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP |
1207 | -if exist $(LIBDIR)\Term\UI rmdir /s /q $(LIBDIR)\Term\UI | |
1208 | -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test | |
1209 | -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread | |
6c4b87ea | 1210 | -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads |
1a6c65ed | 1211 | -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate |
9e42cd94 | 1212 | -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS |
00701878 | 1213 | -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API |
1a6c65ed | 1214 | -cd $(PODDIR) && del /f *.html *.bat \ |
9e64a656 NC |
1215 | perlaix.pod perlamiga.pod perlapi.pod perlapollo.pod \ |
1216 | perlbeos.pod perlbs2000.pod perlce.pod perlcn.pod \ | |
1217 | perlcygwin.pod perldelta.pod perldgux.pod perldos.pod \ | |
1218 | perlepoc.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \ | |
1219 | perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \ | |
7cdf958d DM |
1220 | perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \ |
1221 | perlmpeix.pod perlnetware.pod perlopenbsd.pod perlos2.pod \ | |
1222 | perlos390.pod perlos400.pod perlplan9.pod perlqnx.pod \ | |
1223 | perlriscos.pod perlsolaris.pod perlsymbian.pod perltoc.pod \ | |
524ce141 RGS |
1224 | perltru64.pod perltw.pod perluniprops.pod perluts.pod \ |
1225 | perlvmesa.pod perlvos.pod perlwin32.pod \ | |
b0b6bf2b | 1226 | pod2html pod2latex pod2man pod2text pod2usage \ |
9e42cd94 | 1227 | podchecker podselect |
ca67812f | 1228 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \ |
de125441 | 1229 | perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \ |
6aaee015 | 1230 | xsubpp instmodsh prove ptar ptardiff cpanp-run-perl cpanp cpan2dist shasum corelist config_data |
ca67812f | 1231 | -cd ..\x2p && del /f find2perl s2p psed *.bat |
19ec6f53 | 1232 | -del /f ..\config.sh perlmain.c dlutils.c config.h.new \ |
4e036e4b | 1233 | perlmainst.c |
9e42cd94 | 1234 | -del /f $(CONFIGPM) |
a148edb6 | 1235 | -del /f ..\lib\Config_git.pl |
9e42cd94 | 1236 | -del /f bin\*.bat |
322fd642 | 1237 | -del /f perllibst.h |
4ebea3c6 | 1238 | -del /f $(PERLEXE_RES) perl.base |
85741d00 | 1239 | -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h |
ca67812f | 1240 | -cd $(EXTDIR) && del /s *.def Makefile Makefile.old |
a193a2db | 1241 | -cd $(DISTDIR) && del /s *.def Makefile Makefile.old |
b212a3c6 | 1242 | -cd $(CPANDIR) && del /s *.def Makefile Makefile.old |
9e42cd94 | 1243 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) |
9e42cd94 | 1244 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) |
b4a41557 SH |
1245 | -if exist pod2htmd.tmp del pod2htmd.tmp |
1246 | -if exist pod2htmi.tmp del pod2htmi.tmp | |
1247 | -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR) | |
0279961e | 1248 | -del /f ..\t\test_state |
9e42cd94 GS |
1249 | |
1250 | install : all installbare installhtml | |
1251 | ||
0195b144 | 1252 | installbare : utils ..\pod\perltoc.pod |
9e42cd94 GS |
1253 | $(PERLEXE) ..\installperl |
1254 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* | |
5548433c | 1255 | if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.* |
9e42cd94 | 1256 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
ec25c072 SH |
1257 | if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.* |
1258 | if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.* | |
9e42cd94 GS |
1259 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
1260 | ||
1261 | installhtml : doc | |
b4a41557 | 1262 | $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.* |
9e42cd94 GS |
1263 | |
1264 | inst_lib : $(CONFIGPM) | |
9e42cd94 GS |
1265 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
1266 | ||
58fa074c | 1267 | $(UNIDATAFILES) ..\pod\perluniprops.pod : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs |
27a8011f | 1268 | cd ..\lib\unicore && \ |
3df51b85 | 1269 | ..\$(MINIPERL) -I.. -I..\..\cpan\Cwd\lib -I..\..\cpan\Cwd mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE) |
ca12659b NC |
1270 | |
1271 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES) | |
6c85d12e SH |
1272 | $(XCOPY) $(MINIPERL) ..\t\$(NULL) |
1273 | if exist ..\t\perl.exe del /f ..\t\perl.exe | |
1274 | rename ..\t\miniperl.exe perl.exe | |
9e42cd94 GS |
1275 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
1276 | attrib -r ..\t\*.* | |
6c85d12e SH |
1277 | cd ..\t && \ |
1278 | $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t | |
9e42cd94 | 1279 | |
6e2cec71 | 1280 | test-prep : all utils |
9e42cd94 GS |
1281 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
1282 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1283 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1284 | ||
1285 | test : test-prep | |
1286 | cd ..\t | |
89087c85 | 1287 | $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) |
9e42cd94 GS |
1288 | cd ..\win32 |
1289 | ||
6ae7e459 YO |
1290 | test-reonly : reonly utils |
1291 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1292 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1293 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1294 | cd ..\t | |
a4499558 | 1295 | $(PERLEXE) -I..\lib harness $(OPT) -re \bre\\/ $(EXTRA) |
6ae7e459 | 1296 | cd ..\win32 |
7bcddc65 | 1297 | |
c900f745 | 1298 | regen : |
7bcddc65 YO |
1299 | cd .. |
1300 | regen.pl | |
1301 | cd win32 | |
1302 | ||
9e42cd94 GS |
1303 | test-notty : test-prep |
1304 | set PERL_SKIP_TTY_TEST=1 | |
1305 | cd ..\t | |
89087c85 | 1306 | $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) |
9e42cd94 GS |
1307 | cd ..\win32 |
1308 | ||
b4a93add NK |
1309 | _test : |
1310 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1311 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1312 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1313 | cd ..\t | |
89087c85 | 1314 | $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) |
b4a93add NK |
1315 | cd ..\win32 |
1316 | ||
b4dc1df6 | 1317 | _clean : |
9e42cd94 GS |
1318 | -@$(DEL) miniperlmain$(o) |
1319 | -@$(DEL) $(MINIPERL) | |
1320 | -@$(DEL) perlglob$(o) | |
1321 | -@$(DEL) perlmain$(o) | |
4e036e4b | 1322 | -@$(DEL) perlmainst$(o) |
9e42cd94 GS |
1323 | -@$(DEL) config.w32 |
1324 | -@$(DEL) config.h | |
a148edb6 | 1325 | -@$(DEL) ..\git_version.h |
9e42cd94 GS |
1326 | -@$(DEL) $(GLOBEXE) |
1327 | -@$(DEL) $(PERLEXE) | |
1328 | -@$(DEL) $(WPERLEXE) | |
4e036e4b VK |
1329 | -@$(DEL) $(PERLEXESTATIC) |
1330 | -@$(DEL) $(PERLSTATICLIB) | |
9e42cd94 GS |
1331 | -@$(DEL) $(PERLDLL) |
1332 | -@$(DEL) $(CORE_OBJ) | |
efa50c51 | 1333 | -@$(DEL) $(GENUUDMAP) $(GENUUDMAP_OBJ) $(UUDMAP_H) $(BITCOUNT_H) |
9e42cd94 | 1334 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) |
27a8011f | 1335 | -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1) |
27a8011f | 1336 | -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2) |
ca12659b | 1337 | -@$(DEL) $(UNIDATAFILES) |
27a8011f | 1338 | -@$(DEL) $(WIN32_OBJ) |
9e42cd94 GS |
1339 | -@$(DEL) $(DLL_OBJ) |
1340 | -@$(DEL) $(X2P_OBJ) | |
1341 | -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res | |
1342 | -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat | |
1343 | -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat | |
1344 | -@$(DEL) *.ilk | |
1345 | -@$(DEL) *.pdb | |
9e7cf449 | 1346 | -@$(DEL) Extensions_static |
9e42cd94 | 1347 | |
6e2cec71 | 1348 | clean : Extensions_clean _clean |
b4dc1df6 | 1349 | |
85741d00 | 1350 | realclean : Extensions_realclean _clean |
b4dc1df6 | 1351 | |
9e42cd94 GS |
1352 | # Handy way to run perlbug -ok without having to install and run the |
1353 | # installed perlbug. We don't re-run the tests here - we trust the user. | |
1354 | # Please *don't* use this unless all tests pass. | |
1355 | # If you want to report test failures, use "nmake nok" instead. | |
1356 | ok: utils | |
1357 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" | |
1358 | ||
1359 | okfile: utils | |
1360 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok | |
1361 | ||
1362 | nok: utils | |
1363 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" | |
1364 | ||
1365 | nokfile: utils | |
1366 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |