2 # Makefile to build perl on Windows using DMAKE.
4 # Microsoft Visual C++ 6.0 or later
5 # MinGW with gcc-3.4.5 or later with runtime < 3.21
6 # MinGW64 with gcc-4.4.3 or later
7 # Windows SDK 64-bit compiler and tools
9 # This is set up to build a perl.exe that runs off a shared library
10 # (perl531.dll). Also makes individual DLLs for the XS extensions.
14 ## Make sure you read README.win32 *before* you mess with anything here!
18 # Import everything from the environment like NMAKE does.
23 ## Build configuration. Edit the values below to suit your needs.
27 # Set these to wherever you want "dmake install" to put your
31 INST_TOP *= $(INST_DRV)\perl
34 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
35 # on a 64-bit version of Windows.
40 # Comment this out if you DON'T want your perl installation to be versioned.
41 # This means that the new installation will overwrite any files from the
42 # old installation at the same INST_TOP location. Leaving it enabled is
43 # the safest route, as perl adds the extra version directory to all the
44 # locations it installs files to. If you disable it, an alternative
45 # versioned installation can be obtained by setting INST_TOP above to a
46 # path that includes an arbitrary version string.
51 # Comment this out if you DON'T want your perl installation to have
52 # architecture specific components. This means that architecture-
53 # specific files will be installed along with the architecture-neutral
54 # files. Leaving it enabled is safer and more flexible, in case you
55 # want to build multiple flavors of perl and install them together in
56 # the same location. Commenting it out gives you a simpler
57 # installation that is easier to understand for beginners.
59 #INST_ARCH *= \$(ARCHNAME)
62 # Uncomment this if you want perl to run
63 # $Config{sitelibexp}\sitecustomize.pl
64 # before anything else. This script can then be set up, for example,
65 # to add additional entries to @INC.
67 #USE_SITECUST *= define
70 # uncomment to enable multiple interpreters. This is needed for fork()
71 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
72 # and USE_ITHREADS below.
77 # Interpreter cloning/threads; now reasonably complete.
78 # This should be enabled to get the fork() emulation. This needs (and
79 # will auto-enable) USE_MULTI above.
81 USE_ITHREADS *= define
84 # uncomment to enable the implicit "host" layer for all system calls
85 # made by perl. This is also needed to get fork(). This needs (and
86 # will auto-enable) USE_MULTI above.
91 # Comment this out if you don't want to enable large file support for
92 # some reason. Should normally only be changed to maintain compatibility
93 # with an older release of perl.
95 USE_LARGE_FILES *= define
98 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
99 # (If you're building a 64-bit perl then you will have 64-bit integers whether
100 # or not this is uncommented.)
101 # Note: This option is not supported in 32-bit MSVC60 builds.
103 #USE_64_BIT_INT *= define
106 # Uncomment this if you want to support the use of long doubles in GCC builds.
107 # This option is not supported for MSVC builds.
109 #USE_LONG_DOUBLE *= define
112 # Uncomment this if you want to build perl with __USE_MINGW_ANSI_STDIO defined.
113 # (If you're building perl with USE_LONG_DOUBLE defined then
114 # __USE_MINGW_ANSI_STDIO will be defined whether or not this is uncommented.)
115 # This option is not supported for MSVC builds.
117 #USE_MINGW_ANSI_STDIO *= define
120 # Comment this out if you want the legacy default behavior of including '.' at
123 DEFAULT_INC_EXCLUDES_DOT *= define
126 # Uncomment this if you want to disable looking up values from
127 # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
130 #USE_NO_REGISTRY *= define
133 # uncomment exactly one of the following
135 # Visual C++ 6.0 (aka Visual C++ 98)
137 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
139 # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
140 #CCTYPE *= MSVC70FREE
141 # Windows Server 2003 SP1 Platform SDK (April 2005) (64-bit compiler and tools)
143 # Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition)
145 # Visual C++ 2008 (aka Visual C++ 9.0) (full version or Express Edition)
147 # Visual C++ 2010 (aka Visual C++ 10.0) (full version or Express Edition)
149 # Visual C++ 2012 (aka Visual C++ 11.0) (full version or Express Edition)
151 # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
153 # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
155 # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition)
157 # Visual C++ 2019 (aka Visual C++ 14.2) (full version or Community Edition)
159 # MinGW or mingw-w64 with gcc-3.4.5 or later
163 # If you are using GCC, 4.3 or later by default we add the -fwrapv option.
164 # See https://rt.perl.org/Ticket/Display.html?id=121505
169 # If you are using Intel C++ Compiler uncomment this
174 # Uncomment this if you want to build everything in C++ mode
176 #USE_CPLUSPLUS *= define
179 # uncomment next line if you want debug version of perl (big/slow)
180 # If not enabled, we automatically try to use maximum optimization
181 # with all compilers that are known to have a working optimizer.
183 # You can also set CFG = DebugSymbols for a slightly smaller/faster
184 # debug build without the special debugging code in perl which is
185 # enabled via -DDEBUGGING;
187 # or you can set CFG = DebugFull for an even fuller (bigger/slower)
188 # debug build using the debug version of the CRT, and enabling VC++
189 # debug features such as extra assertions and invalid parameter warnings
190 # in perl and CRT code via -D_DEBUG. (Note that the invalid parameter
191 # handler does get triggered from time to time in this configuration,
192 # which causes warnings to be printed on STDERR, which in turn causes a
193 # few tests to fail.) (This configuration is only available for VC++ builds.)
198 # uncomment to enable linking with setargv.obj under the Visual C
199 # compiler. Setting this options enables perl to expand wildcards in
200 # arguments, but it may be harder to use alternate methods like
201 # File::DosGlob that are more powerful. This option is supported only with
204 #USE_SETARGV *= define
207 # set this if you wish to use perl's malloc
208 # WARNING: Turning this on/off WILL break binary compatibility with extensions
209 # you may have compiled with/without it. Be prepared to recompile all
210 # extensions if you change the default. Currently, this cannot be enabled
211 # if you ask for USE_IMP_SYS above.
213 #PERL_MALLOC *= define
216 # set this to enable debugging mstats
217 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
218 # be enabled without PERL_MALLOC as well.
220 #DEBUG_MSTATS *= define
223 # set this to additionally provide a statically linked perl-static.exe.
224 # Note that dynamic loading will not work with this perl, so you must
225 # include required modules statically using the STATIC_EXT or ALL_STATIC
226 # variables below. A static library perl531s.lib will also be created.
227 # Ordinary perl.exe is not affected by this option.
229 #BUILD_STATIC *= define
232 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
233 # extension get statically built.
234 # This will result in a very large perl executable, but the main purpose
235 # is to have proper linking set so as to be able to create miscellaneous
236 # executables with different built-in extensions. It implies BUILD_STATIC.
238 #ALL_STATIC *= define
241 # set the install location of the compiler
242 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
245 # For GCC builds this should be the directory containing the bin, include,
246 # lib directories for your compiler.
252 # uncomment this if you are using x86_64-w64-mingw32 cross-compiler
253 # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc'
254 # instead of the usual 'gcc'.
259 # Additional compiler flags can be specified here.
261 BUILDOPT *= $(BUILDOPTEXTRA)
264 # This should normally be disabled. Enabling it will disable the File::Glob
265 # implementation of CORE::glob.
267 #BUILDOPT += -DPERL_EXTERNAL_GLOB
270 # Perl needs to read scripts in text mode so that the DATA filehandle
271 # works correctly with seek() and tell(), or around auto-flushes of
272 # all filehandles (e.g. by system(), backticks, fork(), etc).
274 # The current version on the ByteLoader module on CPAN however only
275 # works if scripts are read in binary mode. But before you disable text
276 # mode script reading (and break some DATA filehandle functionality)
277 # please check first if an updated ByteLoader isn't available on CPAN.
279 BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
282 # specify semicolon-separated list of extra directories that modules will
283 # look for libraries (spaces in path names need not be quoted)
288 # set this to point to cmd.exe (only needed if you use some
289 # alternate shell that doesn't grok cmd.exe style commands)
291 #SHELL *= g:\winnt\system32\cmd.exe
294 # set this to your email address (perl will guess a value from
295 # from your loginname and your hostname, which may not be right)
300 ## Build configuration ends.
303 ##################### CHANGE THESE ONLY IF YOU MUST #####################
306 DEBUG_MSTATS *= undef
308 USE_SITECUST *= undef
310 USE_ITHREADS *= undef
312 USE_LARGE_FILES *= undef
313 USE_64_BIT_INT *= undef
314 USE_LONG_DOUBLE *= undef
315 DEFAULT_INC_EXCLUDES_DOT *= undef
316 USE_NO_REGISTRY *= undef
319 .IF "$(USE_IMP_SYS)" == "define"
323 .IF "$(PERL_MALLOC)" == "undef"
327 .IF "$(DEBUG_MSTATS)" == "define"
328 BUILDOPT += -DPERL_DEBUGGING_MSTATS
331 .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
335 .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
339 .IF "$(USE_SITECUST)" == "define"
340 BUILDOPT += -DUSE_SITECUSTOMIZE
343 .IF "$(USE_MULTI)" != "undef"
344 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
347 .IF "$(USE_IMP_SYS)" != "undef"
348 BUILDOPT += -DPERL_IMPLICIT_SYS
351 .IF "$(USE_NO_REGISTRY)" != "undef"
352 BUILDOPT += -DWIN32_NO_REGISTRY
355 .IF "$(CCTYPE)" == "GCC"
356 GCCTARGET := $(shell gcc -dumpmachine & exit /b 0)
359 #no explicit CCTYPE given, do auto detection
360 .IF "$(CCTYPE)" == ""
361 GCCTARGET := $(shell gcc -dumpmachine 2>NUL & exit /b 0)
363 .IF "$(GCCTARGET)" != ""
366 WIN64 := $(shell for /f "tokens=3 delims=.^ " \
367 %i in ('cl ^2^>^&1') do @if "%i" == "32-bit" echo undef)
368 #major version of CL has diff position based on 32 vs 64
369 #Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64
370 #Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
371 #use var to capture 1st line only, not 8th token of lines 2 & 3 in cl.exe output
372 .IF "$(WIN64)" == "undef"
373 MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=8,9 delims=.^ " \
374 %i in ('cl ^2^>^&1') do @if not defined MSVCVER if %i% geq 19 \
375 (set /A "MSVCVER=((%i-5)*10)+(%j/10)") \
376 else (set /A "MSVCVER=(%i-6)*10")))
378 MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=7,8 delims=.^ " \
379 %i in ('cl ^2^>^&1') do @if not defined MSVCVER if %i% geq 19 \
380 (set /A "MSVCVER=((%i-5)*10)+(%j/10)") \
381 else (set /A "MSVCVER=(%i-6)*10")))
383 #autodetect failed, reset to empty string
384 .IF "$(MSVCVER)" == "-50"
387 CCTYPE := MSVC$(MSVCVER)
392 # Versions of Visual C++ up to VC++ 7.1 define $(MSVCDir); versions since then
393 # define $(VCINSTALLDIR) instead, but for VC++ 14.1 we need the subfolder given
394 # by $(VCToolsInstallDir).
395 .IF "$(CCHOME)" == ""
396 .IF "$(CCTYPE)" == "GCC"
398 .ELIF "$(CCTYPE)" == "MSVC60" || \
399 "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
401 .ELIF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
402 CCHOME *= $(VCToolsInstallDir)
404 CCHOME *= $(VCINSTALLDIR)
408 PROCESSOR_ARCHITECTURE *= x86
410 .IF "$(WIN64)" == "undef"
411 PROCESSOR_ARCHITECTURE = x86
415 # When we are running from a 32bit cmd.exe on AMD64 then
416 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
418 .IF "$(PROCESSOR_ARCHITEW6432)" != ""
419 PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
421 .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
428 .IF "$(WIN64)" == "define"
429 USE_64_BIT_INT = define
432 # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
433 # both link against MSVCRT.dll (which is part of Windows itself) and
434 # not against a compiler specific versioned runtime.
435 .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
439 # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
440 # does not support it.
441 .IF "$(CCTYPE)" == "MSVC60"
442 USE_64_BIT_INT != undef
445 # Disable the long double option for MSVC builds since that compiler
446 # does not support it.
447 .IF "$(CCTYPE)" != "GCC"
448 USE_LONG_DOUBLE != undef
451 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
452 .IF "$(ARCHITECTURE)" == "AMD64"
455 .IF "$(ARCHITECTURE)" == "IA64"
459 .IF "$(USE_MULTI)" == "define"
460 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
462 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
465 .IF "$(USE_ITHREADS)" == "define"
466 ARCHNAME !:= $(ARCHNAME)-thread
469 .IF "$(WIN64)" != "define"
470 .IF "$(USE_64_BIT_INT)" == "define"
471 ARCHNAME !:= $(ARCHNAME)-64int
475 .IF "$(USE_LONG_DOUBLE)" == "define"
476 ARCHNAME !:= $(ARCHNAME)-ld
479 # Set the install location of the compiler headers/libraries.
480 # These are saved into $Config{incpath} and $Config{libpth}.
481 .IF "$(GCCCROSS)" == "define"
482 CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include
483 CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib
484 .ELIF "$(CCTYPE)" == "GCC"
485 CCINCDIR *= $(CCHOME)\include
486 CCLIBDIR *= $(CCHOME)\lib
488 CCINCDIR *= $(CCHOME)\include
489 .IF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
490 .IF "$(WIN64)" == "define"
491 CCLIBDIR *= $(CCHOME)\lib\x64
493 CCLIBDIR *= $(CCHOME)\lib\x86
496 .IF "$(WIN64)" == "define"
497 CCLIBDIR *= $(CCHOME)\lib\amd64
499 CCLIBDIR *= $(CCHOME)\lib
504 # Set DLL location for GCC compilers.
505 .IF "$(CCTYPE)" == "GCC"
506 .IF "$(GCCCROSS)" == "define"
507 CCDLLDIR *= $(CCLIBDIR)
509 CCDLLDIR *= $(CCHOME)\bin
513 ARCHDIR = ..\lib\$(ARCHNAME)
514 COREDIR = ..\lib\CORE
515 AUTODIR = ..\lib\auto
523 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
524 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
525 INST_LIB = $(INST_TOP)$(INST_VER)\lib
526 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
527 INST_COREDIR = $(INST_ARCHLIB)\CORE
528 INST_HTML = $(INST_TOP)$(INST_VER)\html
531 # Programs to compile, build .lib files and link
538 .IF "$(CCTYPE)" == "GCC"
540 .IF "$(GCCCROSS)" == "define"
541 ARCHPREFIX = x86_64-w64-mingw32-
544 CC = $(ARCHPREFIX)gcc
545 LINK32 = $(ARCHPREFIX)g++
546 LIB32 = $(ARCHPREFIX)ar rc
547 IMPLIB = $(ARCHPREFIX)dlltool
548 RSC = $(ARCHPREFIX)windres
550 .IF "$(USE_LONG_DOUBLE)" == "define" || "$(USE_MINGW_ANSI_STDIO)" == "define"
551 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
552 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
555 GCCVER1:= $(shell for /f "delims=. tokens=1,2,3" %i in ('gcc -dumpversion') do @echo %i)
556 GCCVER2:= $(shell for /f "delims=. tokens=1,2,3" %i in ('gcc -dumpversion') do @echo %j)
557 GCCVER3:= $(shell for /f "delims=. tokens=1,2,3" %i in ('gcc -dumpversion') do @echo %k)
559 # If you are using GCC, 4.3 or later by default we add the -fwrapv option.
560 # See https://rt.perl.org/Ticket/Display.html?id=121505
562 GCCWRAPV *= $(shell if "$(GCCVER1)"=="4" (if "$(GCCVER2)" geq "3" echo define) else if "$(GCCVER1)" geq "5" (echo define))
564 .IF "$(GCCWRAPV)" == "define"
566 MINIBUILDOPT += -fwrapv
577 INCLUDES = -I.\include -I. -I..
579 .IF "$(WIN64)" == "define"
580 DEFINES += -DWIN64 -DCONSERVATIVE
582 LOCDEFS = -DPERLDLL -DPERL_CORE
585 # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link
586 # correctly if -lmsvcrt is specified explicitly.
591 LIBFILES = $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \
592 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \
593 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
595 .IF "$(CFG)" == "Debug"
596 OPTIMIZE = -g -O2 -DDEBUGGING
598 .ELIF "$(CFG)" == "DebugSymbols"
607 .IF "$(USE_CPLUSPLUS)" == "define"
608 EXTRACFLAGS += $(CXX_FLAG)
610 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
611 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
617 BUILDOPT += -fno-strict-aliasing -mms-bitfields
618 MINIBUILDOPT += -fno-strict-aliasing
620 TESTPREPGCC = test-prep-gcc
624 # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test
625 # suite run in about 10% less time.
626 .IF "$(CCTYPE)" != "MSVC70FREE"
627 # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
628 # which is rare to execute
629 .IF "$(USE_NO_REGISTRY)" != "undef"
630 DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
633 DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
634 #miniperl never does any registry lookups
635 MINIDELAYLOAD = -DELAYLOAD:advapi32.dll
639 # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and
640 # DLLs. These either need copying everywhere with the binaries, or else need
641 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
642 # simplicity, embed them if they exist (and delete them afterwards so that they
643 # don't get installed too).
644 EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
645 if exist $@.manifest del $@.manifest
646 EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
647 if exist $@.manifest del $@.manifest
649 # Most relevant compiler-specific options fall into two groups:
650 # either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
651 .IF "$(CCTYPE)" == "MSVC60" || \
652 "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
658 .IF "$(__ICC)" != "define"
665 LIB32 = $(LINK32) -lib
672 INCLUDES = -I.\include -I. -I..
673 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
674 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
675 LOCDEFS = -DPERLDLL -DPERL_CORE
678 .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
684 .IF "$(CFG)" == "Debug"
685 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
687 .ELIF "$(CFG)" == "DebugSymbols"
688 OPTIMIZE = -Od -MD -Zi
690 .ELIF "$(CFG)" == "DebugFull"
691 .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
696 OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
699 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
700 OPTIMIZE = -O1 -MD -Zi -DNDEBUG
701 # we enable debug symbols in release builds also
702 LINK_DBG = -debug -opt:ref,icf
703 # you may want to enable this if you want COFF symbols in the executables
704 # in addition to the PDB symbols. The default Dr. Watson that ships with
705 # Windows can use the the former but not latter. The free WinDbg can be
706 # installed to get better stack traces from just the PDB symbols, so we
707 # avoid the bloat of COFF symbols by default.
708 #LINK_DBG = $(LINK_DBG) -debugtype:both
709 .IF "$(CCTYPE)" != "MSVC60"
710 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
717 .IF "$(WIN64)" == "define"
718 DEFINES += -DWIN64 -DCONSERVATIVE
719 OPTIMIZE += -fp:precise
722 # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions
723 # and POSIX CRT function names being deprecated.
724 .IF "$(PREMSVC80)" == "undef"
725 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
728 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
729 .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
730 DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS
733 # The Windows Server 2003 SP1 SDK compiler only defines _configthreadlocale() if
734 # _MT is defined, i.e. when using /MT (the LIBCMT.lib version of the CRT), which
735 # the perl build doesn't use. We therefore specify NO_THREAD_SAFE_LOCALE so that
736 # perl.h doesn't set USE_THREAD_SAFE_LOCALE, which it otherwise would do since
737 # _MSC_VER is 1400 for this compiler (as per MSVC80).
738 .IF "$(CCTYPE)" == "SDK2003SP1"
739 DEFINES += -DNO_THREAD_SAFE_LOCALE
742 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
743 # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
744 # preprocessor option to revert back to the old functionality for
745 # backward compatibility. We define this symbol here for older 32-bit
746 # compilers only (which aren't using it at all) for the sole purpose
747 # of getting it into $Config{ccflags}. That way if someone builds
748 # Perl itself with e.g. VC6 but later installs an XS module using VC8
749 # the time_t types will still be compatible.
750 .IF "$(WIN64)" == "undef"
751 .IF "$(PREMSVC80)" == "define"
752 BUILDOPT += -D_USE_32BIT_TIME_T
756 LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
757 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
758 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
759 odbc32.lib odbccp32.lib comctl32.lib
761 .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
762 .IF "$(CFG)" == "DebugFull"
763 LIBBASEFILES += msvcrtd.lib vcruntimed.lib
765 LIBBASEFILES += msvcrt.lib vcruntime.lib
769 # Avoid __intel_new_proc_init link error for libircmt.
770 # libmmd is /MD equivelent, other variants exist.
771 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
772 # and optimized C89 funcs
773 .IF "$(__ICC)" == "define"
774 LIBBASEFILES += libircmt.lib libmmd.lib
777 # The Windows Server 2003 SP1 SDK compiler links against MSVCRT.dll, which
778 # doesn't include the buffer overrun verification code used by the /GS switch.
779 # Since the code links against libraries that are compiled with /GS, this
780 # "security cookie verification" code must be included via bufferoverflow.lib.
781 .IF "$(CCTYPE)" == "SDK2003SP1"
782 LIBBASEFILES += bufferoverflowU.lib
785 LIBFILES = $(LIBBASEFILES) $(LIBC)
787 EXTRACFLAGS = -nologo -GF -W3
788 .IF "$(__ICC)" == "define"
789 EXTRACFLAGS += -Qstd=c99
791 .IF "$(USE_CPLUSPLUS)" == "define"
792 EXTRACFLAGS += $(CXX_FLAG)
794 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
795 $(PCHFLAGS) $(OPTIMIZE)
796 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
797 -libpath:"$(INST_COREDIR)" \
798 -machine:$(PROCESSOR_ARCHITECTURE)
808 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
810 .IF "$(PREMSVC80)" == "undef"
811 PRIV_LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
813 RSC_FLAGS = -DINCLUDE_MANIFEST
816 # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
818 # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
819 # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
820 # Console vs GUI makes no difference for DLLs, so use default for cleaner
822 .IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
823 .IF "$(WIN64)" == "define"
824 LINK_FLAGS += -subsystem:console,"5.02"
826 LINK_FLAGS += -subsystem:console,"5.01"
829 .ELIF "$(CCTYPE)" != "GCC"
830 PRIV_LINK_FLAGS += -subsystem:console
833 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
835 #################### do not edit below this line #######################
836 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
838 # Some old dmakes (including Sarathy's one at
839 # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
840 # don't support logical OR (||) or logical AND (&&) in conditional
841 # expressions and hence don't process this makefile correctly. Determine
842 # whether this is the case so that we can give the user an error message.
859 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
862 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) $<
865 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
871 .IF "$(CCTYPE)" == "GCC"
872 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
873 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
875 $(LINK32) -dll -implib:$(*B).lib -def:$(*B).def \
876 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
881 .IF "$(CCTYPE)" == "GCC"
882 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
884 $(RSC) -i.. -DINCLUDE_MANIFEST $<
890 #do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL)
891 #$(MINIPERL) is not a buildable target, use "dmake mp" if you want to just build
893 MINIPERL = ..\miniperl.exe
894 HAVEMINIPERL = ..\lib\buildcustomize.pl
896 PERLEXE = ..\perl.exe
897 WPERLEXE = ..\wperl.exe
898 PERLEXESTATIC = ..\perl-static.exe
899 STATICDIR = .\static.tmp
900 GLOBEXE = ..\perlglob.exe
901 CONFIGPM = ..\lib\Config.pm
902 GENUUDMAP = ..\generate_uudmap.exe
903 .IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define"
909 # Unicode data files generated by mktables
910 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
911 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
912 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
913 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
915 # Directories of Unicode data files generated by mktables
916 UNIDATADIR1 = ..\lib\unicore\To
917 UNIDATADIR2 = ..\lib\unicore\lib
919 PERLEXE_MANIFEST= .\perlexe.manifest
920 PERLEXE_ICO = .\perlexe.ico
921 PERLEXE_RES = .\perlexe.res
924 # Nominate a target which causes extensions to be re-built
925 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
926 # on and really only the interface - i.e. the .def file used to export symbols
928 PERLDEP = $(PERLIMPLIB)
931 PL2BAT = bin\pl2bat.pl
953 ..\utils\zipdetails \
963 .IF "$(CCTYPE)" == "GCC"
965 CFGSH_TMPL = config.gc
966 CFGH_TMPL = config_H.gc
967 PERLIMPLIB = $(COREDIR)\libperl531$(a)
968 PERLSTATICLIB = ..\libperl531s$(a)
973 CFGSH_TMPL = config.vc
974 CFGH_TMPL = config_H.vc
979 # makedef.pl must be updated if this changes, and this should normally
980 # only change when there is an incompatible revision of the public API.
981 PERLIMPLIB *= $(COREDIR)\perl531$(a)
982 PERLEXPLIB *= $(COREDIR)\perl531.exp
983 PERLSTATICLIB *= ..\perl531s$(a)
984 PERLDLL = ..\perl531.dll
985 PERLDLLBASE = perl531.dll
987 #EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel
988 #$(MAKE) will contain the -P that this makefile was called with, which is bad for
989 #make_ext.pl since upto jobs*jobs processes will run instead of jobs
990 #also any recipie containing $(MAKE) is special cased by dmake to execute recipes
991 #containing $(MAKE) when "dmake -n" is executed, which causes recursive calls
992 #to dmake, which means "dmake -n" is then broken as a diagnostic tool since
993 #"dmake -n" will invoke all the make_ext.pl scripts build things instead of
994 #showing what to build since $(MAKE) is an arg to make_ext.pl, not an invocation
995 #of the dmake process
998 XCOPY = xcopy /f /r /i /d /y
999 RCOPY = xcopy /f /r /i /e /d /y
1002 #first ones are arrange in compile time order for faster parallel building
1003 #see #123867 for details
1045 EXTRACORE_SRC += perllib.c
1047 .IF "$(PERL_MALLOC)" == "define"
1048 EXTRACORE_SRC += ..\malloc.c
1051 EXTRACORE_SRC += ..\perlio.c
1095 .\include\dirent.h \
1097 .\include\sys\errno2.h \
1098 .\include\sys\socket.h \
1101 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
1103 UUDMAP_H = ..\uudmap.h
1104 BITCOUNT_H = ..\bitcount.h
1105 MG_DATA_H = ..\mg_data.h
1106 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
1108 HAVE_COREDIR = .\.coreheaders
1110 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
1111 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
1112 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
1113 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
1114 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
1115 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
1116 DLL_OBJ = $(DYNALOADER)
1118 PERLDLL_OBJ = $(CORE_OBJ)
1119 PERLEXE_OBJ = perlmain$(o)
1120 PERLEXEST_OBJ = perlmainst$(o)
1122 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
1124 .IF "$(USE_SETARGV)" != ""
1125 SETARGV_OBJ = setargv$(o)
1128 .IF "$(ALL_STATIC)" == "define"
1129 # some exclusions, unfortunately, until fixed:
1130 # - MakeMaker isn't capable enough for SDBM_File (small bug)
1131 STATIC_EXT = * !SDBM_File
1132 NORMALIZE_STATIC = Normalize_static
1134 # specify static extensions here, for example:
1135 # (be sure to include Win32CORE to load Win32 on demand)
1136 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
1137 STATIC_EXT = Win32CORE
1138 NORMALIZE_DYN = Normalize_dyn
1141 DYNALOADER = ..\DynaLoader$(o)
1143 # vars must be separated by "\t+~\t+", since we're using the tempfile
1144 # version of config_sh.pl (we were overflowing someone's buffer by
1145 # trying to fit them all on the command line)
1148 INST_TOP=$(INST_TOP) ~ \
1149 INST_VER=$(INST_VER) ~ \
1150 INST_ARCH=$(INST_ARCH) ~ \
1151 archname=$(ARCHNAME) ~ \
1154 ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
1155 usecplusplus=$(USE_CPLUSPLUS) ~ \
1156 cf_email=$(EMAIL) ~ \
1157 d_mymalloc=$(PERL_MALLOC) ~ \
1158 libs=$(LIBFILES:f) ~ \
1159 incpath=$(CCINCDIR) ~ \
1160 libperl=$(PERLIMPLIB:f) ~ \
1161 libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
1168 static_ext=$(STATIC_EXT) ~ \
1169 usethreads=$(USE_ITHREADS) ~ \
1170 useithreads=$(USE_ITHREADS) ~ \
1171 usemultiplicity=$(USE_MULTI) ~ \
1172 use64bitint=$(USE_64_BIT_INT) ~ \
1173 uselongdouble=$(USE_LONG_DOUBLE) ~ \
1174 uselargefiles=$(USE_LARGE_FILES) ~ \
1175 usesitecustomize=$(USE_SITECUST) ~ \
1176 default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT) ~ \
1177 LINK_FLAGS=$(LINK_FLAGS) ~ \
1178 optimize=$(OPTIMIZE) ~ \
1179 ARCHPREFIX=$(ARCHPREFIX) ~ \
1186 all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC)
1189 .IF "$(CCTYPE)" == "GCC"
1190 @echo # CCTYPE=$(CCTYPE)&& \
1192 echo # GCCVER=$(GCCVER1).$(GCCVER2).$(GCCVER3)&& \
1193 echo # GCCTARGET=$(GCCTARGET)&& \
1194 echo # GCCCROSS=$(GCCCROSS)&& \
1195 echo # WIN64=$(WIN64)&& \
1196 echo # ARCHITECTURE=$(ARCHITECTURE)&& \
1197 echo # ARCHNAME=$(ARCHNAME)&& \
1198 echo # MAKE=$(PLMAKE)
1200 @echo # CCTYPE=$(CCTYPE)&& \
1201 echo # WIN64=$(WIN64)&& \
1202 echo # ARCHITECTURE=$(ARCHITECTURE)&& \
1203 echo # ARCHNAME=$(ARCHNAME)&& \
1204 echo # MAKE=$(PLMAKE)
1206 .IF "$(CCTYPE)" == ""
1207 @echo Unable to detect gcc and/or architecture!
1212 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
1214 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
1216 reonly : ..\regnodes.h $(UNIDATAFILES) Extensions_reonly
1218 static: $(PERLEXESTATIC)
1220 #----------------------------------------------------------------
1223 .IF "$(NEWDMAKE)" == "define"
1226 @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions.
1227 @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/
1231 $(GLOBEXE) : perlglob.c
1232 .IF "$(CCTYPE)" == "GCC"
1233 $(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
1235 $(CC) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \
1236 setargv$(o) $(LIBFILES) && $(EMBED_EXE_MANI)
1239 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
1240 $(MINIPERL) -I..\lib ..\make_patchnum.pl
1242 # make sure that we recompile perl.c if the git version changes
1243 ..\perl$(o) : ..\git_version.h
1245 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL)
1246 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
1247 $(mktmp $(CFG_VARS)) $(CFGSH_TMPL) > ..\config.sh
1249 # This target is for when changes to the main config.sh happen.
1250 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1251 # with MULTI, ITHREADS, IMP_SYS and LARGE_FILES off), then make
1252 # this target to regenerate config_H.gc.
1254 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
1255 $(CFGSH_TMPL) > ..\config.sh
1256 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1257 -del /f $(CFGH_TMPL)
1258 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1259 rename config.h $(CFGH_TMPL)
1261 $(CONFIGPM) .\config.h .UPDATEALL: ..\config.sh config_h.PL
1262 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1263 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1265 # See the comment in Makefile.SH explaining this seemingly cranky ordering
1266 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
1267 .IF "$(CCTYPE)" == "GCC"
1268 $(LINK32) -v -mconsole -o $(MINIPERL) $(BLINK_FLAGS) \
1269 $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
1271 $(LINK32) -out:$(MINIPERL) $(BLINK_FLAGS) \
1272 @$(mktmp $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ))
1273 $(EMBED_EXE_MANI:s/$@/$(MINIPERL)/)
1275 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1277 #convinence target, get a working miniperl
1280 $(MINIDIR)\.exists : $(CFGH_TMPL)
1281 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1283 # Copy the template config.h and set configurables at the end of it
1284 # as per the options chosen and compiler used.
1285 # Note: This config.h is only used to build miniperl.exe anyway, but
1286 # it's as well to have its options correct to be sure that it builds
1287 # and so that it's "-V" options are correct for use by makedef.pl. The
1288 # real config.h used to build perl.exe is generated from the top-level
1289 # config_h.SH by config_h.PL (run by miniperl.exe).
1291 # MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd
1292 # config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ).
1293 copy $(CFGH_TMPL) config.h
1295 echo #ifndef _config_h_footer_&& \
1296 echo #define _config_h_footer_&& \
1297 echo #undef Off_t&& \
1298 echo #undef LSEEKSIZE&& \
1299 echo #undef Off_t_size&& \
1300 echo #undef PTRSIZE&& \
1301 echo #undef SSize_t&& \
1302 echo #undef HAS_ATOLL&& \
1303 echo #undef HAS_STRTOLL&& \
1304 echo #undef HAS_STRTOULL&& \
1305 echo #undef Size_t_size&& \
1306 echo #undef IVTYPE&& \
1307 echo #undef UVTYPE&& \
1308 echo #undef IVSIZE&& \
1309 echo #undef UVSIZE&& \
1310 echo #undef NV_PRESERVES_UV&& \
1311 echo #undef NV_PRESERVES_UV_BITS&& \
1312 echo #undef IVdf&& \
1313 echo #undef UVuf&& \
1314 echo #undef UVof&& \
1315 echo #undef UVxf&& \
1316 echo #undef UVXf&& \
1317 echo #undef USE_64_BIT_INT&& \
1318 echo #undef Gconvert&& \
1319 echo #undef HAS_FREXPL&& \
1320 echo #undef HAS_ISNANL&& \
1321 echo #undef HAS_MODFL&& \
1322 echo #undef HAS_MODFL_PROTO&& \
1323 echo #undef HAS_SQRTL&& \
1324 echo #undef HAS_STRTOLD&& \
1325 echo #undef PERL_PRIfldbl&& \
1326 echo #undef PERL_PRIgldbl&& \
1327 echo #undef PERL_PRIeldbl&& \
1328 echo #undef PERL_SCNfldbl&& \
1329 echo #undef NVTYPE&& \
1330 echo #undef NVSIZE&& \
1331 echo #undef LONG_DOUBLESIZE&& \
1332 echo #undef NV_OVERFLOWS_INTEGERS_AT&& \
1333 echo #undef NVef&& \
1334 echo #undef NVff&& \
1335 echo #undef NVgf&& \
1336 echo #undef USE_LONG_DOUBLE&& \
1337 echo #undef USE_CPLUSPLUS)>> config.h
1338 .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
1339 @(echo #undef FILE_ptr&& \
1340 echo #undef FILE_cnt&& \
1341 echo #undef FILE_base&& \
1342 echo #undef FILE_bufsiz&& \
1343 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1344 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1345 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1346 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1347 echo #define I_STDBOOL)>> config.h
1349 .IF "$(USE_LARGE_FILES)"=="define"
1350 @(echo #define Off_t $(INT64)&& \
1351 echo #define LSEEKSIZE ^8&& \
1352 echo #define Off_t_size ^8)>> config.h
1354 @(echo #define Off_t long&& \
1355 echo #define LSEEKSIZE ^4&& \
1356 echo #define Off_t_size ^4)>> config.h
1358 .IF "$(WIN64)"=="define"
1359 .IF "$(CCTYPE)" == "GCC"
1360 @(echo #define LONG_DOUBLESIZE ^16)>> config.h
1362 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1364 @(echo #define PTRSIZE ^8&& \
1365 echo #define SSize_t $(INT64)&& \
1366 echo #define HAS_ATOLL&& \
1367 echo #define HAS_STRTOLL&& \
1368 echo #define HAS_STRTOULL&& \
1369 echo #define Size_t_size ^8)>> config.h
1371 .IF "$(CCTYPE)" == "GCC"
1372 @(echo #define LONG_DOUBLESIZE ^12)>> config.h
1374 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1376 @(echo #define PTRSIZE ^4&& \
1377 echo #define SSize_t int&& \
1378 echo #undef HAS_ATOLL&& \
1379 echo #undef HAS_STRTOLL&& \
1380 echo #undef HAS_STRTOULL&& \
1381 echo #define Size_t_size ^4)>> config.h
1383 .IF "$(USE_64_BIT_INT)"=="define"
1384 @(echo #define IVTYPE $(INT64)&& \
1385 echo #define UVTYPE unsigned $(INT64)&& \
1386 echo #define IVSIZE ^8&& \
1387 echo #define UVSIZE ^8)>> config.h
1388 .IF "$(USE_LONG_DOUBLE)"=="define"
1389 @(echo #define NV_PRESERVES_UV&& \
1390 echo #define NV_PRESERVES_UV_BITS 64)>> config.h
1392 @(echo #undef NV_PRESERVES_UV&& \
1393 echo #define NV_PRESERVES_UV_BITS 53)>> config.h
1395 @(echo #define IVdf "I64d"&& \
1396 echo #define UVuf "I64u"&& \
1397 echo #define UVof "I64o"&& \
1398 echo #define UVxf "I64x"&& \
1399 echo #define UVXf "I64X"&& \
1400 echo #define USE_64_BIT_INT)>> config.h
1402 @(echo #define IVTYPE long&& \
1403 echo #define UVTYPE unsigned long&& \
1404 echo #define IVSIZE ^4&& \
1405 echo #define UVSIZE ^4&& \
1406 echo #define NV_PRESERVES_UV&& \
1407 echo #define NV_PRESERVES_UV_BITS 32&& \
1408 echo #define IVdf "ld"&& \
1409 echo #define UVuf "lu"&& \
1410 echo #define UVof "lo"&& \
1411 echo #define UVxf "lx"&& \
1412 echo #define UVXf "lX"&& \
1413 echo #undef USE_64_BIT_INT)>> config.h
1415 .IF "$(USE_LONG_DOUBLE)"=="define"
1416 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%.*""Lg",^(n^),^(x^)^)&& \
1417 echo #define HAS_FREXPL&& \
1418 echo #define HAS_ISNANL&& \
1419 echo #define HAS_MODFL&& \
1420 echo #define HAS_MODFL_PROTO&& \
1421 echo #define HAS_SQRTL&& \
1422 echo #define HAS_STRTOLD&& \
1423 echo #define PERL_PRIfldbl "Lf"&& \
1424 echo #define PERL_PRIgldbl "Lg"&& \
1425 echo #define PERL_PRIeldbl "Le"&& \
1426 echo #define PERL_SCNfldbl "Lf"&& \
1427 echo #define NVTYPE long double&& \
1428 echo #define NVSIZE LONG_DOUBLESIZE&& \
1429 echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0&& \
1430 echo #define NVef "Le"&& \
1431 echo #define NVff "Lf"&& \
1432 echo #define NVgf "Lg"&& \
1433 echo #define USE_LONG_DOUBLE)>> config.h
1435 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%.*g",^(n^),^(x^)^)&& \
1436 echo #undef HAS_FREXPL&& \
1437 echo #undef HAS_ISNANL&& \
1438 echo #undef HAS_MODFL&& \
1439 echo #undef HAS_MODFL_PROTO&& \
1440 echo #undef HAS_SQRTL&& \
1441 echo #undef HAS_STRTOLD&& \
1442 echo #undef PERL_PRIfldbl&& \
1443 echo #undef PERL_PRIgldbl&& \
1444 echo #undef PERL_PRIeldbl&& \
1445 echo #undef PERL_SCNfldbl&& \
1446 echo #define NVTYPE double&& \
1447 echo #define NVSIZE ^8&& \
1448 echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0&& \
1449 echo #define NVef "e"&& \
1450 echo #define NVff "f"&& \
1451 echo #define NVgf "g"&& \
1452 echo #undef USE_LONG_DOUBLE)>> config.h
1454 .IF "$(USE_CPLUSPLUS)"=="define"
1455 @(echo #define USE_CPLUSPLUS&& \
1456 echo #endif)>> config.h
1458 @(echo #undef USE_CPLUSPLUS&& \
1459 echo #endif)>> config.h
1461 #separate line since this is sentinal that this target is done
1462 @rem. > $(MINIDIR)\.exists
1464 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1465 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*B).c
1467 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1468 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*B).c
1470 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1471 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1472 # unless the .IF is true), so instead we use a .ELSE with the default.
1473 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1475 perllib$(o) : perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h
1476 .IF "$(USE_IMP_SYS)" == "define"
1477 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1479 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1482 # 1. we don't want to rebuild miniperl.exe when config.h changes
1483 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1484 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1485 $(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H)
1487 $(WIN32_OBJ) : $(CORE_H)
1489 $(CORE_OBJ) : $(CORE_H)
1491 $(DLL_OBJ) : $(CORE_H)
1494 perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl
1495 $(MINIPERL) -I..\lib create_perllibst_h.pl
1497 perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
1498 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1499 $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1501 $(PERLEXPLIB) $(PERLIMPLIB) .UPDATEALL : perldll.def
1502 .IF "$(CCTYPE)" == "GCC"
1503 $(IMPLIB) -k -d perldll.def -D $(PERLDLLBASE) -l $(PERLIMPLIB) -e $(PERLEXPLIB)
1505 lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
1508 $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1509 .IF "$(CCTYPE)" == "GCC"
1510 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1511 $(PERLDLL_OBJ) $(shell @type Extensions_static) $(LIBFILES) $(PERLEXPLIB)
1513 $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \
1514 @Extensions_static \
1515 @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
1516 $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB))
1520 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1521 .IF "$(CCTYPE)" == "GCC"
1522 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1523 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1524 for %i in ($(shell @type Extensions_static)) do \
1525 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1526 $(ARCHPREFIX)ar x ..\%i && \
1527 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1528 cd .. && rmdir /s /q $(STATICDIR)
1530 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1531 @$(mktmp $(PERLDLL_OBJ))
1533 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)\$(NULL)
1535 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1537 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1539 $(GENUUDMAP) $(GENERATED_HEADERS) .UPDATEALL : ..\mg_raw.h
1540 .IF "$(CCTYPE)" == "GCC"
1541 $(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
1542 $(BLINK_FLAGS) -x $(mktmp $(LKPRE) $(LIBFILES) $(LKPOST))
1544 $(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c @$(mktmp -link $(LIBFILES)) -link $(BLINK_FLAGS)
1545 $(EMBED_EXE_MANI:s/$@/..\generate_uudmap.exe/)
1547 $(GENUUDMAP) $(GENERATED_HEADERS)
1549 MakePPPort : $(HAVEMINIPERL) $(CONFIGPM)
1550 $(MINIPERL) -I..\lib ..\mkppport
1552 # also known as $(HAVE_COREDIR)
1553 .\.coreheaders : $(CORE_H)
1554 $(XCOPY) *.h $(COREDIR)\*.* && $(RCOPY) include $(COREDIR)\*.* && $(XCOPY) ..\*.h $(COREDIR)\*.*
1557 perlmain$(o) : runperl.c $(CONFIGPM)
1558 $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1560 perlmainst$(o) : runperl.c $(CONFIGPM)
1561 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1563 $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
1564 .IF "$(CCTYPE)" == "GCC"
1565 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1566 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1568 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1569 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1572 copy $(PERLEXE) $(WPERLEXE)
1573 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1575 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1576 .IF "$(CCTYPE)" == "GCC"
1577 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1578 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1580 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1581 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1585 #-------------------------------------------------------------------------------
1586 # There's no direct way to mark a dependency on
1587 # DynaLoader.pm, so this will have to do
1589 #most of deps of this target are in DYNALOADER and therefore omitted here
1590 Extensions : $(PERLDEP) $(DYNALOADER) Extension_lib $(GLOBEXE) MakePPPort
1591 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
1593 Normalize_static : $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) $(UNIDATAFILES)
1594 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static +Unicode/Normalize
1596 Normalize_dyn : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
1597 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
1599 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
1600 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1602 Exts_static_general : ..\make_ext.pl $(CONFIGPM) Extension_lib $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
1603 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static !Unicode/Normalize
1605 Extensions_static : list_static_libs.pl Exts_static_general $(NORMALIZE_STATIC)
1606 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1608 Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
1609 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
1611 Extension_lib : ..\make_ext.pl $(CONFIGPM)
1612 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) lib
1614 #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
1615 $(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
1616 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader
1619 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1621 Extensions_realclean :
1622 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1624 # all PE files need to be built by the time this target runs, PP files can still
1625 # be running in parallel like UNIDATAFILES, this target a placeholder for the
1627 .IF "$(PERLSTATIC)"=="static"
1628 rebasePE : Extensions $(PERLDLL) $(PERLEXE) $(PERLEXESTATIC)
1630 rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
1634 #-------------------------------------------------------------------------------
1637 doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod
1638 $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1639 --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1642 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1643 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1645 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1646 # so please check that script before making structural changes here
1647 utils: $(HAVEMINIPERL) ..\utils\Makefile
1648 cd ..\utils && $(PLMAKE) PERL=$(MINIPERL)
1649 copy ..\README.aix ..\pod\perlaix.pod
1650 copy ..\README.amiga ..\pod\perlamiga.pod
1651 copy ..\README.android ..\pod\perlandroid.pod
1652 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1653 copy ..\README.cn ..\pod\perlcn.pod
1654 copy ..\README.cygwin ..\pod\perlcygwin.pod
1655 copy ..\README.dos ..\pod\perldos.pod
1656 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1657 copy ..\README.haiku ..\pod\perlhaiku.pod
1658 copy ..\README.hpux ..\pod\perlhpux.pod
1659 copy ..\README.hurd ..\pod\perlhurd.pod
1660 copy ..\README.irix ..\pod\perlirix.pod
1661 copy ..\README.jp ..\pod\perljp.pod
1662 copy ..\README.ko ..\pod\perlko.pod
1663 copy ..\README.linux ..\pod\perllinux.pod
1664 copy ..\README.macos ..\pod\perlmacos.pod
1665 copy ..\README.macosx ..\pod\perlmacosx.pod
1666 copy ..\README.netware ..\pod\perlnetware.pod
1667 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1668 copy ..\README.os2 ..\pod\perlos2.pod
1669 copy ..\README.os390 ..\pod\perlos390.pod
1670 copy ..\README.os400 ..\pod\perlos400.pod
1671 copy ..\README.plan9 ..\pod\perlplan9.pod
1672 copy ..\README.qnx ..\pod\perlqnx.pod
1673 copy ..\README.riscos ..\pod\perlriscos.pod
1674 copy ..\README.solaris ..\pod\perlsolaris.pod
1675 copy ..\README.symbian ..\pod\perlsymbian.pod
1676 copy ..\README.synology ..\pod\perlsynology.pod
1677 copy ..\README.tru64 ..\pod\perltru64.pod
1678 copy ..\README.tw ..\pod\perltw.pod
1679 copy ..\README.vos ..\pod\perlvos.pod
1680 copy ..\README.win32 ..\pod\perlwin32.pod
1681 copy ..\pod\perldelta.pod ..\pod\perl5314delta.pod
1682 $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
1683 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1684 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1686 ..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs $(NORMALIZE_DYN) utils
1687 $(PERLEXE) -f ..\pod\buildtoc -q
1689 # Note that the pod cleanup in this next section is parsed (and regenerated
1690 # by pod/buildtoc so please check that script before making changes here
1692 distclean: realclean
1693 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1694 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1695 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1696 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1697 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1698 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1699 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1700 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1701 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1702 -del /f $(LIBDIR)\File\Glob.pm
1703 -del /f $(LIBDIR)\Sys\Hostname.pm
1704 -del /f $(LIBDIR)\Time\HiRes.pm
1705 -del /f $(LIBDIR)\Unicode\Normalize.pm
1706 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1707 -del /f $(LIBDIR)\Storable.pm
1708 -del /f $(LIBDIR)\Win32.pm
1709 -del /f $(LIBDIR)\Win32CORE.pm
1710 -del /f $(LIBDIR)\Win32API\File.pm
1711 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1712 -del /f $(LIBDIR)\buildcustomize.pl
1713 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1715 -if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga
1716 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1717 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1718 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1719 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1720 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1721 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1722 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1723 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1724 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1725 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1726 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1727 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1728 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1729 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1730 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1731 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1732 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1733 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1734 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1735 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1736 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1737 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1738 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1739 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1740 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1741 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1742 -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1743 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1744 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1745 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1746 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1747 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1748 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1749 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1750 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1751 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1752 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1753 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1754 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1755 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1756 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1757 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1758 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1759 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1760 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1761 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1762 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1763 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1764 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1765 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1766 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1767 -if exist $(LIBDIR)\Test2 rmdir /s /q $(LIBDIR)\Test2
1768 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1769 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1770 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1771 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1772 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1773 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1774 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1775 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1776 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1777 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1778 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1779 perl5314delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1780 perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
1781 perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1782 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1783 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1784 perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1785 perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1786 perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
1787 perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
1789 -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \
1790 perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
1791 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1792 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1795 -del /f ..\lib\Config_git.pl
1798 -del /f $(PERLEXE_RES) perl.base
1799 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1800 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1801 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1802 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1803 -del /s ..\utils\Makefile
1804 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1805 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1806 -if exist pod2htmd.tmp del pod2htmd.tmp
1807 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1808 -del /f ..\t\test_state
1810 install : all installbare installhtml
1812 installbare : utils ..\pod\perltoc.pod
1813 $(PERLEXE) ..\installperl
1814 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1815 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1816 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1817 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1818 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1821 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1823 inst_lib : $(CONFIGPM)
1824 $(RCOPY) ..\lib $(INST_LIB)\*.*
1826 $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : ..\lib\unicore\mktables $(CONFIGPM)
1827 $(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
1829 minitest : .\config.h $(HAVEMINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) $(TESTPREPGCC)
1830 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1831 if exist ..\t\perl.exe del /f ..\t\perl.exe
1832 rename ..\t\miniperl.exe perl.exe
1833 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1834 # Note this perl.exe is miniperl
1835 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
1837 test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC)
1838 $(XCOPY) $(PERLEXE) ..\t\$(NULL) && $(XCOPY) $(PERLDLL) ..\t\$(NULL) \
1839 && $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1841 # If building with gcc versions 4.x.x or greater, then
1842 # the GCC helper DLL will also need copied to the test directory.
1843 # The name of the dll can change, depending upon which vendor has supplied
1844 # your compiler, and upon the values of "x".
1845 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1846 # Without this copying, the op/taint.t test script will fail.
1848 .IF "$(CCTYPE)" == "GCC"
1851 if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
1852 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1853 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1854 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1855 if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
1860 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1861 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1863 test_porting : test-prep
1864 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1865 cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1867 test-reonly : reonly utils
1868 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1869 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1870 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1871 cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA)
1876 test-notty : test-prep
1877 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1878 set PERL_SKIP_TTY_TEST=1 && \
1879 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1882 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1883 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1884 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1885 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1886 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1889 -@erase miniperlmain$(o)
1891 -@erase perlglob$(o)
1892 -@erase perlmain$(o)
1893 -@erase perlmainst$(o)
1895 -@erase /f ..\git_version.h
1899 -@erase $(PERLEXESTATIC)
1900 -@erase $(PERLSTATICLIB)
1903 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1904 -@erase .coreheaders
1905 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1906 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1907 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1908 -@erase $(UNIDATAFILES)
1909 -@erase $(WIN32_OBJ)
1911 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1912 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1914 -@erase *.pdb ..\*.pdb
1915 -@erase Extensions_static
1917 clean : Extensions_clean _clean
1919 realclean : Extensions_realclean _clean
1921 # Handy way to run perlbug -ok without having to install and run the
1922 # installed perlbug. We don't re-run the tests here - we trust the user.
1923 # Please *don't* use this unless all tests pass.
1924 # If you want to report test failures, use "dmake nok" instead.
1925 ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1926 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
1928 okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1929 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1931 nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1932 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
1934 nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1935 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok