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