2 # Makefile to build perl on Windows using GMAKE.
4 # Microsoft Visual C++ 7.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 # (perl533.dll). Also makes individual DLLs for the XS extensions.
12 # The easiest way to customize the build process is to use parameters like this:
14 # c:\dev\perlsrc\win32> gmake INST_TOP=c:\sw\perl CCHOME=c:\sw\mingw USE_64_BIT_INT=define
18 ## Make sure you read README.win32 *before* you mess with anything here!
22 # We set this to point to cmd.exe in case GNU Make finds sh.exe in the path.
23 # Comment this line out if necessary
27 # define whether you want to use native gcc compiler or cross-compiler
28 # possible values: gcc
29 # i686-w64-mingw32-gcc
30 # x86_64-w64-mingw32-gcc
33 ifeq ($(GCCBIN),x86_64-w64-mingw32-gcc)
34 GCCCROSS := x86_64-w64-mingw32
36 ifeq ($(GCCBIN),i686-w64-mingw32-gcc)
37 GCCCROSS := i686-w64-mingw32
42 ## Build configuration. Edit the values below to suit your needs.
46 # Set these to wherever you want "gmake install" to put your
50 INST_TOP := $(INST_DRV)\perl
53 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
54 # on a 64-bit version of Windows.
59 # Comment this out if you DON'T want your perl installation to be versioned.
60 # This means that the new installation will overwrite any files from the
61 # old installation at the same INST_TOP location. Leaving it enabled is
62 # the safest route, as perl adds the extra version directory to all the
63 # locations it installs files to. If you disable it, an alternative
64 # versioned installation can be obtained by setting INST_TOP above to a
65 # path that includes an arbitrary version string.
70 # Comment this out if you DON'T want your perl installation to have
71 # architecture specific components. This means that architecture-
72 # specific files will be installed along with the architecture-neutral
73 # files. Leaving it enabled is safer and more flexible, in case you
74 # want to build multiple flavors of perl and install them together in
75 # the same location. Commenting it out gives you a simpler
76 # installation that is easier to understand for beginners.
78 #INST_ARCH := \$(ARCHNAME)
81 # Uncomment this if you want perl to run
82 # $Config{sitelibexp}\sitecustomize.pl
83 # before anything else. This script can then be set up, for example,
84 # to add additional entries to @INC.
86 #USE_SITECUST := define
89 # uncomment to enable multiple interpreters. This is needed for fork()
90 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
91 # and USE_ITHREADS below.
96 # Interpreter cloning/threads; now reasonably complete.
97 # This should be enabled to get the fork() emulation. This needs (and
98 # will auto-enable) USE_MULTI above.
100 USE_ITHREADS := define
103 # uncomment to enable the implicit "host" layer for all system calls
104 # made by perl. This is also needed to get fork(). This needs (and
105 # will auto-enable) USE_MULTI above.
107 USE_IMP_SYS := define
110 # Comment out next assign to disable perl's I/O subsystem and use compiler's
111 # stdio for IO - depending on your compiler vendor and run time library you may
112 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
113 # You will also be unable to take full advantage of perl5.8's support for multiple
114 # encodings and may see lower IO performance. You have been warned.
119 # Comment this out if you don't want to enable large file support for
120 # some reason. Should normally only be changed to maintain compatibility
121 # with an older release of perl.
123 USE_LARGE_FILES := define
126 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
127 # (If you're building a 64-bit perl then you will have 64-bit integers whether
128 # or not this is uncommented.)
130 #USE_64_BIT_INT := define
133 # Uncomment this if you want to support the use of long doubles in GCC builds.
134 # This option is not supported for MSVC builds.
136 #USE_LONG_DOUBLE := define
139 # Uncomment this if you want to build perl with __USE_MINGW_ANSI_STDIO defined.
140 # (If you're building perl with USE_LONG_DOUBLE defined then
141 # __USE_MINGW_ANSI_STDIO will be defined whether or not this is uncommented.)
142 # This option is not supported for MSVC builds.
144 #USE_MINGW_ANSI_STDIO := define
147 # Comment this out if you want the legacy default behavior of including '.' at
150 DEFAULT_INC_EXCLUDES_DOT := define
153 # Uncomment this if you want to disable looking up values from
154 # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
157 #USE_NO_REGISTRY := define
160 # uncomment exactly one of the following
162 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
164 # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
165 #CCTYPE := MSVC70FREE
166 # Windows Server 2003 SP1 Platform SDK (April 2005) (64-bit compiler and tools)
167 #CCTYPE := SDK2003SP1
168 # Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition)
170 # Visual C++ 2008 (aka Visual C++ 9.0) (full version or Express Edition)
172 # Visual C++ 2010 (aka Visual C++ 10.0) (full version or Express Edition)
174 # Visual C++ 2012 (aka Visual C++ 11.0) (full version or Express Edition)
176 # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
178 # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
180 # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition)
182 # Visual C++ 2019 (aka Visual C++ 14.2) (full version or Community Edition)
184 # MinGW or mingw-w64 with gcc-3.4.5 or later
188 # If you are using Intel C++ Compiler uncomment this
193 # Uncomment this if you want to build everything in C++ mode
195 #USE_CPLUSPLUS := define
198 # uncomment next line if you want debug version of perl (big/slow)
199 # If not enabled, we automatically try to use maximum optimization
200 # with all compilers that are known to have a working optimizer.
205 # uncomment to enable linking with setargv.obj under the Visual C
206 # compiler. Setting this options enables perl to expand wildcards in
207 # arguments, but it may be harder to use alternate methods like
208 # File::DosGlob that are more powerful. This option is supported only with
211 #USE_SETARGV := define
214 # set this if you wish to use perl's malloc
215 # WARNING: Turning this on/off WILL break binary compatibility with extensions
216 # you may have compiled with/without it. Be prepared to recompile all
217 # extensions if you change the default. Currently, this cannot be enabled
218 # if you ask for USE_IMP_SYS above.
220 #PERL_MALLOC := define
223 # set this to enable debugging mstats
224 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
225 # be enabled without PERL_MALLOC as well.
227 #DEBUG_MSTATS := define
230 # set this to additionally provide a statically linked perl-static.exe.
231 # Note that dynamic loading will not work with this perl, so you must
232 # include required modules statically using the STATIC_EXT or ALL_STATIC
233 # variables below. A static library perl533s.lib will also be created.
234 # Ordinary perl.exe is not affected by this option.
236 #BUILD_STATIC := define
239 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
240 # extension get statically built.
241 # This will result in a very large perl executable, but the main purpose
242 # is to have proper linking set so as to be able to create miscellaneous
243 # executables with different built-in extensions. It implies BUILD_STATIC.
245 #ALL_STATIC := define
248 # set the install locations of the compiler
249 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
252 # For GCC builds this should be the directory containing the bin, include,
253 # lib directories for your compiler.
258 # Additional compiler flags can be specified here.
260 BUILDOPT := $(BUILDOPTEXTRA)
263 # This should normally be disabled. Enabling it will disable the File::Glob
264 # implementation of CORE::glob.
266 #BUILDOPT += -DPERL_EXTERNAL_GLOB
269 # Perl needs to read scripts in text mode so that the DATA filehandle
270 # works correctly with seek() and tell(), or around auto-flushes of
271 # all filehandles (e.g. by system(), backticks, fork(), etc).
273 # The current version on the ByteLoader module on CPAN however only
274 # works if scripts are read in binary mode. But before you disable text
275 # mode script reading (and break some DATA filehandle functionality)
276 # please check first if an updated ByteLoader isn't available on CPAN.
278 BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
281 # specify semicolon-separated list of extra directories that modules will
282 # look for libraries (spaces in path names need not be quoted)
287 # set this to your email address (perl will guess a value from
288 # your loginname and your hostname, which may not be right)
293 ## Build configuration ends.
296 ##################### CHANGE THESE ONLY IF YOU MUST #####################
299 DEBUG_MSTATS ?= undef
301 USE_SITECUST ?= undef
303 USE_ITHREADS ?= undef
306 USE_LARGE_FILES ?= undef
307 USE_64_BIT_INT ?= undef
308 USE_LONG_DOUBLE ?= undef
309 DEFAULT_INC_EXCLUDES_DOT ?= undef
310 USE_NO_REGISTRY ?= undef
312 ifeq ($(USE_IMP_SYS),define)
316 ifeq ($(PERL_MALLOC),undef)
320 ifeq ($(DEBUG_MSTATS),define)
321 BUILDOPT += -DPERL_DEBUGGING_MSTATS
324 ifeq ("$(USE_IMP_SYS) $(USE_MULTI)","define undef")
328 ifeq ("$(USE_ITHREADS) $(USE_MULTI)","define undef")
332 ifeq ($(USE_SITECUST),define)
333 BUILDOPT += -DUSE_SITECUSTOMIZE
336 ifneq ($(USE_MULTI),undef)
337 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
340 ifneq ($(USE_IMP_SYS),undef)
341 BUILDOPT += -DPERL_IMPLICIT_SYS
344 ifeq ($(USE_NO_REGISTRY),define)
345 BUILDOPT += -DWIN32_NO_REGISTRY
349 GCCTARGET := $(shell $(GCCBIN) -dumpmachine)
352 #no explicit CCTYPE given, do auto detection
354 GCCTARGET := $(shell $(GCCBIN) -dumpmachine 2>NUL)
356 ifneq ($(GCCTARGET),)
359 WIN64 := $(shell for /f "tokens=3 delims=.^ " \
360 %%i in ('cl ^2^>^&1') do @if "%%i" == "32-bit" echo undef)
361 #major version of CL has diff position based on 32 vs 64
362 #Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64
363 #Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
364 #use var to capture 1st line only, not 8th token of lines 2 & 3 in cl.exe output
365 #removing the cmd /c (extra scope) on the echo causes the env var to be undef
366 #when echo executes but it isn't undef for the "set MSVCVER", gmake or
368 ifeq ($(WIN64),undef)
369 MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=8,9 delims=.^ " \
370 %%i in ('cl ^2^>^&1') do if not defined MSVCVER if %%i%% geq 19 \
371 (set /A "MSVCVER=((%%i-5)*10)+(%%j/10)") \
372 else (set /A "MSVCVER=(%%i-6)*10")) & cmd /c echo %%MSVCVER%%)
374 MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=7,8 delims=.^ " \
375 %%i in ('cl ^2^>^&1') do if not defined MSVCVER if %%i%% geq 19 \
376 (set /A "MSVCVER=((%%i-5)*10)+(%%j/10)") \
377 else (set /A "MSVCVER=(%%i-6)*10")) & cmd /c echo %%MSVCVER%%)
379 #autodetect failed, reset to empty string
380 ifeq ($(MSVCVER),-50)
383 CCTYPE := MSVC$(MSVCVER)
388 # Versions of Visual C++ up to VC++ 7.1 define $(MSVCDir); versions since then
389 # define $(VCINSTALLDIR) instead, but for VC++ 14.1 we need the subfolder given
390 # by $(VCToolsInstallDir).
394 else ifeq ($(CCTYPE),MSVC70)
396 else ifeq ($(CCTYPE),MSVC70FREE)
398 else ifeq ($(CCTYPE),MSVC141)
399 CCHOME := $(VCToolsInstallDir)
400 else ifeq ($(CCTYPE),MSVC142)
401 CCHOME := $(VCToolsInstallDir)
403 CCHOME := $(VCINSTALLDIR)
408 ifeq ($(GCCTARGET),x86_64-w64-mingw32)
410 PROCESSOR_ARCHITECTURE := x64
412 ifeq ($(GCCTARGET),i686-w64-mingw32)
414 PROCESSOR_ARCHITECTURE := x86
418 PROCESSOR_ARCHITECTURE ?= x86
420 ifeq ($(WIN64),undef)
421 PROCESSOR_ARCHITECTURE = x86
425 # When we are running from a 32bit cmd.exe on AMD64 then
426 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
428 ifneq ($(PROCESSOR_ARCHITEW6432),)
429 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
431 else ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
433 else ifeq ($(PROCESSOR_ARCHITECTURE),IA64)
440 ifeq ($(WIN64),define)
441 USE_64_BIT_INT = define
444 # Disable the long double option for MSVC builds since that compiler
445 # does not support it.
446 ifneq ($(CCTYPE),GCC)
447 USE_LONG_DOUBLE = undef
450 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
451 ifeq ($(ARCHITECTURE),AMD64)
454 ifeq ($(ARCHITECTURE),IA64)
458 ifeq ($(USE_MULTI),define)
459 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
461 ifeq ($(USE_PERLIO),define)
462 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
464 ARCHNAME = MSWin32-$(ARCHITECTURE)
468 ifeq ($(USE_PERLIO),define)
469 BUILDOPT += -DUSE_PERLIO
472 ifeq ($(USE_ITHREADS),define)
473 ARCHNAME := $(ARCHNAME)-thread
476 ifneq ($(WIN64),define)
477 ifeq ($(USE_64_BIT_INT),define)
478 ARCHNAME := $(ARCHNAME)-64int
482 ifeq ($(USE_LONG_DOUBLE),define)
483 ARCHNAME := $(ARCHNAME)-ld
486 # Set the install location of the compiler headers/libraries.
487 # These are saved into $Config{incpath} and $Config{libpth}.
489 CCINCDIR := $(CCHOME)\$(GCCCROSS)\include
490 CCLIBDIR := $(CCHOME)\$(GCCCROSS)\lib
491 ARCHPREFIX := $(GCCCROSS)-
492 else ifeq ($(CCTYPE),GCC)
493 CCINCDIR := $(CCHOME)\include
494 CCLIBDIR := $(CCHOME)\lib
497 CCINCDIR := $(CCHOME)\include
498 ifeq ($(CCTYPE),MSVC141)
499 ifeq ($(WIN64),define)
500 CCLIBDIR := $(CCHOME)\lib\x64
502 CCLIBDIR := $(CCHOME)\lib\x86
504 else ifeq ($(CCTYPE),MSVC142)
505 ifeq ($(WIN64),define)
506 CCLIBDIR := $(CCHOME)\lib\x64
508 CCLIBDIR := $(CCHOME)\lib\x86
511 ifeq ($(WIN64),define)
512 CCLIBDIR := $(CCHOME)\lib\amd64
514 CCLIBDIR := $(CCHOME)\lib
520 # Set DLL location for GCC compilers.
523 CCDLLDIR := $(CCLIBDIR)
525 CCDLLDIR := $(CCHOME)\bin
529 ARCHDIR = ..\lib\$(ARCHNAME)
530 COREDIR = ..\lib\CORE
531 AUTODIR = ..\lib\auto
539 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
540 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
541 INST_LIB = $(INST_TOP)$(INST_VER)\lib
542 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
543 INST_COREDIR = $(INST_ARCHLIB)\CORE
544 INST_HTML = $(INST_TOP)$(INST_VER)\html
547 # Programs to compile, build .lib files and link
554 CC = $(ARCHPREFIX)gcc
555 LINK32 = $(ARCHPREFIX)g++
556 LIB32 = $(ARCHPREFIX)ar rc
557 IMPLIB = $(ARCHPREFIX)dlltool
558 RSC = $(ARCHPREFIX)windres
560 ifeq ($(USE_LONG_DOUBLE),define)
561 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
562 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
563 else ifeq ($(USE_MINGW_ANSI_STDIO),define)
564 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
565 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
568 GCCVER1 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%i)
569 GCCVER2 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%j)
570 GCCVER3 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%k)
572 # If you are using GCC, 4.3 or later by default we add the -fwrapv option.
573 # See https://github.com/Perl/perl5/issues/13690
575 GCCWRAPV := $(shell if "$(GCCVER1)"=="4" (if "$(GCCVER2)" geq "3" echo define) else if "$(GCCVER1)" geq "5" (echo define))
577 ifeq ($(GCCWRAPV),define)
579 MINIBUILDOPT += -fwrapv
590 INCLUDES = -I.\include -I. -I..
592 ifeq ($(WIN64),define)
595 LOCDEFS = -DPERLDLL -DPERL_CORE
598 LIBFILES = $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \
599 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \
600 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
605 DEFINES += -DDEBUGGING
612 ifeq ($(USE_CPLUSPLUS),define)
613 EXTRACFLAGS += $(CXX_FLAG)
615 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
616 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
622 BUILDOPT += -fno-strict-aliasing -mms-bitfields
623 MINIBUILDOPT += -fno-strict-aliasing
625 TESTPREPGCC = test-prep-gcc
631 # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test
632 # suite run in about 10% less time.
633 ifneq ($(CCTYPE),MSVC70FREE)
634 # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
635 # which is rare to execute
636 ifneq ($(USE_NO_REGISTRY),undef)
637 DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
640 DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
641 #miniperl never does any registry lookups
642 MINIDELAYLOAD = -DELAYLOAD:advapi32.dll
646 # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and
647 # DLLs. These either need copying everywhere with the binaries, or else need
648 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
649 # simplicity, embed them if they exist (and delete them afterwards so that they
650 # don't get installed too).
651 EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
652 if exist $@.manifest del $@.manifest
653 EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
654 if exist $@.manifest del $@.manifest
655 # This one is for perl.exe which already has an embedded manifest, so we want to
656 # append to it, not replace it.
657 APPEND_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -updateresource:$@;1 && \
658 if exist $@.manifest del $@.manifest
660 # Most relevant compiler-specific options fall into two groups:
661 # either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
662 ifeq ($(CCTYPE),MSVC70)
664 else ifeq ($(CCTYPE),MSVC70FREE)
670 ifneq ($(__ICC),define)
677 LIB32 = $(LINK32) -lib
684 INCLUDES = -I.\include -I. -I..
685 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
686 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
687 LOCDEFS = -DPERLDLL -DPERL_CORE
689 EXTRACFLAGS = -nologo -GF -W3
691 ifeq ($(CCTYPE),MSVC140)
693 else ifeq ($(CCTYPE),MSVC141)
695 else ifeq ($(CCTYPE),MSVC142)
704 DEFINES += -DDEBUGGING
706 else ifeq ($(CFG),DebugSymbols)
710 else ifeq ($(CFG),DebugFull)
711 ifeq ($(CCTYPE),MSVC140)
713 else ifeq ($(CCTYPE),MSVC141)
715 else ifeq ($(CCTYPE),MSVC142)
722 DEFINES += -D_DEBUG -DDEBUGGING
726 # Enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG).
727 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
728 OPTIMIZE = -O1 -Zi -GL
729 # we enable debug symbols in release builds also
730 LINK_DBG = -debug -opt:ref,icf -ltcg
731 # you may want to enable this if you want COFF symbols in the executables
732 # in addition to the PDB symbols. The default Dr. Watson that ships with
733 # Windows can use the former but not latter. The free WinDbg can be
734 # installed to get better stack traces from just the PDB symbols, so we
735 # avoid the bloat of COFF symbols by default.
736 #LINK_DBG += -debugtype:both
741 ifeq ($(WIN64),define)
743 OPTIMIZE += -fp:precise
746 # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions
747 # and POSIX CRT function names being deprecated.
748 ifeq ($(PREMSVC80),undef)
749 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
752 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
753 ifeq ($(CCTYPE),MSVC140)
754 DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS
755 else ifeq ($(CCTYPE),MSVC141)
756 DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS
757 else ifeq ($(CCTYPE),MSVC142)
758 DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS
761 # The Windows Server 2003 SP1 SDK compiler only defines _configthreadlocale() if
762 # _MT is defined, i.e. when using /MT (the LIBCMT.lib version of the CRT), which
763 # the perl build doesn't use. We therefore specify NO_THREAD_SAFE_LOCALE so that
764 # perl.h doesn't set USE_THREAD_SAFE_LOCALE, which it otherwise would do since
765 # _MSC_VER is 1400 for this compiler (as per MSVC80).
766 ifeq ($(CCTYPE),SDK2003SP1)
767 DEFINES += -DNO_THREAD_SAFE_LOCALE
770 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
771 # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
772 # preprocessor option to revert back to the old functionality for
773 # backward compatibility. We define this symbol here for older 32-bit
774 # compilers only (which aren't using it at all) for the sole purpose
775 # of getting it into $Config{ccflags}. That way if someone builds
776 # Perl itself with e.g. VC7 but later installs an XS module using VC8
777 # the time_t types will still be compatible.
778 ifeq ($(WIN64),undef)
779 ifeq ($(PREMSVC80),define)
780 BUILDOPT += -D_USE_32BIT_TIME_T
784 LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
785 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
786 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
787 odbc32.lib odbccp32.lib comctl32.lib
789 ifeq ($(CCTYPE),MSVC140)
790 ifeq ($(CFG),DebugFull)
791 LIBBASEFILES += msvcrtd.lib vcruntimed.lib
793 LIBBASEFILES += msvcrt.lib vcruntime.lib
795 else ifeq ($(CCTYPE),MSVC141)
796 ifeq ($(CFG),DebugFull)
797 LIBBASEFILES += msvcrtd.lib vcruntimed.lib
799 LIBBASEFILES += msvcrt.lib vcruntime.lib
801 else ifeq ($(CCTYPE),MSVC142)
802 ifeq ($(CFG),DebugFull)
803 LIBBASEFILES += msvcrtd.lib vcruntimed.lib
805 LIBBASEFILES += msvcrt.lib vcruntime.lib
809 # Avoid __intel_new_proc_init link error for libircmt.
810 # libmmd is /MD equivelent, other variants exist.
811 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
812 # and optimized C89 funcs
813 ifeq ($(__ICC),define)
814 LIBBASEFILES += libircmt.lib libmmd.lib
817 # The Windows Server 2003 SP1 SDK compiler links against MSVCRT.dll, which
818 # doesn't include the buffer overrun verification code used by the /GS switch.
819 # Since the code links against libraries that are compiled with /GS, this
820 # "security cookie verification" code must be included via bufferoverflow.lib.
821 ifeq ($(CCTYPE),SDK2003SP1)
822 LIBBASEFILES += bufferoverflowU.lib
825 LIBFILES = $(LIBBASEFILES) $(LIBC)
827 ifeq ($(__ICC),define)
828 EXTRACFLAGS += -Qstd=c99
830 ifeq ($(USE_CPLUSPLUS),define)
831 EXTRACFLAGS += $(CXX_FLAG)
833 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
834 $(PCHFLAGS) $(OPTIMIZE)
835 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
836 -libpath:"$(INST_COREDIR)" \
837 -machine:$(PROCESSOR_ARCHITECTURE)
847 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
851 # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
853 # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
854 # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
855 # Console vs GUI makes no difference for DLLs, so use default for cleaner
858 ifeq ($(CCTYPE),MSVC120)
859 ifeq ($(WIN64),define)
860 LINK_FLAGS += -subsystem:console,"5.02"
862 LINK_FLAGS += -subsystem:console,"5.01"
865 else ifeq ($(CCTYPE),MSVC140)
866 ifeq ($(WIN64),define)
867 LINK_FLAGS += -subsystem:console,"5.02"
869 LINK_FLAGS += -subsystem:console,"5.01"
872 else ifeq ($(CCTYPE),MSVC141)
873 ifeq ($(WIN64),define)
874 LINK_FLAGS += -subsystem:console,"5.02"
876 LINK_FLAGS += -subsystem:console,"5.01"
879 else ifeq ($(CCTYPE),MSVC142)
880 ifeq ($(WIN64),define)
881 LINK_FLAGS += -subsystem:console,"5.02"
883 LINK_FLAGS += -subsystem:console,"5.01"
886 else ifneq ($(CCTYPE),GCC)
887 PRIV_LINK_FLAGS += -subsystem:console
890 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
892 #################### do not edit below this line #######################
893 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
895 #prevent -j from reaching EUMM/make_ext.pl/"sub makes", Win32 EUMM not parallel
901 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
904 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) $<
907 $(CC) -c -I$(<D) $(CFLAGS_O) -E $< >$@
913 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
914 $(IMPLIB) --input-def $(*F).def --output-lib $(*F).a $@
918 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
920 $(RSC) -i.. -DINCLUDE_MANIFEST $<
926 #do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL)
927 #$(MINIPERL) is not a buildable target, use "gmake mp" if you want to just build
929 MINIPERL = ..\miniperl.exe
930 HAVEMINIPERL = ..\lib\buildcustomize.pl
932 PERLEXE = ..\perl.exe
933 WPERLEXE = ..\wperl.exe
934 PERLEXESTATIC = ..\perl-static.exe
935 STATICDIR = .\static.tmp
936 GLOBEXE = ..\perlglob.exe
937 CONFIGPM = ..\lib\Config.pm
938 GENUUDMAP = ..\generate_uudmap.exe
939 ifeq ($(BUILD_STATIC),define)
942 ifeq ($(ALL_STATIC),define)
949 # Unicode data files generated by mktables
950 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
951 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
952 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
953 ..\lib\unicore\mktables.lst
955 # Directories of Unicode data files generated by mktables
956 UNIDATADIR1 = ..\lib\unicore\To
957 UNIDATADIR2 = ..\lib\unicore\lib
959 PERLEXE_MANIFEST= .\perlexe.manifest
960 PERLEXE_ICO = .\perlexe.ico
961 PERLEXE_RES = .\perlexe.res
964 # Nominate a target which causes extensions to be re-built
965 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
966 # on and really only the interface - i.e. the .def file used to export symbols
968 PERLDEP = $(PERLIMPLIB)
971 PL2BAT = bin\pl2bat.pl
993 ..\utils\zipdetails \
1003 ifeq ($(CCTYPE),GCC)
1005 CFGSH_TMPL = config.gc
1006 CFGH_TMPL = config_H.gc
1007 PERLIMPLIB = $(COREDIR)\libperl533$(a)
1008 PERLIMPLIBBASE = libperl533$(a)
1009 PERLSTATICLIB = ..\libperl533s$(a)
1014 CFGSH_TMPL = config.vc
1015 CFGH_TMPL = config_H.vc
1020 # makedef.pl must be updated if this changes, and this should normally
1021 # only change when there is an incompatible revision of the public API.
1022 PERLIMPLIB ?= $(COREDIR)\perl533$(a)
1023 PERLIMPLIBBASE ?= perl533$(a)
1024 PERLEXPLIB ?= $(COREDIR)\perl533.exp
1025 PERLSTATICLIB ?= ..\perl533s$(a)
1026 PERLDLL = ..\perl533.dll
1027 PERLDLLBASE = perl533.dll
1029 # don't let "gmake -n all" try to run "miniperl.exe make_ext.pl"
1032 XCOPY = xcopy /f /r /i /d /y
1033 RCOPY = xcopy /f /r /i /e /d /y
1036 #first ones are arrange in compile time order for faster parallel building
1037 #see #123867 for details
1078 EXTRACORE_SRC += perllib.c
1080 ifeq ($(PERL_MALLOC),define)
1081 EXTRACORE_SRC += ..\malloc.c
1084 EXTRACORE_SRC += ..\perlio.c
1092 # We need this for miniperl build unless we override canned
1093 # config.h #define building mini\*
1094 #ifeq ($(USE_PERLIO)" == "define"
1095 WIN32_SRC += .\win32io.c
1133 .\include\dirent.h \
1135 .\include\sys\errno2.h \
1136 .\include\sys\socket.h \
1139 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
1141 UUDMAP_H = ..\uudmap.h
1142 BITCOUNT_H = ..\bitcount.h
1143 MG_DATA_H = ..\mg_data.h
1144 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
1146 HAVE_COREDIR = .coreheaders
1148 MICROCORE_OBJ = $(MICROCORE_SRC:.c=$(o))
1149 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=$(o))
1150 WIN32_OBJ = $(WIN32_SRC:.c=$(o))
1152 MINICORE_OBJ = $(subst ..\,mini\,$(MICROCORE_OBJ)) \
1153 $(MINIDIR)\miniperlmain$(o) \
1154 $(MINIDIR)\perlio$(o)
1155 MINIWIN32_OBJ = $(subst .\,mini\,$(WIN32_OBJ))
1156 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
1157 DLL_OBJ = $(DYNALOADER)
1159 PERLDLL_OBJ = $(CORE_OBJ)
1160 PERLEXE_OBJ = perlmain$(o)
1161 PERLEXEST_OBJ = perlmainst$(o)
1163 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
1165 ifneq ($(USE_SETARGV),)
1166 SETARGV_OBJ = setargv$(o)
1169 ifeq ($(ALL_STATIC),define)
1170 # some exclusions, unfortunately, until fixed:
1171 # - MakeMaker isn't capable enough for SDBM_File (small bug)
1172 STATIC_EXT = * !SDBM_File
1173 NORMALIZE_STATIC = Normalize_static
1175 # specify static extensions here, for example:
1176 # (be sure to include Win32CORE to load Win32 on demand)
1177 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
1178 STATIC_EXT = Win32CORE
1179 NORMALIZE_DYN = Normalize_dyn
1182 DYNALOADER = ..\DynaLoader$(o)
1184 # vars must be separated by "\t+~\t+", since we're using the tempfile
1185 # version of config_sh.pl (we were overflowing someone's buffer by
1186 # trying to fit them all on the command line)
1189 "INST_TOP=$(INST_TOP)" \
1190 "INST_VER=$(INST_VER)" \
1191 "INST_ARCH=$(INST_ARCH)" \
1192 "archname=$(ARCHNAME)" \
1195 "ccflags=$(subst ",\",$(EXTRACFLAGS) $(DEFINES) $(BUILDOPT))" \
1196 "usecplusplus=$(USE_CPLUSPLUS)" \
1197 "cf_email=$(EMAIL)" \
1198 "d_mymalloc=$(PERL_MALLOC)" \
1199 "libs=$(LIBFILES)" \
1200 "incpath=$(subst ",\",$(CCINCDIR))" \
1201 "libperl=$(subst ",\",$(PERLIMPLIBBASE))" \
1202 "libpth=$(subst ",\",$(CCLIBDIR);$(EXTRALIBDIRS))" \
1209 "static_ext=$(STATIC_EXT)" \
1210 "usethreads=$(USE_ITHREADS)" \
1211 "useithreads=$(USE_ITHREADS)" \
1212 "usemultiplicity=$(USE_MULTI)" \
1213 "useperlio=$(USE_PERLIO)" \
1214 "use64bitint=$(USE_64_BIT_INT)" \
1215 "uselongdouble=$(USE_LONG_DOUBLE)" \
1216 "uselargefiles=$(USE_LARGE_FILES)" \
1217 "usesitecustomize=$(USE_SITECUST)" \
1218 "default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)" \
1219 "LINK_FLAGS=$(subst ",\",$(LINK_FLAGS))"\
1220 "optimize=$(subst ",\",$(OPTIMIZE))" \
1221 "ARCHPREFIX=$(ARCHPREFIX)" \
1230 all : info rebasePE Extensions_nonxs $(PERLSTATIC)
1233 ifeq ($(CCTYPE),GCC)
1234 @echo # CCTYPE=$(CCTYPE)&& \
1235 echo # GCCBIN=$(GCCBIN)&& \
1236 echo # GCCVER=$(GCCVER1).$(GCCVER2).$(GCCVER3)&& \
1237 echo # GCCTARGET=$(GCCTARGET)&& \
1238 echo # GCCCROSS=$(GCCCROSS)&& \
1239 echo # WIN64=$(WIN64)&& \
1240 echo # ARCHITECTURE=$(ARCHITECTURE)&& \
1241 echo # ARCHNAME=$(ARCHNAME)&& \
1242 echo # MAKE=$(PLMAKE)
1244 @echo # CCTYPE=$(CCTYPE)&& \
1245 echo # WIN64=$(WIN64)&& \
1246 echo # ARCHITECTURE=$(ARCHITECTURE)&& \
1247 echo # ARCHNAME=$(ARCHNAME)&& \
1248 echo # MAKE=$(PLMAKE)
1251 @echo Unable to detect gcc and/or architecture!
1256 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
1258 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
1260 reonly : ..\regnodes.h .\config.h ..\git_version.h $(GLOBEXE) $(HAVEMINIPERL)\
1261 $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
1264 static: $(PERLEXESTATIC)
1266 #----------------------------------------------------------------
1268 $(GLOBEXE) : perlglob.c
1269 ifeq ($(CCTYPE),GCC)
1270 $(LINK32) $(EXTRACFLAGS) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
1272 $(CC) $(EXTRACFLAGS) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \
1273 setargv$(o) $(LIBFILES) && $(EMBED_EXE_MANI)
1276 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
1277 $(MINIPERL) -I..\lib ..\make_patchnum.pl
1279 # make sure that we recompile perl.c if the git version changes
1280 ..\perl$(o) : ..\git_version.h
1282 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL)
1283 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
1285 # This target is for when changes to the main config.sh happen.
1286 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1287 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
1288 # this target to regenerate config_H.gc.
1290 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
1291 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1292 -del /f $(CFGH_TMPL)
1293 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1294 rename config.h $(CFGH_TMPL)
1296 $(CONFIGPM): ..\config.sh config_h.PL
1297 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1298 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1300 .\config.h : $(CONFIGPM)
1302 # See the comment in Makefile.SH explaining this seemingly cranky ordering
1303 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
1304 ifeq ($(CCTYPE),GCC)
1305 $(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
1307 $(LINK32) -out:$(MINIPERL) $(BLINK_FLAGS) \
1308 $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)
1309 $(subst $@,$(MINIPERL),$(EMBED_EXE_MANI))
1312 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1314 #convinence target, get a working miniperl
1317 $(MINIDIR)\.exists : $(CFGH_TMPL)
1318 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1320 # Copy the template config.h and set configurables at the end of it
1321 # as per the options chosen and compiler used.
1322 # Note: This config.h is only used to build miniperl.exe anyway, but
1323 # it's as well to have its options correct to be sure that it builds
1324 # and so that it's "-V" options are correct for use by makedef.pl. The
1325 # real config.h used to build perl.exe is generated from the top-level
1326 # config_h.SH by config_h.PL (run by miniperl.exe).
1328 # MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd
1329 # config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ).
1330 copy $(CFGH_TMPL) config.h
1332 echo #ifndef _config_h_footer_&& \
1333 echo #define _config_h_footer_&& \
1334 echo #undef Off_t&& \
1335 echo #undef LSEEKSIZE&& \
1336 echo #undef Off_t_size&& \
1337 echo #undef PTRSIZE&& \
1338 echo #undef SSize_t&& \
1339 echo #undef HAS_ATOLL&& \
1340 echo #undef HAS_STRTOLL&& \
1341 echo #undef HAS_STRTOULL&& \
1342 echo #undef Size_t_size&& \
1343 echo #undef IVTYPE&& \
1344 echo #undef UVTYPE&& \
1345 echo #undef IVSIZE&& \
1346 echo #undef UVSIZE&& \
1347 echo #undef NV_PRESERVES_UV&& \
1348 echo #undef NV_PRESERVES_UV_BITS&& \
1349 echo #undef IVdf&& \
1350 echo #undef UVuf&& \
1351 echo #undef UVof&& \
1352 echo #undef UVxf&& \
1353 echo #undef UVXf&& \
1354 echo #undef USE_64_BIT_INT&& \
1355 echo #undef Gconvert&& \
1356 echo #undef HAS_FREXPL&& \
1357 echo #undef HAS_ISNANL&& \
1358 echo #undef HAS_MODFL&& \
1359 echo #undef HAS_MODFL_PROTO&& \
1360 echo #undef HAS_SQRTL&& \
1361 echo #undef HAS_STRTOLD&& \
1362 echo #undef PERL_PRIfldbl&& \
1363 echo #undef PERL_PRIgldbl&& \
1364 echo #undef PERL_PRIeldbl&& \
1365 echo #undef PERL_SCNfldbl&& \
1366 echo #undef NVTYPE&& \
1367 echo #undef NVSIZE&& \
1368 echo #undef LONG_DOUBLESIZE&& \
1369 echo #undef NV_OVERFLOWS_INTEGERS_AT&& \
1370 echo #undef NVef&& \
1371 echo #undef NVff&& \
1372 echo #undef NVgf&& \
1373 echo #undef USE_LONG_DOUBLE&& \
1374 echo #undef USE_CPLUSPLUS)>> config.h
1375 ifeq ($(CCTYPE),MSVC140)
1376 @(echo #undef FILE_ptr&& \
1377 echo #undef FILE_cnt&& \
1378 echo #undef FILE_base&& \
1379 echo #undef FILE_bufsiz&& \
1380 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1381 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1382 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1383 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1384 echo #define I_STDBOOL)>> config.h
1385 else ifeq ($(CCTYPE),MSVC141)
1386 @(echo #undef FILE_ptr&& \
1387 echo #undef FILE_cnt&& \
1388 echo #undef FILE_base&& \
1389 echo #undef FILE_bufsiz&& \
1390 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1391 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1392 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1393 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1394 echo #define I_STDBOOL)>> config.h
1395 else ifeq ($(CCTYPE),MSVC142)
1396 @(echo #undef FILE_ptr&& \
1397 echo #undef FILE_cnt&& \
1398 echo #undef FILE_base&& \
1399 echo #undef FILE_bufsiz&& \
1400 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1401 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1402 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1403 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1404 echo #define I_STDBOOL)>> config.h
1406 ifeq ($(USE_LARGE_FILES),define)
1407 @(echo #define Off_t $(INT64)&& \
1408 echo #define LSEEKSIZE ^8&& \
1409 echo #define Off_t_size ^8)>> config.h
1411 @(echo #define Off_t long&& \
1412 echo #define LSEEKSIZE ^4&& \
1413 echo #define Off_t_size ^4)>> config.h
1415 ifeq ($(WIN64),define)
1416 ifeq ($(CCTYPE),GCC)
1417 @(echo #define LONG_DOUBLESIZE ^16)>> config.h
1419 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1421 @(echo #define PTRSIZE ^8&& \
1422 echo #define SSize_t $(INT64)&& \
1423 echo #define HAS_ATOLL&& \
1424 echo #define HAS_STRTOLL&& \
1425 echo #define HAS_STRTOULL&& \
1426 echo #define Size_t_size ^8)>> config.h
1428 ifeq ($(CCTYPE),GCC)
1429 @(echo #define LONG_DOUBLESIZE ^12)>> config.h
1431 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1433 @(echo #define PTRSIZE ^4&& \
1434 echo #define SSize_t int&& \
1435 echo #undef HAS_ATOLL&& \
1436 echo #undef HAS_STRTOLL&& \
1437 echo #undef HAS_STRTOULL&& \
1438 echo #define Size_t_size ^4)>> config.h
1440 ifeq ($(USE_64_BIT_INT),define)
1441 @(echo #define IVTYPE $(INT64)&& \
1442 echo #define UVTYPE unsigned $(INT64)&& \
1443 echo #define IVSIZE ^8&& \
1444 echo #define UVSIZE ^8)>> config.h
1445 ifeq ($(USE_LONG_DOUBLE),define)
1446 @(echo #define NV_PRESERVES_UV&& \
1447 echo #define NV_PRESERVES_UV_BITS 64)>> config.h
1449 @(echo #undef NV_PRESERVES_UV&& \
1450 echo #define NV_PRESERVES_UV_BITS 53)>> config.h
1452 @(echo #define IVdf "I64d"&& \
1453 echo #define UVuf "I64u"&& \
1454 echo #define UVof "I64o"&& \
1455 echo #define UVxf "I64x"&& \
1456 echo #define UVXf "I64X"&& \
1457 echo #define USE_64_BIT_INT)>> config.h
1459 @(echo #define IVTYPE long&& \
1460 echo #define UVTYPE unsigned long&& \
1461 echo #define IVSIZE ^4&& \
1462 echo #define UVSIZE ^4&& \
1463 echo #define NV_PRESERVES_UV&& \
1464 echo #define NV_PRESERVES_UV_BITS 32&& \
1465 echo #define IVdf "ld"&& \
1466 echo #define UVuf "lu"&& \
1467 echo #define UVof "lo"&& \
1468 echo #define UVxf "lx"&& \
1469 echo #define UVXf "lX"&& \
1470 echo #undef USE_64_BIT_INT)>> config.h
1472 ifeq ($(USE_LONG_DOUBLE),define)
1473 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*""Lg",^(n^),^(x^)^)&& \
1474 echo #define HAS_FREXPL&& \
1475 echo #define HAS_ISNANL&& \
1476 echo #define HAS_MODFL&& \
1477 echo #define HAS_MODFL_PROTO&& \
1478 echo #define HAS_SQRTL&& \
1479 echo #define HAS_STRTOLD&& \
1480 echo #define PERL_PRIfldbl "Lf"&& \
1481 echo #define PERL_PRIgldbl "Lg"&& \
1482 echo #define PERL_PRIeldbl "Le"&& \
1483 echo #define PERL_SCNfldbl "Lf"&& \
1484 echo #define NVTYPE long double&& \
1485 echo #define NVSIZE LONG_DOUBLESIZE&& \
1486 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&& \
1487 echo #define NVef "Le"&& \
1488 echo #define NVff "Lf"&& \
1489 echo #define NVgf "Lg"&& \
1490 echo #define USE_LONG_DOUBLE)>> config.h
1492 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*g",^(n^),^(x^)^)&& \
1493 echo #undef HAS_FREXPL&& \
1494 echo #undef HAS_ISNANL&& \
1495 echo #undef HAS_MODFL&& \
1496 echo #undef HAS_MODFL_PROTO&& \
1497 echo #undef HAS_SQRTL&& \
1498 echo #undef HAS_STRTOLD&& \
1499 echo #undef PERL_PRIfldbl&& \
1500 echo #undef PERL_PRIgldbl&& \
1501 echo #undef PERL_PRIeldbl&& \
1502 echo #undef PERL_SCNfldbl&& \
1503 echo #define NVTYPE double&& \
1504 echo #define NVSIZE ^8&& \
1505 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&& \
1506 echo #define NVef "e"&& \
1507 echo #define NVff "f"&& \
1508 echo #define NVgf "g"&& \
1509 echo #undef USE_LONG_DOUBLE)>> config.h
1511 ifeq ($(USE_CPLUSPLUS),define)
1512 @(echo #define USE_CPLUSPLUS&& \
1513 echo #endif)>> config.h
1515 @(echo #undef USE_CPLUSPLUS&& \
1516 echo #endif)>> config.h
1518 #separate line since this is sentinal that this target is done
1519 @rem. > $(MINIDIR)\.exists
1521 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1522 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*F).c
1524 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1525 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*F).c
1527 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1528 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s
1529 # unless the .IF is true), so instead we use a .ELSE with the default.
1530 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1532 perllib$(o) : perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h
1533 ifeq ($(USE_IMP_SYS),define)
1534 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1536 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1539 # 1. we don't want to rebuild miniperl.exe when config.h changes
1540 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1541 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1542 $(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H)
1544 $(WIN32_OBJ) : $(CORE_H)
1546 $(CORE_OBJ) : $(CORE_H)
1548 $(DLL_OBJ) : $(CORE_H)
1551 perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl
1552 $(MINIPERL) -I..\lib create_perllibst_h.pl
1554 perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
1555 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1556 $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1558 $(PERLEXPLIB) : $(PERLIMPLIB)
1560 $(PERLIMPLIB) : perldll.def
1561 ifeq ($(CCTYPE),GCC)
1562 $(IMPLIB) -k -d perldll.def -D $(PERLDLLBASE) -l $(PERLIMPLIB) -e $(PERLEXPLIB)
1564 lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
1567 $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1568 ifeq ($(CCTYPE),GCC)
1569 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1570 $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) $(PERLEXPLIB)
1572 $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \
1573 @Extensions_static \
1574 $(DELAYLOAD) $(LIBFILES) \
1575 $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB)
1579 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1580 ifeq ($(CCTYPE),GCC)
1581 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1582 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1583 for %%i in ($(shell type Extensions_static)) do \
1584 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1585 $(ARCHPREFIX)ar x ..\%%i && \
1586 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1587 cd .. && rmdir /s /q $(STATICDIR)
1589 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1592 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1594 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1596 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1598 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1600 $(BITCOUNT_H) : $(GENUUDMAP)
1601 $(GENUUDMAP) $(GENERATED_HEADERS)
1603 $(GENUUDMAP) : ..\mg_raw.h
1604 ifeq ($(CCTYPE),GCC)
1605 $(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
1606 $(BLINK_FLAGS) $(LIBFILES)
1608 $(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c -link $(LIBFILES) $(BLINK_FLAGS)
1614 MakePPPort : $(HAVEMINIPERL) $(CONFIGPM)
1615 $(MINIPERL) -I..\lib ..\mkppport
1617 # also known as $(HAVE_COREDIR)
1618 .coreheaders : $(CORE_H)
1619 $(XCOPY) *.h $(COREDIR)\\*.*
1620 $(RCOPY) include $(COREDIR)\\*.*
1621 $(XCOPY) ..\\*.h $(COREDIR)\\*.*
1624 perlmain$(o) : runperl.c $(CONFIGPM)
1625 $(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1627 perlmainst$(o) : runperl.c $(CONFIGPM)
1628 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1630 $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
1631 ifeq ($(CCTYPE),GCC)
1632 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1633 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1635 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1636 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1639 copy $(PERLEXE) $(WPERLEXE)
1640 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1642 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1643 ifeq ($(CCTYPE),GCC)
1644 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1645 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1647 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1648 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1652 #-------------------------------------------------------------------------------
1653 # There's no direct way to mark a dependency on
1654 # DynaLoader.pm, so this will have to do
1656 #most of deps of this target are in DYNALOADER and therefore omitted here
1657 Extensions : $(PERLDEP) $(DYNALOADER) Extension_lib $(GLOBEXE) MakePPPort
1658 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
1660 Normalize_static : $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) $(UNIDATAFILES)
1661 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static +Unicode/Normalize
1663 Normalize_dyn : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
1664 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
1666 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
1667 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1669 Exts_static_general : ..\make_ext.pl $(CONFIGPM) Extension_lib $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
1670 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static !Unicode/Normalize
1672 Extensions_static : list_static_libs.pl Exts_static_general $(NORMALIZE_STATIC)
1673 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1675 Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
1676 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
1678 Extension_lib : ..\make_ext.pl $(CONFIGPM)
1679 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) lib
1681 #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
1682 $(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
1683 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader
1686 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1688 Extensions_realclean :
1689 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1691 # all PE files need to be built by the time this target runs, PP files can still
1692 # be running in parallel like UNIDATAFILES, this target a placeholder for the
1694 ifeq ($(PERLSTATIC),static)
1695 rebasePE : Extensions $(PERLDLL) $(PERLEXE) $(PERLEXESTATIC)
1697 rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
1701 #-------------------------------------------------------------------------------
1703 doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod
1704 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1705 --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
1708 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1709 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1711 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1712 # so please check that script before making structural changes here
1713 utils: $(HAVEMINIPERL) ..\utils\Makefile
1714 cd ..\utils && $(PLMAKE) PERL=$(MINIPERL)
1715 copy ..\README.aix ..\pod\perlaix.pod
1716 copy ..\README.amiga ..\pod\perlamiga.pod
1717 copy ..\README.android ..\pod\perlandroid.pod
1718 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1719 copy ..\README.cn ..\pod\perlcn.pod
1720 copy ..\README.cygwin ..\pod\perlcygwin.pod
1721 copy ..\README.dos ..\pod\perldos.pod
1722 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1723 copy ..\README.haiku ..\pod\perlhaiku.pod
1724 copy ..\README.hpux ..\pod\perlhpux.pod
1725 copy ..\README.hurd ..\pod\perlhurd.pod
1726 copy ..\README.irix ..\pod\perlirix.pod
1727 copy ..\README.jp ..\pod\perljp.pod
1728 copy ..\README.ko ..\pod\perlko.pod
1729 copy ..\README.linux ..\pod\perllinux.pod
1730 copy ..\README.macos ..\pod\perlmacos.pod
1731 copy ..\README.macosx ..\pod\perlmacosx.pod
1732 copy ..\README.netware ..\pod\perlnetware.pod
1733 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1734 copy ..\README.os2 ..\pod\perlos2.pod
1735 copy ..\README.os390 ..\pod\perlos390.pod
1736 copy ..\README.os400 ..\pod\perlos400.pod
1737 copy ..\README.plan9 ..\pod\perlplan9.pod
1738 copy ..\README.qnx ..\pod\perlqnx.pod
1739 copy ..\README.riscos ..\pod\perlriscos.pod
1740 copy ..\README.solaris ..\pod\perlsolaris.pod
1741 copy ..\README.synology ..\pod\perlsynology.pod
1742 copy ..\README.tru64 ..\pod\perltru64.pod
1743 copy ..\README.tw ..\pod\perltw.pod
1744 copy ..\README.vos ..\pod\perlvos.pod
1745 copy ..\README.win32 ..\pod\perlwin32.pod
1746 copy ..\pod\perldelta.pod ..\pod\perl5335delta.pod
1747 $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
1748 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1749 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1751 ..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs $(NORMALIZE_DYN) utils
1752 $(PERLEXE) -f ..\pod\buildtoc -q
1754 # Note that the pod cleanup in this next section is parsed (and regenerated
1755 # by pod/buildtoc so please check that script before making changes here
1757 distclean: realclean
1758 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1759 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1760 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1761 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1762 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1763 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1764 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1765 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1766 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1767 -del /f $(LIBDIR)\File\Glob.pm
1768 -del /f $(LIBDIR)\Sys\Hostname.pm
1769 -del /f $(LIBDIR)\Time\HiRes.pm
1770 -del /f $(LIBDIR)\Unicode\Normalize.pm
1771 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1772 -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
1773 -del /f $(LIBDIR)\Win32.pm
1774 -del /f $(LIBDIR)\Win32CORE.pm
1775 -del /f $(LIBDIR)\Win32API\File.pm
1776 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1777 -del /f $(LIBDIR)\buildcustomize.pl
1778 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1780 -if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga
1781 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1782 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1783 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1784 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1785 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1786 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1787 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1788 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1789 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1790 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1791 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1792 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1793 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1794 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1795 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1796 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1797 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1798 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1799 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1800 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1801 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1802 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1803 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1804 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1805 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1806 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1807 -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1808 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1809 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1810 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1811 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1812 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1813 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1814 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1815 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1816 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1817 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1818 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1819 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1820 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1821 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1822 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1823 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1824 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1825 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1826 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1827 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1828 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1829 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1830 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1831 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1832 -if exist $(LIBDIR)\Test2 rmdir /s /q $(LIBDIR)\Test2
1833 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1834 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1835 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1836 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1837 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1838 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1839 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1840 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1841 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1842 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1843 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1844 perl5335delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1845 perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
1846 perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1847 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1848 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1849 perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1850 perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1851 perlsolaris.pod perlsynology.pod perltoc.pod perltru64.pod \
1852 perltw.pod perluniprops.pod perlvos.pod perlwin32.pod
1853 -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \
1854 perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
1855 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1856 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1859 -del /f ..\lib\Config_git.pl
1862 -del /f $(PERLEXE_RES) perl.base
1863 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1864 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1865 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1866 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1867 -del /s ..\utils\Makefile
1868 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1869 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1870 -if exist pod2htmd.tmp del pod2htmd.tmp
1871 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1872 -del /f ..\t\test_state
1874 install : all installbare installhtml
1876 installbare : utils ..\pod\perltoc.pod
1877 $(PERLEXE) ..\installperl
1878 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\$(NULL)
1879 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\$(NULL)
1880 $(XCOPY) $(GLOBEXE) $(INST_BIN)\$(NULL)
1881 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\$(NULL)
1882 $(XCOPY) "bin\*.bat" $(INST_SCRIPT)\$(NULL)
1885 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\$(NULL)
1887 inst_lib : $(CONFIGPM)
1888 $(RCOPY) ..\lib $(INST_LIB)\$(NULL)
1890 $(UNIDATAFILES) : ..\pod\perluniprops.pod
1892 ..\pod\perluniprops.pod: ..\lib\unicore\mktables $(CONFIGPM)
1893 $(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
1895 minitest : $(HAVEMINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1896 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1897 if exist ..\t\perl.exe del /f ..\t\perl.exe
1898 rename ..\t\miniperl.exe perl.exe
1899 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1900 attrib -r "..\t\*.*"
1902 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
1904 test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC)
1905 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1906 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1907 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1908 # If building with gcc versions 4.x.x or greater, then
1909 # the GCC helper DLL will also need copied to the test directory.
1910 # The name of the dll can change, depending upon which vendor has supplied
1911 # your compiler, and upon the values of "x".
1912 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1913 # Without this copying, the op/taint.t test script will fail.
1915 ifeq ($(CCTYPE),GCC)
1918 if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
1919 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1920 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1921 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1922 if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
1927 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1928 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1930 test_porting : test-prep
1931 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1932 cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1934 test-reonly : reonly utils
1935 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1936 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1937 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1938 cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA)
1943 test-notty : test-prep
1944 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1945 set PERL_SKIP_TTY_TEST=1 && \
1946 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1949 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1950 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1951 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1952 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1953 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1956 -@erase miniperlmain$(o)
1958 -@erase perlglob$(o)
1959 -@erase perlmain$(o)
1960 -@erase perlmainst$(o)
1962 -@erase /f ..\git_version.h
1966 -@erase $(PERLEXESTATIC)
1967 -@erase $(PERLSTATICLIB)
1970 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1971 -@erase .coreheaders
1972 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1973 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1974 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1975 -@erase $(UNIDATAFILES)
1976 -@erase $(WIN32_OBJ)
1978 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1979 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1981 -@erase *.pdb ..\*.pdb
1982 -@erase Extensions_static
1984 clean : Extensions_clean _clean
1986 realclean : Extensions_realclean _clean
1988 # Handy way to run perlbug -ok without having to install and run the
1989 # installed perlbug. We don't re-run the tests here - we trust the user.
1990 # Please *don't* use this unless all tests pass.
1991 # If you want to report test failures, use "gmake nok" instead.
1992 ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1993 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
1995 okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1996 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1998 nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1999 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
2001 nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
2002 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok