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