2 # Makefile to build perl on Windows using GMAKE.
4 # Microsoft Visual C++ 6.0 or later
5 # MinGW with gcc-3.4.5 or later
6 # Windows SDK 64-bit compiler and tools
8 # This is set up to build a perl.exe that runs off a shared library
9 # (perl528.dll). Also makes individual DLLs for the XS extensions.
11 # The easiest way to customize the build process is to use parameters like this:
13 # c:\dev\perlsrc\win32> gmake INST_TOP=c:\sw\perl CCHOME=c:\sw\mingw USE_64_BIT_INT=define
17 ## Make sure you read README.win32 *before* you mess with anything here!
21 # We set this to point to cmd.exe in case GNU Make finds sh.exe in the path.
22 # Comment this line out if necessary
26 # define whether you want to use native gcc compiler or cross-compiler
27 # possible values: gcc
28 # i686-w64-mingw32-gcc
29 # x86_64-w64-mingw32-gcc
32 ifeq ($(GCCBIN),x86_64-w64-mingw32-gcc)
33 GCCCROSS := x86_64-w64-mingw32
35 ifeq ($(GCCBIN),i686-w64-mingw32-gcc)
36 GCCCROSS := i686-w64-mingw32
41 ## Build configuration. Edit the values below to suit your needs.
45 # Set these to wherever you want "gmake install" to put your
49 INST_TOP := $(INST_DRV)\perl
52 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
53 # on a 64-bit version of Windows.
58 # Comment this out if you DON'T want your perl installation to be versioned.
59 # This means that the new installation will overwrite any files from the
60 # old installation at the same INST_TOP location. Leaving it enabled is
61 # the safest route, as perl adds the extra version directory to all the
62 # locations it installs files to. If you disable it, an alternative
63 # versioned installation can be obtained by setting INST_TOP above to a
64 # path that includes an arbitrary version string.
69 # Comment this out if you DON'T want your perl installation to have
70 # architecture specific components. This means that architecture-
71 # specific files will be installed along with the architecture-neutral
72 # files. Leaving it enabled is safer and more flexible, in case you
73 # want to build multiple flavors of perl and install them together in
74 # the same location. Commenting it out gives you a simpler
75 # installation that is easier to understand for beginners.
77 #INST_ARCH := \$(ARCHNAME)
80 # Uncomment this if you want perl to run
81 # $Config{sitelibexp}\sitecustomize.pl
82 # before anything else. This script can then be set up, for example,
83 # to add additional entries to @INC.
85 #USE_SITECUST := define
88 # uncomment to enable multiple interpreters. This is needed for fork()
89 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
90 # and USE_ITHREADS below.
95 # Interpreter cloning/threads; now reasonably complete.
96 # This should be enabled to get the fork() emulation. This needs (and
97 # will auto-enable) USE_MULTI above.
99 USE_ITHREADS := define
102 # uncomment to enable the implicit "host" layer for all system calls
103 # made by perl. This is also needed to get fork(). This needs (and
104 # will auto-enable) USE_MULTI above.
106 USE_IMP_SYS := define
109 # Comment out next assign to disable perl's I/O subsystem and use compiler's
110 # stdio for IO - depending on your compiler vendor and run time library you may
111 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
112 # You will also be unable to take full advantage of perl5.8's support for multiple
113 # encodings and may see lower IO performance. You have been warned.
118 # Comment this out if you don't want to enable large file support for
119 # some reason. Should normally only be changed to maintain compatibility
120 # with an older release of perl.
122 USE_LARGE_FILES := define
125 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
126 # (If you're building a 64-bit perl then you will have 64-bit integers whether
127 # or not this is uncommented.)
128 # Note: This option is not supported in 32-bit MSVC60 builds.
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++ 6.0 (aka Visual C++ 98)
164 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
166 # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
167 #CCTYPE := MSVC70FREE
168 # Windows Server 2003 SP1 Platform SDK (April 2005)
169 #CCTYPE := SDK2003SP1
170 # Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition)
172 # Visual C++ 2008 (aka Visual C++ 9.0) (full version or Express Edition)
174 # Visual C++ 2010 (aka Visual C++ 10.0) (full version or Express Edition)
176 # Visual C++ 2012 (aka Visual C++ 11.0) (full version or Express Edition)
178 # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
180 # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
182 # Visual C++ 2017 (aka Visual C++ 14.1) (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 next line if you want debug version of perl (big/slow)
194 # If not enabled, we automatically try to use maximum optimization
195 # with all compilers that are known to have a working optimizer.
200 # uncomment to enable linking with setargv.obj under the Visual C
201 # compiler. Setting this options enables perl to expand wildcards in
202 # arguments, but it may be harder to use alternate methods like
203 # File::DosGlob that are more powerful. This option is supported only with
206 #USE_SETARGV := define
209 # set this if you wish to use perl's malloc
210 # WARNING: Turning this on/off WILL break binary compatibility with extensions
211 # you may have compiled with/without it. Be prepared to recompile all
212 # extensions if you change the default. Currently, this cannot be enabled
213 # if you ask for USE_IMP_SYS above.
215 #PERL_MALLOC := define
218 # set this to enable debugging mstats
219 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
220 # be enabled without PERL_MALLOC as well.
222 #DEBUG_MSTATS := define
225 # set this to additionally provide a statically linked perl-static.exe.
226 # Note that dynamic loading will not work with this perl, so you must
227 # include required modules statically using the STATIC_EXT or ALL_STATIC
228 # variables below. A static library perl528s.lib will also be created.
229 # Ordinary perl.exe is not affected by this option.
231 #BUILD_STATIC := define
234 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
235 # extension get statically built.
236 # This will result in a very large perl executable, but the main purpose
237 # is to have proper linking set so as to be able to create miscellaneous
238 # executables with different built-in extensions. It implies BUILD_STATIC.
240 #ALL_STATIC := define
243 # set the install locations of the compiler
244 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
250 # Additional compiler flags can be specified here.
252 BUILDOPT := $(BUILDOPTEXTRA)
255 # This should normally be disabled. Enabling it will disable the File::Glob
256 # implementation of CORE::glob.
258 #BUILDOPT += -DPERL_EXTERNAL_GLOB
261 # Perl needs to read scripts in text mode so that the DATA filehandle
262 # works correctly with seek() and tell(), or around auto-flushes of
263 # all filehandles (e.g. by system(), backticks, fork(), etc).
265 # The current version on the ByteLoader module on CPAN however only
266 # works if scripts are read in binary mode. But before you disable text
267 # mode script reading (and break some DATA filehandle functionality)
268 # please check first if an updated ByteLoader isn't available on CPAN.
270 BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
273 # specify semicolon-separated list of extra directories that modules will
274 # look for libraries (spaces in path names need not be quoted)
279 # set this to your email address (perl will guess a value from
280 # from your loginname and your hostname, which may not be right)
285 ## Build configuration ends.
288 ##################### CHANGE THESE ONLY IF YOU MUST #####################
291 DEBUG_MSTATS ?= undef
293 USE_SITECUST ?= undef
295 USE_ITHREADS ?= undef
298 USE_LARGE_FILES ?= undef
299 USE_64_BIT_INT ?= undef
300 USE_LONG_DOUBLE ?= undef
301 DEFAULT_INC_EXCLUDES_DOT ?= undef
302 USE_NO_REGISTRY ?= undef
304 ifeq ($(USE_IMP_SYS),define)
308 ifeq ($(PERL_MALLOC),undef)
312 ifeq ($(DEBUG_MSTATS),define)
313 BUILDOPT += -DPERL_DEBUGGING_MSTATS
316 ifeq ("$(USE_IMP_SYS) $(USE_MULTI)","define undef")
320 ifeq ("$(USE_ITHREADS) $(USE_MULTI)","define undef")
324 ifeq ($(USE_SITECUST),define)
325 BUILDOPT += -DUSE_SITECUSTOMIZE
328 ifneq ($(USE_MULTI),undef)
329 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
332 ifneq ($(USE_IMP_SYS),undef)
333 BUILDOPT += -DPERL_IMPLICIT_SYS
336 ifeq ($(USE_NO_REGISTRY),define)
337 BUILDOPT += -DWIN32_NO_REGISTRY
341 GCCTARGET := $(shell $(GCCBIN) -dumpmachine)
344 #no explicit CCTYPE given, do auto detection
346 GCCTARGET := $(shell $(GCCBIN) -dumpmachine 2>NUL)
348 ifneq ($(GCCTARGET),)
351 #use var to capture 1st line only, not 8th token of lines 2 & 3 in cl.exe output
352 #rmving the cmd /c causes the var2b undef4echo but!4"set MSVCVER", cmd.exe bug?
353 MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=8 delims=.^ " \
354 %%i in ('cl ^2^>^&1') do if not defined MSVCVER set /A "MSVCVER=%%i-6") \
355 & cmd /c echo %%MSVCVER%%)
356 CCTYPE := MSVC$(MSVCVER)0
360 # Versions of Visual C++ up to VC++ 7.1 define $(MSVCDir); versions since then
361 # define $(VCINSTALLDIR) instead, but for VC++ 14.1 we need the subfolder given
362 # by $(VCToolsInstallDir).
366 else ifeq ($(CCTYPE),MSVC60)
368 else ifeq ($(CCTYPE),MSVC70)
370 else ifeq ($(CCTYPE),MSVC70FREE)
372 else ifeq ($(CCTYPE),MSVC141)
373 CCHOME := $(VCToolsInstallDir)
375 CCHOME := $(VCINSTALLDIR)
380 ifeq ($(GCCTARGET),x86_64-w64-mingw32)
382 PROCESSOR_ARCHITECTURE := x64
384 ifeq ($(GCCTARGET),i686-w64-mingw32)
386 PROCESSOR_ARCHITECTURE := x86
390 PROCESSOR_ARCHITECTURE ?= x86
392 ifeq ($(WIN64),undef)
393 PROCESSOR_ARCHITECTURE = x86
397 # When we are running from a 32bit cmd.exe on AMD64 then
398 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
400 ifneq ($(PROCESSOR_ARCHITEW6432),)
401 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
403 else ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
405 else ifeq ($(PROCESSOR_ARCHITECTURE),IA64)
412 ifeq ($(WIN64),define)
413 USE_64_BIT_INT = define
416 # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
417 # both link against MSVCRT.dll (which is part of Windows itself) and
418 # not against a compiler specific versioned runtime.
419 ifeq ("$(WIN64) $(CCTYPE)","define MSVC60")
423 # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
424 # does not support it.
425 ifeq ($(CCTYPE),MSVC60)
426 USE_64_BIT_INT = undef
429 # Disable the long double option for MSVC builds since that compiler
430 # does not support it.
431 ifneq ($(CCTYPE),GCC)
432 USE_LONG_DOUBLE = undef
435 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
436 ifeq ($(ARCHITECTURE),AMD64)
439 ifeq ($(ARCHITECTURE),IA64)
443 ifeq ($(USE_MULTI),define)
444 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
446 ifeq ($(USE_PERLIO),define)
447 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
449 ARCHNAME = MSWin32-$(ARCHITECTURE)
453 ifeq ($(USE_PERLIO),define)
454 BUILDOPT += -DUSE_PERLIO
457 ifeq ($(USE_ITHREADS),define)
458 ARCHNAME := $(ARCHNAME)-thread
461 ifneq ($(WIN64),define)
462 ifeq ($(USE_64_BIT_INT),define)
463 ARCHNAME := $(ARCHNAME)-64int
467 ifeq ($(USE_LONG_DOUBLE),define)
468 ARCHNAME := $(ARCHNAME)-ld
471 # Set the install location of the compiler headers/libraries.
472 # These are saved into $Config{incpath} and $Config{libpth}.
474 CCINCDIR := $(CCHOME)\$(GCCCROSS)\include
475 CCLIBDIR := $(CCHOME)\$(GCCCROSS)\lib
476 ARCHPREFIX := $(GCCCROSS)-
477 else ifeq ($(CCTYPE),GCC)
478 CCINCDIR := $(CCHOME)\include
479 CCLIBDIR := $(CCHOME)\lib
482 CCINCDIR := $(CCHOME)\include
483 ifeq ($(CCTYPE),MSVC141)
484 ifeq ($(WIN64),define)
485 CCLIBDIR := $(CCHOME)\lib\x64
487 CCLIBDIR := $(CCHOME)\lib\x86
490 ifeq ($(WIN64),define)
491 CCLIBDIR := $(CCHOME)\lib\amd64
493 CCLIBDIR := $(CCHOME)\lib
499 # Set DLL location for GCC compilers.
502 CCDLLDIR := $(CCLIBDIR)
504 CCDLLDIR := $(CCHOME)\bin
508 ARCHDIR = ..\lib\$(ARCHNAME)
509 COREDIR = ..\lib\CORE
510 AUTODIR = ..\lib\auto
518 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
519 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
520 INST_LIB = $(INST_TOP)$(INST_VER)\lib
521 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
522 INST_COREDIR = $(INST_ARCHLIB)\CORE
523 INST_HTML = $(INST_TOP)$(INST_VER)\html
526 # Programs to compile, build .lib files and link
533 CC = $(ARCHPREFIX)gcc
534 LINK32 = $(ARCHPREFIX)g++
535 LIB32 = $(ARCHPREFIX)ar rc
536 IMPLIB = $(ARCHPREFIX)dlltool
537 RSC = $(ARCHPREFIX)windres
539 ifeq ($(USE_LONG_DOUBLE),define)
540 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
541 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
542 else ifeq ($(USE_MINGW_ANSI_STDIO),define)
543 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
544 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
547 GCCVER1 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%i)
548 GCCVER2 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%j)
549 GCCVER3 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%k)
551 # If you are using GCC, 4.3 or later by default we add the -fwrapv option.
552 # See https://rt.perl.org/Ticket/Display.html?id=121505
554 GCCWRAPV := $(shell if "$(GCCVER1)"=="4" (if "$(GCCVER2)" geq "3" echo define) else if "$(GCCVER1)" geq "5" (echo define))
556 ifeq ($(GCCWRAPV),define)
558 MINIBUILDOPT += -fwrapv
569 INCLUDES = -I.\include -I. -I..
571 ifeq ($(WIN64),define)
572 DEFINES += -DWIN64 -DCONSERVATIVE
574 LOCDEFS = -DPERLDLL -DPERL_CORE
577 LIBFILES = $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \
578 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \
579 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
582 OPTIMIZE = -g -O2 -DDEBUGGING
590 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
591 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
597 BUILDOPT += -fno-strict-aliasing -mms-bitfields
598 MINIBUILDOPT += -fno-strict-aliasing
600 TESTPREPGCC = test-prep-gcc
606 # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test
607 # suite run in about 10% less time.
608 ifneq ($(CCTYPE),MSVC70FREE)
609 # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
610 # which is rare to execute
611 ifneq ($(USE_NO_REGISTRY),undef)
612 DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
615 DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
616 #miniperl never does any registry lookups
617 MINIDELAYLOAD = -DELAYLOAD:advapi32.dll
621 # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and
622 # DLLs. These either need copying everywhere with the binaries, or else need
623 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
624 # simplicity, embed them if they exist (and delete them afterwards so that they
625 # don't get installed too).
626 EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
627 if exist $@.manifest del $@.manifest
628 EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
629 if exist $@.manifest del $@.manifest
631 # Most relevant compiler-specific options fall into two groups:
632 # either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
633 ifeq ($(CCTYPE),MSVC60)
635 else ifeq ($(CCTYPE),MSVC70)
637 else ifeq ($(CCTYPE),MSVC70FREE)
643 ifneq ($(__ICC),define)
650 LIB32 = $(LINK32) -lib
657 INCLUDES = -I.\include -I. -I..
658 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
659 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
660 LOCDEFS = -DPERLDLL -DPERL_CORE
663 ifeq ($(CCTYPE),MSVC140)
665 else ifeq ($(CCTYPE),MSVC141)
672 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
674 else ifeq ($(CFG),DebugSymbols)
675 OPTIMIZE = -Od -MD -Zi
677 else ifeq ($(CFG),DebugFull)
678 ifeq ($(CCTYPE),MSVC140)
680 else ifeq ($(CCTYPE),MSVC141)
685 OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
688 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
689 OPTIMIZE = -O1 -MD -Zi -DNDEBUG
690 # we enable debug symbols in release builds also
691 LINK_DBG = -debug -opt:ref,icf
692 # you may want to enable this if you want COFF symbols in the executables
693 # in addition to the PDB symbols. The default Dr. Watson that ships with
694 # Windows can use the the former but not latter. The free WinDbg can be
695 # installed to get better stack traces from just the PDB symbols, so we
696 # avoid the bloat of COFF symbols by default.
697 #LINK_DBG = $(LINK_DBG) -debugtype:both
698 ifneq ($(CCTYPE),MSVC60)
699 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
706 ifeq ($(WIN64),define)
707 DEFINES += -DWIN64 -DCONSERVATIVE
708 OPTIMIZE += -fp:precise
711 # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions
712 # and POSIX CRT function names being deprecated.
713 ifeq ($(PREMSVC80),undef)
714 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
717 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
718 ifeq ($(CCTYPE),MSVC140)
719 DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS
720 else ifeq ($(CCTYPE),MSVC141)
721 DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS
724 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
725 # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
726 # preprocessor option to revert back to the old functionality for
727 # backward compatibility. We define this symbol here for older 32-bit
728 # compilers only (which aren't using it at all) for the sole purpose
729 # of getting it into $Config{ccflags}. That way if someone builds
730 # Perl itself with e.g. VC6 but later installs an XS module using VC8
731 # the time_t types will still be compatible.
732 ifeq ($(WIN64),undef)
733 ifeq ($(PREMSVC80),define)
734 BUILDOPT += -D_USE_32BIT_TIME_T
738 LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
739 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
740 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
741 odbc32.lib odbccp32.lib comctl32.lib
743 ifeq ($(CCTYPE),MSVC140)
744 ifeq ($(CFG),DebugFull)
745 LIBBASEFILES += msvcrtd.lib vcruntimed.lib
747 LIBBASEFILES += msvcrt.lib vcruntime.lib
749 else ifeq ($(CCTYPE),MSVC141)
750 ifeq ($(CFG),DebugFull)
751 LIBBASEFILES += msvcrtd.lib vcruntimed.lib
753 LIBBASEFILES += msvcrt.lib vcruntime.lib
757 # Avoid __intel_new_proc_init link error for libircmt.
758 # libmmd is /MD equivelent, other variants exist.
759 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
760 # and optimized C89 funcs
761 ifeq ($(__ICC),define)
762 LIBBASEFILES += libircmt.lib libmmd.lib
765 # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which
766 # doesn't include the buffer overrun verification code used by the /GS switch.
767 # Since the code links against libraries that are compiled with /GS, this
768 # "security cookie verification" code must be included via bufferoverflow.lib.
769 ifeq ("$(WIN64) $(CCTYPE)","define SDK2003SP1")
770 LIBBASEFILES += bufferoverflowU.lib
773 LIBFILES = $(LIBBASEFILES) $(LIBC)
775 EXTRACFLAGS = -nologo -GF -W3
776 ifeq ($(__ICC),define)
777 EXTRACFLAGS += -Qstd=c99
779 ifeq ($(USE_CPLUSPLUS),define)
780 EXTRACFLAGS += $(CXX_FLAG)
782 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
783 $(PCHFLAGS) $(OPTIMIZE)
784 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
785 -libpath:"$(INST_COREDIR)" \
786 -machine:$(PROCESSOR_ARCHITECTURE)
796 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
798 ifeq ($(PREMSVC80),undef)
799 PRIV_LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
801 RSC_FLAGS = -DINCLUDE_MANIFEST
804 # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
806 # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
807 # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
808 # Console vs GUI makes no difference for DLLs, so use default for cleaner
811 ifeq ($(CCTYPE),MSVC120)
812 ifeq ($(WIN64),define)
813 LINK_FLAGS += -subsystem:console,"5.02"
815 LINK_FLAGS += -subsystem:console,"5.01"
818 else ifeq ($(CCTYPE),MSVC140)
819 ifeq ($(WIN64),define)
820 LINK_FLAGS += -subsystem:console,"5.02"
822 LINK_FLAGS += -subsystem:console,"5.01"
825 else ifneq ($(CCTYPE),GCC)
826 PRIV_LINK_FLAGS += -subsystem:console
829 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
831 #################### do not edit below this line #######################
832 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
834 #prevent -j from reaching EUMM/make_ext.pl/"sub makes", Win32 EUMM not parallel
840 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
843 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) $<
846 $(CC) -c -I$(<D) $(CFLAGS_O) -E $< >$@
852 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
853 $(IMPLIB) --input-def $(*F).def --output-lib $(*F).a $@
857 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
859 $(RSC) -i.. -DINCLUDE_MANIFEST $<
865 #do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL)
866 #$(MINIPERL) is not a buildable target, use "gmake mp" if you want to just build
868 MINIPERL = ..\miniperl.exe
869 HAVEMINIPERL = ..\lib\buildcustomize.pl
871 PERLEXE = ..\perl.exe
872 WPERLEXE = ..\wperl.exe
873 PERLEXESTATIC = ..\perl-static.exe
874 STATICDIR = .\static.tmp
875 GLOBEXE = ..\perlglob.exe
876 CONFIGPM = ..\lib\Config.pm
877 GENUUDMAP = ..\generate_uudmap.exe
878 ifeq ($(BUILD_STATIC),define)
881 ifeq ($(ALL_STATIC),define)
888 # Unicode data files generated by mktables
889 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
890 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
891 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
892 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
894 # Directories of Unicode data files generated by mktables
895 UNIDATADIR1 = ..\lib\unicore\To
896 UNIDATADIR2 = ..\lib\unicore\lib
898 PERLEXE_MANIFEST= .\perlexe.manifest
899 PERLEXE_ICO = .\perlexe.ico
900 PERLEXE_RES = .\perlexe.res
903 # Nominate a target which causes extensions to be re-built
904 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
905 # on and really only the interface - i.e. the .def file used to export symbols
907 PERLDEP = $(PERLIMPLIB)
910 PL2BAT = bin\pl2bat.pl
932 ..\utils\zipdetails \
944 CFGSH_TMPL = config.gc
945 CFGH_TMPL = config_H.gc
946 PERLIMPLIB = $(COREDIR)\libperl528$(a)
947 PERLIMPLIBBASE = libperl528$(a)
948 PERLSTATICLIB = ..\libperl528s$(a)
953 CFGSH_TMPL = config.vc
954 CFGH_TMPL = config_H.vc
959 # makedef.pl must be updated if this changes, and this should normally
960 # only change when there is an incompatible revision of the public API.
961 PERLIMPLIB ?= $(COREDIR)\perl528$(a)
962 PERLIMPLIBBASE ?= perl528$(a)
963 PERLEXPLIB ?= $(COREDIR)\perl528.exp
964 PERLSTATICLIB ?= ..\perl528s$(a)
965 PERLDLL = ..\perl528.dll
966 PERLDLLBASE = perl528.dll
968 # don't let "gmake -n all" try to run "miniperl.exe make_ext.pl"
971 XCOPY = xcopy /f /r /i /d /y
972 RCOPY = xcopy /f /r /i /e /d /y
975 #first ones are arrange in compile time order for faster parallel building
976 #see #123867 for details
1018 EXTRACORE_SRC += perllib.c
1020 ifeq ($(PERL_MALLOC),define)
1021 EXTRACORE_SRC += ..\malloc.c
1024 EXTRACORE_SRC += ..\perlio.c
1032 # We need this for miniperl build unless we override canned
1033 # config.h #define building mini\*
1034 #ifeq ($(USE_PERLIO)" == "define"
1035 WIN32_SRC += .\win32io.c
1073 .\include\dirent.h \
1075 .\include\sys\errno2.h \
1076 .\include\sys\socket.h \
1079 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
1081 UUDMAP_H = ..\uudmap.h
1082 BITCOUNT_H = ..\bitcount.h
1083 MG_DATA_H = ..\mg_data.h
1084 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
1086 HAVE_COREDIR = .coreheaders
1088 MICROCORE_OBJ = $(MICROCORE_SRC:.c=$(o))
1089 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=$(o))
1090 WIN32_OBJ = $(WIN32_SRC:.c=$(o))
1092 MINICORE_OBJ = $(subst ..\,mini\,$(MICROCORE_OBJ)) \
1093 $(MINIDIR)\miniperlmain$(o) \
1094 $(MINIDIR)\perlio$(o)
1095 MINIWIN32_OBJ = $(subst .\,mini\,$(WIN32_OBJ))
1096 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
1097 DLL_OBJ = $(DYNALOADER)
1099 PERLDLL_OBJ = $(CORE_OBJ)
1100 PERLEXE_OBJ = perlmain$(o)
1101 PERLEXEST_OBJ = perlmainst$(o)
1103 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
1105 ifneq ($(USE_SETARGV),)
1106 SETARGV_OBJ = setargv$(o)
1109 ifeq ($(ALL_STATIC),define)
1110 # some exclusions, unfortunately, until fixed:
1111 # - MakeMaker isn't capable enough for SDBM_File (small bug)
1112 STATIC_EXT = * !SDBM_File
1113 NORMALIZE_STATIC = Normalize_static
1115 # specify static extensions here, for example:
1116 # (be sure to include Win32CORE to load Win32 on demand)
1117 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
1118 STATIC_EXT = Win32CORE
1119 NORMALIZE_DYN = Normalize_dyn
1122 DYNALOADER = ..\DynaLoader$(o)
1124 # vars must be separated by "\t+~\t+", since we're using the tempfile
1125 # version of config_sh.pl (we were overflowing someone's buffer by
1126 # trying to fit them all on the command line)
1129 "INST_TOP=$(INST_TOP)" \
1130 "INST_VER=$(INST_VER)" \
1131 "INST_ARCH=$(INST_ARCH)" \
1132 "archname=$(ARCHNAME)" \
1135 "ccflags=$(subst ",\",$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT))" \
1136 "usecplusplus=$(USE_CPLUSPLUS)" \
1137 "cf_email=$(EMAIL)" \
1138 "d_mymalloc=$(PERL_MALLOC)" \
1139 "libs=$(LIBFILES)" \
1140 "incpath=$(subst ",\",$(CCINCDIR))" \
1141 "libperl=$(subst ",\",$(PERLIMPLIBBASE))" \
1142 "libpth=$(subst ",\",$(CCLIBDIR);$(EXTRALIBDIRS))" \
1149 "static_ext=$(STATIC_EXT)" \
1150 "usethreads=$(USE_ITHREADS)" \
1151 "useithreads=$(USE_ITHREADS)" \
1152 "usemultiplicity=$(USE_MULTI)" \
1153 "useperlio=$(USE_PERLIO)" \
1154 "use64bitint=$(USE_64_BIT_INT)" \
1155 "uselongdouble=$(USE_LONG_DOUBLE)" \
1156 "uselargefiles=$(USE_LARGE_FILES)" \
1157 "usesitecustomize=$(USE_SITECUST)" \
1158 "default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)" \
1159 "LINK_FLAGS=$(subst ",\",$(LINK_FLAGS))"\
1160 "optimize=$(subst ",\",$(OPTIMIZE))" \
1161 "ARCHPREFIX=$(ARCHPREFIX)" \
1170 all : info rebasePE Extensions_nonxs $(PERLSTATIC) PostExt
1173 @echo # CCTYPE=$(CCTYPE)
1174 ifeq ($(CCTYPE),GCC)
1175 @echo # GCCBIN=$(GCCBIN)
1176 @echo # GCCVER=$(GCCVER1).$(GCCVER2).$(GCCVER3)
1177 @echo # GCCTARGET=$(GCCTARGET)
1178 @echo # GCCCROSS=$(GCCCROSS)
1180 @echo # WIN64=$(WIN64)
1181 @echo # ARCHITECTURE=$(ARCHITECTURE)
1182 @echo # ARCHNAME=$(ARCHNAME)
1183 @echo # MAKE=$(PLMAKE)
1185 @echo Unable to detect gcc and/or architecture!
1190 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
1192 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
1194 reonly : ..\regnodes.h .\config.h ..\git_version.h $(GLOBEXE) $(HAVEMINIPERL)\
1195 $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
1198 static: $(PERLEXESTATIC)
1200 #----------------------------------------------------------------
1202 $(GLOBEXE) : perlglob.c
1203 ifeq ($(CCTYPE),GCC)
1204 $(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
1206 $(CC) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \
1207 setargv$(o) $(LIBFILES) && $(EMBED_EXE_MANI)
1210 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
1211 $(MINIPERL) -I..\lib ..\make_patchnum.pl
1213 # make sure that we recompile perl.c if the git version changes
1214 ..\perl$(o) : ..\git_version.h
1216 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL)
1217 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
1219 # This target is for when changes to the main config.sh happen.
1220 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1221 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
1222 # this target to regenerate config_H.gc.
1224 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
1225 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1226 -del /f $(CFGH_TMPL)
1227 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1228 rename config.h $(CFGH_TMPL)
1230 $(CONFIGPM): ..\config.sh config_h.PL
1231 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1232 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1234 .\config.h : $(CONFIGPM)
1236 # See the comment in Makefile.SH explaining this seemingly cranky ordering
1237 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
1238 ifeq ($(CCTYPE),GCC)
1239 $(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
1241 $(LINK32) -out:$(MINIPERL) $(BLINK_FLAGS) \
1242 $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)
1243 $(subst $@,$(MINIPERL),$(EMBED_EXE_MANI))
1246 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1248 #convinence target, get a working miniperl
1251 $(MINIDIR)\.exists : $(CFGH_TMPL)
1252 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1254 # Copy the template config.h and set configurables at the end of it
1255 # as per the options chosen and compiler used.
1256 # Note: This config.h is only used to build miniperl.exe anyway, but
1257 # it's as well to have its options correct to be sure that it builds
1258 # and so that it's "-V" options are correct for use by makedef.pl. The
1259 # real config.h used to build perl.exe is generated from the top-level
1260 # config_h.SH by config_h.PL (run by miniperl.exe).
1262 # MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd
1263 # config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ).
1264 copy $(CFGH_TMPL) config.h
1266 echo #ifndef _config_h_footer_&& \
1267 echo #define _config_h_footer_&& \
1268 echo #undef Off_t&& \
1269 echo #undef LSEEKSIZE&& \
1270 echo #undef Off_t_size&& \
1271 echo #undef PTRSIZE&& \
1272 echo #undef SSize_t&& \
1273 echo #undef HAS_ATOLL&& \
1274 echo #undef HAS_STRTOLL&& \
1275 echo #undef HAS_STRTOULL&& \
1276 echo #undef Size_t_size&& \
1277 echo #undef IVTYPE&& \
1278 echo #undef UVTYPE&& \
1279 echo #undef IVSIZE&& \
1280 echo #undef UVSIZE&& \
1281 echo #undef NV_PRESERVES_UV&& \
1282 echo #undef NV_PRESERVES_UV_BITS&& \
1283 echo #undef IVdf&& \
1284 echo #undef UVuf&& \
1285 echo #undef UVof&& \
1286 echo #undef UVxf&& \
1287 echo #undef UVXf&& \
1288 echo #undef USE_64_BIT_INT&& \
1289 echo #undef Gconvert&& \
1290 echo #undef HAS_FREXPL&& \
1291 echo #undef HAS_ISNANL&& \
1292 echo #undef HAS_MODFL&& \
1293 echo #undef HAS_MODFL_PROTO&& \
1294 echo #undef HAS_SQRTL&& \
1295 echo #undef HAS_STRTOLD&& \
1296 echo #undef PERL_PRIfldbl&& \
1297 echo #undef PERL_PRIgldbl&& \
1298 echo #undef PERL_PRIeldbl&& \
1299 echo #undef PERL_SCNfldbl&& \
1300 echo #undef NVTYPE&& \
1301 echo #undef NVSIZE&& \
1302 echo #undef LONG_DOUBLESIZE&& \
1303 echo #undef NV_OVERFLOWS_INTEGERS_AT&& \
1304 echo #undef NVef&& \
1305 echo #undef NVff&& \
1306 echo #undef NVgf&& \
1307 echo #undef USE_LONG_DOUBLE)>> config.h
1308 ifeq ($(CCTYPE),MSVC140)
1309 @(echo #undef FILE_ptr&& \
1310 echo #undef FILE_cnt&& \
1311 echo #undef FILE_base&& \
1312 echo #undef FILE_bufsiz&& \
1313 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1314 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1315 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1316 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1317 echo #define I_STDBOOL)>> config.h
1318 else ifeq ($(CCTYPE),MSVC141)
1319 @(echo #undef FILE_ptr&& \
1320 echo #undef FILE_cnt&& \
1321 echo #undef FILE_base&& \
1322 echo #undef FILE_bufsiz&& \
1323 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1324 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1325 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1326 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1327 echo #define I_STDBOOL)>> config.h
1329 ifeq ($(USE_LARGE_FILES),define)
1330 @(echo #define Off_t $(INT64)&& \
1331 echo #define LSEEKSIZE ^8&& \
1332 echo #define Off_t_size ^8)>> config.h
1334 @(echo #define Off_t long&& \
1335 echo #define LSEEKSIZE ^4&& \
1336 echo #define Off_t_size ^4)>> config.h
1338 ifeq ($(WIN64),define)
1339 ifeq ($(CCTYPE),GCC)
1340 @(echo #define LONG_DOUBLESIZE ^16)>> config.h
1342 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1344 @(echo #define PTRSIZE ^8&& \
1345 echo #define SSize_t $(INT64)&& \
1346 echo #define HAS_ATOLL&& \
1347 echo #define HAS_STRTOLL&& \
1348 echo #define HAS_STRTOULL&& \
1349 echo #define Size_t_size ^8)>> config.h
1351 ifeq ($(CCTYPE),GCC)
1352 @(echo #define LONG_DOUBLESIZE ^12)>> config.h
1354 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1356 @(echo #define PTRSIZE ^4&& \
1357 echo #define SSize_t int&& \
1358 echo #undef HAS_ATOLL&& \
1359 echo #undef HAS_STRTOLL&& \
1360 echo #undef HAS_STRTOULL&& \
1361 echo #define Size_t_size ^4)>> config.h
1363 ifeq ($(USE_64_BIT_INT),define)
1364 @(echo #define IVTYPE $(INT64)&& \
1365 echo #define UVTYPE unsigned $(INT64)&& \
1366 echo #define IVSIZE ^8&& \
1367 echo #define UVSIZE ^8)>> config.h
1368 ifeq ($(USE_LONG_DOUBLE),define)
1369 @(echo #define NV_PRESERVES_UV&& \
1370 echo #define NV_PRESERVES_UV_BITS 64)>> config.h
1372 @(echo #undef NV_PRESERVES_UV&& \
1373 echo #define NV_PRESERVES_UV_BITS 53)>> config.h
1375 @(echo #define IVdf "I64d"&& \
1376 echo #define UVuf "I64u"&& \
1377 echo #define UVof "I64o"&& \
1378 echo #define UVxf "I64x"&& \
1379 echo #define UVXf "I64X"&& \
1380 echo #define USE_64_BIT_INT)>> config.h
1382 @(echo #define IVTYPE long&& \
1383 echo #define UVTYPE unsigned long&& \
1384 echo #define IVSIZE ^4&& \
1385 echo #define UVSIZE ^4&& \
1386 echo #define NV_PRESERVES_UV&& \
1387 echo #define NV_PRESERVES_UV_BITS 32&& \
1388 echo #define IVdf "ld"&& \
1389 echo #define UVuf "lu"&& \
1390 echo #define UVof "lo"&& \
1391 echo #define UVxf "lx"&& \
1392 echo #define UVXf "lX"&& \
1393 echo #undef USE_64_BIT_INT)>> config.h
1395 ifeq ($(USE_LONG_DOUBLE),define)
1396 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*""Lg",^(n^),^(x^)^)&& \
1397 echo #define HAS_FREXPL&& \
1398 echo #define HAS_ISNANL&& \
1399 echo #define HAS_MODFL&& \
1400 echo #define HAS_MODFL_PROTO&& \
1401 echo #define HAS_SQRTL&& \
1402 echo #define HAS_STRTOLD&& \
1403 echo #define PERL_PRIfldbl "Lf"&& \
1404 echo #define PERL_PRIgldbl "Lg"&& \
1405 echo #define PERL_PRIeldbl "Le"&& \
1406 echo #define PERL_SCNfldbl "Lf"&& \
1407 echo #define NVTYPE long double&& \
1408 echo #define NVSIZE LONG_DOUBLESIZE&& \
1409 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&& \
1410 echo #define NVef "Le"&& \
1411 echo #define NVff "Lf"&& \
1412 echo #define NVgf "Lg"&& \
1413 echo #define USE_LONG_DOUBLE)>> config.h
1415 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*g",^(n^),^(x^)^)&& \
1416 echo #undef HAS_FREXPL&& \
1417 echo #undef HAS_ISNANL&& \
1418 echo #undef HAS_MODFL&& \
1419 echo #undef HAS_MODFL_PROTO&& \
1420 echo #undef HAS_SQRTL&& \
1421 echo #undef HAS_STRTOLD&& \
1422 echo #undef PERL_PRIfldbl&& \
1423 echo #undef PERL_PRIgldbl&& \
1424 echo #undef PERL_PRIeldbl&& \
1425 echo #undef PERL_SCNfldbl&& \
1426 echo #define NVTYPE double&& \
1427 echo #define NVSIZE ^8&& \
1428 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&& \
1429 echo #define NVef "e"&& \
1430 echo #define NVff "f"&& \
1431 echo #define NVgf "g"&& \
1432 echo #undef USE_LONG_DOUBLE)>> config.h
1434 ifeq ($(USE_CPLUSPLUS),define)
1435 @(echo #define USE_CPLUSPLUS&& \
1436 echo #endif)>> config.h
1438 @(echo #undef USE_CPLUSPLUS&& \
1439 echo #endif)>> config.h
1441 #separate line since this is sentinal that this target is done
1442 rem. > $(MINIDIR)\.exists
1444 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1445 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*F).c
1447 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1448 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*F).c
1450 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1451 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1452 # unless the .IF is true), so instead we use a .ELSE with the default.
1453 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1455 perllib$(o) : perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h
1456 ifeq ($(USE_IMP_SYS),define)
1457 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1459 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1462 # 1. we don't want to rebuild miniperl.exe when config.h changes
1463 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1464 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1465 $(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H)
1467 $(WIN32_OBJ) : $(CORE_H)
1469 $(CORE_OBJ) : $(CORE_H)
1471 $(DLL_OBJ) : $(CORE_H)
1474 perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl
1475 $(MINIPERL) -I..\lib create_perllibst_h.pl
1477 perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
1478 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1479 $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1481 $(PERLEXPLIB) : $(PERLIMPLIB)
1483 $(PERLIMPLIB) : perldll.def
1484 ifeq ($(CCTYPE),GCC)
1485 $(IMPLIB) -k -d perldll.def -D $(PERLDLLBASE) -l $(PERLIMPLIB) -e $(PERLEXPLIB)
1487 lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
1490 $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1491 ifeq ($(CCTYPE),GCC)
1492 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1493 $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) $(PERLEXPLIB)
1495 $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \
1496 @Extensions_static \
1497 -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
1498 $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB)
1502 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1503 ifeq ($(CCTYPE),GCC)
1504 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1505 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1506 for %%i in ($(shell type Extensions_static)) do \
1507 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1508 $(ARCHPREFIX)ar x ..\%%i && \
1509 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1510 cd .. && rmdir /s /q $(STATICDIR)
1512 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1515 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1517 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1519 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1521 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1523 $(BITCOUNT_H) : $(GENUUDMAP)
1524 $(GENUUDMAP) $(GENERATED_HEADERS)
1526 $(GENUUDMAP) : ..\mg_raw.h
1527 ifeq ($(CCTYPE),GCC)
1528 $(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
1529 $(BLINK_FLAGS) $(LIBFILES)
1531 $(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c -link $(LIBFILES) $(BLINK_FLAGS)
1537 MakePPPort : $(HAVEMINIPERL) $(CONFIGPM)
1538 $(MINIPERL) -I..\lib ..\mkppport
1540 # also known as $(HAVE_COREDIR)
1541 .coreheaders : $(CORE_H)
1542 $(XCOPY) *.h $(COREDIR)\\*.*
1543 $(RCOPY) include $(COREDIR)\\*.*
1544 $(XCOPY) ..\\*.h $(COREDIR)\\*.*
1547 perlmain$(o) : runperl.c $(CONFIGPM)
1548 $(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1550 perlmainst$(o) : runperl.c $(CONFIGPM)
1551 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1553 $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
1554 ifeq ($(CCTYPE),GCC)
1555 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1556 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1558 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1559 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1562 copy $(PERLEXE) $(WPERLEXE)
1563 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1565 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1566 ifeq ($(CCTYPE),GCC)
1567 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1568 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1570 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1571 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1575 #-------------------------------------------------------------------------------
1576 # There's no direct way to mark a dependency on
1577 # DynaLoader.pm, so this will have to do
1579 #most of deps of this target are in DYNALOADER and therefore omitted here
1580 Extensions : $(PERLDEP) $(DYNALOADER) Extension_lib $(GLOBEXE) MakePPPort
1581 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
1583 Normalize_static : $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) $(UNIDATAFILES)
1584 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static +Unicode/Normalize
1586 Normalize_dyn : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
1587 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
1589 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
1590 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1592 Exts_static_general : ..\make_ext.pl $(CONFIGPM) Extension_lib $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
1593 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static !Unicode/Normalize
1595 Extensions_static : list_static_libs.pl Exts_static_general $(NORMALIZE_STATIC)
1596 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1598 Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
1599 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
1601 Extension_lib : ..\make_ext.pl $(CONFIGPM)
1602 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) lib
1604 #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
1605 $(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
1606 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader
1609 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1611 Extensions_realclean :
1612 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1614 PostExt : ..\lib\Storable\Limit.pm
1616 # we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions
1617 # rebasePE most of that, including adjustment for static builds, so we
1618 # just need non-xs extensions
1619 ..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs
1620 $(PLMAKE) -C ..\dist\Storable lib\Storable\Limit.pm
1621 if not exist ..\lib\Storable mkdir ..\lib\Storable
1622 copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm
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 ifeq ($(PERLSTATIC),static)
1628 rebasePE : Extensions $(PERLDLL) $(PERLEXE) $(PERLEXESTATIC)
1630 rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
1634 #-------------------------------------------------------------------------------
1636 doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod
1637 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1638 --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
1641 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1642 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1644 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1645 # so please check that script before making structural changes here
1646 utils: $(HAVEMINIPERL) ..\utils\Makefile
1647 cd ..\utils && $(PLMAKE) PERL=$(MINIPERL)
1648 copy ..\README.aix ..\pod\perlaix.pod
1649 copy ..\README.amiga ..\pod\perlamiga.pod
1650 copy ..\README.android ..\pod\perlandroid.pod
1651 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1652 copy ..\README.ce ..\pod\perlce.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\perl5280delta.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 $(LIBDIR)\Storable\Limit.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 perl5280delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1780 perlapi.pod perlbs2000.pod perlce.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)\$(NULL)
1815 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\$(NULL)
1816 $(XCOPY) $(GLOBEXE) $(INST_BIN)\$(NULL)
1817 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\$(NULL)
1818 $(XCOPY) "bin\*.bat" $(INST_SCRIPT)\$(NULL)
1821 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\$(NULL)
1823 inst_lib : $(CONFIGPM)
1824 $(RCOPY) ..\lib $(INST_LIB)\$(NULL)
1826 $(UNIDATAFILES) : ..\pod\perluniprops.pod
1828 ..\pod\perluniprops.pod: ..\lib\unicore\mktables $(CONFIGPM)
1829 $(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
1831 minitest : $(HAVEMINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1832 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1833 if exist ..\t\perl.exe del /f ..\t\perl.exe
1834 rename ..\t\miniperl.exe perl.exe
1835 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1836 attrib -r "..\t\*.*"
1838 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
1840 test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC)
1841 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1842 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1843 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1844 # If building with gcc versions 4.x.x or greater, then
1845 # the GCC helper DLL will also need copied to the test directory.
1846 # The name of the dll can change, depending upon which vendor has supplied
1847 # your compiler, and upon the values of "x".
1848 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1849 # Without this copying, the op/taint.t test script will fail.
1851 ifeq ($(CCTYPE),GCC)
1854 if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
1855 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1856 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1857 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1858 if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
1863 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1864 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1866 test_porting : test-prep
1867 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1868 cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1870 test-reonly : reonly utils
1871 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1872 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1873 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1874 cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA)
1879 test-notty : test-prep
1880 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1881 set PERL_SKIP_TTY_TEST=1 && \
1882 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1885 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1886 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1887 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1888 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1889 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1892 -@erase miniperlmain$(o)
1894 -@erase perlglob$(o)
1895 -@erase perlmain$(o)
1896 -@erase perlmainst$(o)
1898 -@erase /f ..\git_version.h
1902 -@erase $(PERLEXESTATIC)
1903 -@erase $(PERLSTATICLIB)
1906 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1907 -@erase .coreheaders
1908 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1909 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1910 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1911 -@erase $(UNIDATAFILES)
1912 -@erase $(WIN32_OBJ)
1914 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1915 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1917 -@erase *.pdb ..\*.pdb
1918 -@erase Extensions_static
1920 clean : Extensions_clean _clean
1922 realclean : Extensions_realclean _clean
1924 # Handy way to run perlbug -ok without having to install and run the
1925 # installed perlbug. We don't re-run the tests here - we trust the user.
1926 # Please *don't* use this unless all tests pass.
1927 # If you want to report test failures, use "gmake nok" instead.
1928 ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1929 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
1931 okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1932 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1934 nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1935 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
1937 nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1938 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok