"Fossies" - the Fresh Open Source Software Archive

Member "perl-5.30.3/win32/GNUmakefile" (14 May 2020, 63812 Bytes) of package /linux/misc/perl-5.30.3.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "GNUmakefile": 5.30.2_vs_5.30.3.

    1 #
    2 # Makefile to build perl on Windows using GMAKE.
    3 # Supported compilers:
    4 #	Microsoft Visual C++ 6.0 or later
    5 #	MinGW with gcc-3.4.5 or later with runtime < 3.21
    6 #	MinGW64 with gcc-4.4.3 or later
    7 #	Windows SDK 64-bit compiler and tools
    8 #
    9 # This is set up to build a perl.exe that runs off a shared library
   10 # (perl530.dll).  Also makes individual DLLs for the XS extensions.
   11 #
   12 # The easiest way to customize the build process is to use parameters like this:
   13 #
   14 # c:\dev\perlsrc\win32> gmake INST_TOP=c:\sw\perl CCHOME=c:\sw\mingw USE_64_BIT_INT=define
   15 
   16 
   17 ##
   18 ## Make sure you read README.win32 *before* you mess with anything here!
   19 ##
   20 
   21 #
   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
   24 #
   25 SHELL := cmd.exe
   26 
   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
   31 GCCBIN := gcc
   32 
   33 ifeq ($(GCCBIN),x86_64-w64-mingw32-gcc)
   34 GCCCROSS := x86_64-w64-mingw32
   35 endif
   36 ifeq ($(GCCBIN),i686-w64-mingw32-gcc)
   37 GCCCROSS := i686-w64-mingw32
   38 endif
   39 
   40 
   41 ##
   42 ## Build configuration.  Edit the values below to suit your needs.
   43 ##
   44 
   45 #
   46 # Set these to wherever you want "gmake install" to put your
   47 # newly built perl.
   48 #
   49 INST_DRV := c:
   50 INST_TOP := $(INST_DRV)\perl
   51 
   52 #
   53 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
   54 # on a 64-bit version of Windows.
   55 #
   56 #WIN64		:= undef
   57 
   58 #
   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.
   66 #
   67 #INST_VER	:= \5.30.3
   68 
   69 #
   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.
   77 #
   78 #INST_ARCH	:= \$(ARCHNAME)
   79 
   80 #
   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.
   85 #
   86 #USE_SITECUST	:= define
   87 
   88 #
   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.
   92 #
   93 USE_MULTI	:= define
   94 
   95 #
   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.
   99 #
  100 USE_ITHREADS	:= define
  101 
  102 #
  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.
  106 #
  107 USE_IMP_SYS	:= define
  108 
  109 #
  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.
  115 #
  116 USE_PERLIO	:= define
  117 
  118 #
  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.
  122 #
  123 USE_LARGE_FILES	:= define
  124 
  125 #
  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.)
  129 # Note: This option is not supported in 32-bit MSVC60 builds.
  130 #
  131 #USE_64_BIT_INT	:= define
  132 
  133 #
  134 # Uncomment this if you want to support the use of long doubles in GCC builds.
  135 # This option is not supported for MSVC builds.
  136 #
  137 #USE_LONG_DOUBLE := define
  138 
  139 #
  140 # Uncomment this if you want to build perl with __USE_MINGW_ANSI_STDIO defined.
  141 # (If you're building perl with USE_LONG_DOUBLE defined then
  142 # __USE_MINGW_ANSI_STDIO will be defined whether or not this is uncommented.)
  143 # This option is not supported for MSVC builds.
  144 #
  145 #USE_MINGW_ANSI_STDIO := define
  146 
  147 #
  148 # Comment this out if you want the legacy default behavior of including '.' at
  149 # the end of @INC.
  150 #
  151 DEFAULT_INC_EXCLUDES_DOT := define
  152 
  153 #
  154 # Uncomment this if you want to disable looking up values from
  155 # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
  156 # the Registry.
  157 #
  158 #USE_NO_REGISTRY := define
  159 
  160 #
  161 # uncomment exactly one of the following
  162 #
  163 # Visual C++ 6.0 (aka Visual C++ 98)
  164 #CCTYPE		:= MSVC60
  165 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
  166 #CCTYPE		:= MSVC70
  167 # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
  168 #CCTYPE		:= MSVC70FREE
  169 # Windows Server 2003 SP1 Platform SDK (April 2005) (64-bit compiler and tools)
  170 #CCTYPE		:= SDK2003SP1
  171 # Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition)
  172 #CCTYPE		:= MSVC80
  173 # Visual C++ 2008 (aka Visual C++ 9.0) (full version or Express Edition)
  174 #CCTYPE		:= MSVC90
  175 # Visual C++ 2010 (aka Visual C++ 10.0) (full version or Express Edition)
  176 #CCTYPE		:= MSVC100
  177 # Visual C++ 2012 (aka Visual C++ 11.0) (full version or Express Edition)
  178 #CCTYPE		:= MSVC110
  179 # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
  180 #CCTYPE		:= MSVC120
  181 # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
  182 #CCTYPE		:= MSVC140
  183 # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition)
  184 #CCTYPE		:= MSVC141
  185 # Visual C++ 2019 (aka Visual C++ 14.2) (full version or Community Edition)
  186 #CCTYPE		:= MSVC142
  187 # MinGW or mingw-w64 with gcc-3.4.5 or later
  188 #CCTYPE		:= GCC
  189 
  190 #
  191 # If you are using Intel C++ Compiler uncomment this
  192 #
  193 #__ICC		:= define
  194 
  195 #
  196 # Uncomment this if you want to build everything in C++ mode
  197 #
  198 #USE_CPLUSPLUS	:= define
  199 
  200 #
  201 # uncomment next line if you want debug version of perl (big/slow)
  202 # If not enabled, we automatically try to use maximum optimization
  203 # with all compilers that are known to have a working optimizer.
  204 #
  205 #CFG		:= Debug
  206 
  207 #
  208 # uncomment to enable linking with setargv.obj under the Visual C
  209 # compiler. Setting this options enables perl to expand wildcards in
  210 # arguments, but it may be harder to use alternate methods like
  211 # File::DosGlob that are more powerful.  This option is supported only with
  212 # Visual C.
  213 #
  214 #USE_SETARGV	:= define
  215 
  216 #
  217 # set this if you wish to use perl's malloc
  218 # WARNING: Turning this on/off WILL break binary compatibility with extensions
  219 # you may have compiled with/without it.  Be prepared to recompile all
  220 # extensions if you change the default.  Currently, this cannot be enabled
  221 # if you ask for USE_IMP_SYS above.
  222 #
  223 #PERL_MALLOC	:= define
  224 
  225 #
  226 # set this to enable debugging mstats
  227 # This must be enabled to use the Devel::Peek::mstat() function.  This cannot
  228 # be enabled without PERL_MALLOC as well.
  229 #
  230 #DEBUG_MSTATS	:= define
  231 
  232 #
  233 # set this to additionally provide a statically linked perl-static.exe.
  234 # Note that dynamic loading will not work with this perl, so you must
  235 # include required modules statically using the STATIC_EXT or ALL_STATIC
  236 # variables below. A static library perl530s.lib will also be created.
  237 # Ordinary perl.exe is not affected by this option.
  238 #
  239 #BUILD_STATIC	:= define
  240 
  241 #
  242 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
  243 # extension get statically built.
  244 # This will result in a very large perl executable, but the main purpose
  245 # is to have proper linking set so as to be able to create miscellaneous
  246 # executables with different built-in extensions. It implies BUILD_STATIC.
  247 #
  248 #ALL_STATIC	:= define
  249 
  250 #
  251 # set the install locations of the compiler
  252 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
  253 # Visual C++.
  254 #
  255 # For GCC builds this should be the directory containing the bin, include,
  256 # lib directories for your compiler.
  257 #
  258 #CCHOME		:= C:\MinGW
  259 
  260 #
  261 # Additional compiler flags can be specified here.
  262 #
  263 BUILDOPT	:= $(BUILDOPTEXTRA)
  264 
  265 #
  266 # This should normally be disabled.  Enabling it will disable the File::Glob
  267 # implementation of CORE::glob.
  268 #
  269 #BUILDOPT	+= -DPERL_EXTERNAL_GLOB
  270 
  271 #
  272 # Perl needs to read scripts in text mode so that the DATA filehandle
  273 # works correctly with seek() and tell(), or around auto-flushes of
  274 # all filehandles (e.g. by system(), backticks, fork(), etc).
  275 #
  276 # The current version on the ByteLoader module on CPAN however only
  277 # works if scripts are read in binary mode.  But before you disable text
  278 # mode script reading (and break some DATA filehandle functionality)
  279 # please check first if an updated ByteLoader isn't available on CPAN.
  280 #
  281 BUILDOPT	+= -DPERL_TEXTMODE_SCRIPTS
  282 
  283 #
  284 # specify semicolon-separated list of extra directories that modules will
  285 # look for libraries (spaces in path names need not be quoted)
  286 #
  287 EXTRALIBDIRS	:=
  288 
  289 #
  290 # set this to your email address (perl will guess a value from
  291 # from your loginname and your hostname, which may not be right)
  292 #
  293 #EMAIL		:=
  294 
  295 ##
  296 ## Build configuration ends.
  297 ##
  298 
  299 ##################### CHANGE THESE ONLY IF YOU MUST #####################
  300 
  301 PERL_MALLOC	?= undef
  302 DEBUG_MSTATS	?= undef
  303 
  304 USE_SITECUST	?= undef
  305 USE_MULTI	?= undef
  306 USE_ITHREADS	?= undef
  307 USE_IMP_SYS	?= undef
  308 USE_PERLIO	?= undef
  309 USE_LARGE_FILES	?= undef
  310 USE_64_BIT_INT	?= undef
  311 USE_LONG_DOUBLE	?= undef
  312 DEFAULT_INC_EXCLUDES_DOT ?= undef
  313 USE_NO_REGISTRY	?= undef
  314 
  315 ifeq ($(USE_IMP_SYS),define)
  316 PERL_MALLOC	= undef
  317 endif
  318 
  319 ifeq ($(PERL_MALLOC),undef)
  320 DEBUG_MSTATS	= undef
  321 endif
  322 
  323 ifeq ($(DEBUG_MSTATS),define)
  324 BUILDOPT	+= -DPERL_DEBUGGING_MSTATS
  325 endif
  326 
  327 ifeq ("$(USE_IMP_SYS) $(USE_MULTI)","define undef")
  328 USE_MULTI	= define
  329 endif
  330 
  331 ifeq ("$(USE_ITHREADS) $(USE_MULTI)","define undef")
  332 USE_MULTI	= define
  333 endif
  334 
  335 ifeq ($(USE_SITECUST),define)
  336 BUILDOPT	+= -DUSE_SITECUSTOMIZE
  337 endif
  338 
  339 ifneq ($(USE_MULTI),undef)
  340 BUILDOPT	+= -DPERL_IMPLICIT_CONTEXT
  341 endif
  342 
  343 ifneq ($(USE_IMP_SYS),undef)
  344 BUILDOPT	+= -DPERL_IMPLICIT_SYS
  345 endif
  346 
  347 ifeq ($(USE_NO_REGISTRY),define)
  348 BUILDOPT	+= -DWIN32_NO_REGISTRY
  349 endif
  350 
  351 ifeq ($(CCTYPE),GCC)
  352 GCCTARGET	:= $(shell $(GCCBIN) -dumpmachine)
  353 endif
  354 
  355 #no explicit CCTYPE given, do auto detection
  356 ifeq ($(CCTYPE),)
  357 GCCTARGET	:= $(shell $(GCCBIN) -dumpmachine 2>NUL)
  358 #do we have a GCC?
  359 ifneq ($(GCCTARGET),)
  360 CCTYPE		:= GCC
  361 else
  362 WIN64		:= $(shell for /f "tokens=3 delims=.^ " \
  363 	%%i in ('cl ^2^>^&1') do @if "%%i" == "32-bit" echo undef)
  364 #major version of CL has diff position based on 32 vs 64
  365 #Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64
  366 #Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
  367 #use var to capture 1st line only, not 8th token of lines 2 & 3 in cl.exe output
  368 #removing the cmd /c (extra scope) on the echo causes the env var to be undef
  369 #when echo executes but it isn't undef for the "set MSVCVER", gmake or
  370 #cmd.exe bug?
  371 ifeq ($(WIN64),undef)
  372 MSVCVER		:= $(shell (set MSVCVER=) & (for /f "tokens=8,9 delims=.^ " \
  373 	%%i in ('cl ^2^>^&1') do if not defined MSVCVER if %%i%% geq 19 \
  374 	(set /A "MSVCVER=((%%i-5)*10)+(%%j/10)") \
  375 	else (set /A "MSVCVER=(%%i-6)*10")) & cmd /c echo %%MSVCVER%%)
  376 else
  377 MSVCVER		:= $(shell (set MSVCVER=) & (for /f "tokens=7,8 delims=.^ " \
  378 	%%i in ('cl ^2^>^&1') do if not defined MSVCVER if %%i%% geq 19 \
  379 	(set /A "MSVCVER=((%%i-5)*10)+(%%j/10)") \
  380 	else (set /A "MSVCVER=(%%i-6)*10")) & cmd /c echo %%MSVCVER%%)
  381 endif
  382 #autodetect failed, reset to empty string
  383 ifeq ($(MSVCVER),-50)
  384 CCTYPE		:= 
  385 else
  386 CCTYPE		:= MSVC$(MSVCVER)
  387 endif
  388 endif
  389 endif
  390 
  391 # Versions of Visual C++ up to VC++ 7.1 define $(MSVCDir); versions since then
  392 # define $(VCINSTALLDIR) instead, but for VC++ 14.1 we need the subfolder given
  393 # by $(VCToolsInstallDir).
  394 ifeq ($(CCHOME),)
  395 ifeq ($(CCTYPE),GCC)
  396 CCHOME		:= C:\MinGW
  397 else ifeq ($(CCTYPE),MSVC60)
  398 CCHOME		:= $(MSVCDir)
  399 else ifeq ($(CCTYPE),MSVC70)
  400 CCHOME		:= $(MSVCDir)
  401 else ifeq ($(CCTYPE),MSVC70FREE)
  402 CCHOME		:= $(MSVCDir)
  403 else ifeq ($(CCTYPE),MSVC141)
  404 CCHOME		:= $(VCToolsInstallDir)
  405 else ifeq ($(CCTYPE),MSVC142)
  406 CCHOME		:= $(VCToolsInstallDir)
  407 else
  408 CCHOME		:= $(VCINSTALLDIR)
  409 endif
  410 endif
  411 
  412 ifeq ($(CCTYPE),GCC)
  413 ifeq ($(GCCTARGET),x86_64-w64-mingw32)
  414 WIN64 := define
  415 PROCESSOR_ARCHITECTURE := x64
  416 endif
  417 ifeq ($(GCCTARGET),i686-w64-mingw32)
  418 WIN64 := undef
  419 PROCESSOR_ARCHITECTURE := x86
  420 endif
  421 endif
  422 
  423 PROCESSOR_ARCHITECTURE  ?= x86
  424 
  425 ifeq ($(WIN64),undef)
  426 PROCESSOR_ARCHITECTURE	= x86
  427 endif
  428 
  429 ifeq ($(WIN64),)
  430 # When we are running from a 32bit cmd.exe on AMD64 then
  431 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
  432 # is set to AMD64
  433 ifneq ($(PROCESSOR_ARCHITEW6432),)
  434 PROCESSOR_ARCHITECTURE	= $(PROCESSOR_ARCHITEW6432)
  435 WIN64			= define
  436 else ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
  437 WIN64			= define
  438 else ifeq ($(PROCESSOR_ARCHITECTURE),IA64)
  439 WIN64			= define
  440 else
  441 WIN64			= undef
  442 endif
  443 endif
  444 
  445 ifeq ($(WIN64),define)
  446 USE_64_BIT_INT	= define
  447 endif
  448 
  449 # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
  450 # both link against MSVCRT.dll (which is part of Windows itself) and
  451 # not against a compiler specific versioned runtime.
  452 ifeq ("$(WIN64) $(CCTYPE)","define MSVC60")
  453 CCTYPE		= SDK2003SP1
  454 endif
  455 
  456 # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
  457 # does not support it.
  458 ifeq ($(CCTYPE),MSVC60)
  459 USE_64_BIT_INT	= undef
  460 endif
  461 
  462 # Disable the long double option for MSVC builds since that compiler
  463 # does not support it.
  464 ifneq ($(CCTYPE),GCC)
  465 USE_LONG_DOUBLE	= undef
  466 endif
  467 
  468 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
  469 ifeq ($(ARCHITECTURE),AMD64)
  470 ARCHITECTURE	= x64
  471 endif
  472 ifeq ($(ARCHITECTURE),IA64)
  473 ARCHITECTURE	= ia64
  474 endif
  475 
  476 ifeq ($(USE_MULTI),define)
  477 ARCHNAME	= MSWin32-$(ARCHITECTURE)-multi
  478 else
  479 ifeq ($(USE_PERLIO),define)
  480 ARCHNAME	= MSWin32-$(ARCHITECTURE)-perlio
  481 else
  482 ARCHNAME	= MSWin32-$(ARCHITECTURE)
  483 endif
  484 endif
  485 
  486 ifeq ($(USE_PERLIO),define)
  487 BUILDOPT	+= -DUSE_PERLIO
  488 endif
  489 
  490 ifeq ($(USE_ITHREADS),define)
  491 ARCHNAME	:= $(ARCHNAME)-thread
  492 endif
  493 
  494 ifneq ($(WIN64),define)
  495 ifeq ($(USE_64_BIT_INT),define)
  496 ARCHNAME	:= $(ARCHNAME)-64int
  497 endif
  498 endif
  499 
  500 ifeq ($(USE_LONG_DOUBLE),define)
  501 ARCHNAME	:= $(ARCHNAME)-ld
  502 endif
  503 
  504 # Set the install location of the compiler headers/libraries.
  505 # These are saved into $Config{incpath} and $Config{libpth}.
  506 ifneq ($(GCCCROSS),)
  507 CCINCDIR := $(CCHOME)\$(GCCCROSS)\include
  508 CCLIBDIR := $(CCHOME)\$(GCCCROSS)\lib
  509 ARCHPREFIX := $(GCCCROSS)-
  510 else ifeq ($(CCTYPE),GCC)
  511 CCINCDIR := $(CCHOME)\include
  512 CCLIBDIR := $(CCHOME)\lib
  513 ARCHPREFIX :=
  514 else
  515 CCINCDIR := $(CCHOME)\include
  516 ifeq ($(CCTYPE),MSVC141)
  517 ifeq ($(WIN64),define)
  518 CCLIBDIR := $(CCHOME)\lib\x64
  519 else
  520 CCLIBDIR := $(CCHOME)\lib\x86
  521 endif
  522 else ifeq ($(CCTYPE),MSVC142)
  523 ifeq ($(WIN64),define)
  524 CCLIBDIR := $(CCHOME)\lib\x64
  525 else
  526 CCLIBDIR := $(CCHOME)\lib\x86
  527 endif
  528 else
  529 ifeq ($(WIN64),define)
  530 CCLIBDIR := $(CCHOME)\lib\amd64
  531 else
  532 CCLIBDIR := $(CCHOME)\lib
  533 endif
  534 endif
  535 ARCHPREFIX :=
  536 endif
  537 
  538 # Set DLL location for GCC compilers.
  539 ifeq ($(CCTYPE),GCC)
  540 ifneq ($(GCCCROSS),)
  541 CCDLLDIR := $(CCLIBDIR)
  542 else
  543 CCDLLDIR := $(CCHOME)\bin
  544 endif
  545 endif
  546 
  547 ARCHDIR		= ..\lib\$(ARCHNAME)
  548 COREDIR		= ..\lib\CORE
  549 AUTODIR		= ..\lib\auto
  550 LIBDIR		= ..\lib
  551 EXTDIR		= ..\ext
  552 DISTDIR		= ..\dist
  553 CPANDIR		= ..\cpan
  554 PODDIR		= ..\pod
  555 HTMLDIR		= .\html
  556 
  557 INST_SCRIPT	= $(INST_TOP)$(INST_VER)\bin
  558 INST_BIN	= $(INST_SCRIPT)$(INST_ARCH)
  559 INST_LIB	= $(INST_TOP)$(INST_VER)\lib
  560 INST_ARCHLIB	= $(INST_LIB)$(INST_ARCH)
  561 INST_COREDIR	= $(INST_ARCHLIB)\CORE
  562 INST_HTML	= $(INST_TOP)$(INST_VER)\html
  563 
  564 #
  565 # Programs to compile, build .lib files and link
  566 #
  567 
  568 MINIBUILDOPT    :=
  569 
  570 ifeq ($(CCTYPE),GCC)
  571 
  572 CC		= $(ARCHPREFIX)gcc
  573 LINK32		= $(ARCHPREFIX)g++
  574 LIB32		= $(ARCHPREFIX)ar rc
  575 IMPLIB		= $(ARCHPREFIX)dlltool
  576 RSC		= $(ARCHPREFIX)windres
  577 
  578 ifeq ($(USE_LONG_DOUBLE),define)
  579 BUILDOPT        += -D__USE_MINGW_ANSI_STDIO
  580 MINIBUILDOPT    += -D__USE_MINGW_ANSI_STDIO
  581 else ifeq ($(USE_MINGW_ANSI_STDIO),define)
  582 BUILDOPT        += -D__USE_MINGW_ANSI_STDIO
  583 MINIBUILDOPT    += -D__USE_MINGW_ANSI_STDIO
  584 endif
  585 
  586 GCCVER1   := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%i)
  587 GCCVER2   := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%j)
  588 GCCVER3   := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%k)
  589 
  590 # If you are using GCC, 4.3 or later by default we add the -fwrapv option.
  591 # See https://rt.perl.org/Ticket/Display.html?id=121505
  592 #
  593 GCCWRAPV := $(shell if "$(GCCVER1)"=="4" (if "$(GCCVER2)" geq "3" echo define) else if "$(GCCVER1)" geq "5" (echo define))
  594 
  595 ifeq ($(GCCWRAPV),define)
  596 BUILDOPT        += -fwrapv
  597 MINIBUILDOPT    += -fwrapv
  598 endif
  599 
  600 i = .i
  601 o = .o
  602 a = .a
  603 
  604 #
  605 # Options
  606 #
  607 
  608 INCLUDES	= -I.\include -I. -I..
  609 DEFINES		= -DWIN32
  610 ifeq ($(WIN64),define)
  611 DEFINES		+= -DWIN64 -DCONSERVATIVE
  612 endif
  613 LOCDEFS		= -DPERLDLL -DPERL_CORE
  614 CXX_FLAG	= -xc++
  615 LIBC		=
  616 LIBFILES	= $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \
  617 	-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \
  618 	-luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
  619 
  620 ifeq ($(CFG),Debug)
  621 OPTIMIZE	= -g -O2 -DDEBUGGING
  622 LINK_DBG	= -g
  623 else
  624 OPTIMIZE	= -s -O2
  625 LINK_DBG	= -s
  626 endif
  627 
  628 EXTRACFLAGS	=
  629 ifeq ($(USE_CPLUSPLUS),define)
  630 EXTRACFLAGS	+= $(CXX_FLAG)
  631 endif
  632 CFLAGS		= $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
  633 LINK_FLAGS	= $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
  634 OBJOUT_FLAG	= -o
  635 EXEOUT_FLAG	= -o
  636 LIBOUT_FLAG	=
  637 PDBOUT		=
  638 
  639 BUILDOPT	+= -fno-strict-aliasing -mms-bitfields
  640 MINIBUILDOPT	+= -fno-strict-aliasing
  641 
  642 TESTPREPGCC	= test-prep-gcc
  643 
  644 else
  645 
  646 o = .obj
  647 
  648 # All but the free version of VC++ 7.1 can load DLLs on demand.  Makes the test
  649 # suite run in about 10% less time.
  650 ifneq ($(CCTYPE),MSVC70FREE)
  651 # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
  652 # which is rare to execute
  653 ifneq ($(USE_NO_REGISTRY),undef)
  654 DELAYLOAD	= -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
  655 MINIDELAYLOAD	=
  656 else
  657 DELAYLOAD	= -DELAYLOAD:ws2_32.dll delayimp.lib
  658 #miniperl never does any registry lookups
  659 MINIDELAYLOAD	= -DELAYLOAD:advapi32.dll
  660 endif
  661 endif
  662 
  663 # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and
  664 # DLLs. These either need copying everywhere with the binaries, or else need
  665 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
  666 # simplicity, embed them if they exist (and delete them afterwards so that they
  667 # don't get installed too).
  668 EMBED_EXE_MANI	= if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
  669 		  if exist $@.manifest del $@.manifest
  670 EMBED_DLL_MANI	= if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
  671 		  if exist $@.manifest del $@.manifest
  672 
  673 # Most relevant compiler-specific options fall into two groups:
  674 # either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
  675 ifeq ($(CCTYPE),MSVC60)
  676 PREMSVC80	= define
  677 else ifeq ($(CCTYPE),MSVC70)
  678 PREMSVC80	= define
  679 else ifeq ($(CCTYPE),MSVC70FREE)
  680 PREMSVC80	= define
  681 else
  682 PREMSVC80	= undef
  683 endif
  684 
  685 ifneq ($(__ICC),define)
  686 CC		= cl
  687 LINK32		= link
  688 else
  689 CC		= icl
  690 LINK32		= xilink
  691 endif
  692 LIB32		= $(LINK32) -lib
  693 RSC		= rc
  694 
  695 #
  696 # Options
  697 #
  698 
  699 INCLUDES	= -I.\include -I. -I..
  700 #PCHFLAGS	= -Fpc:\temp\vcmoduls.pch -YX
  701 DEFINES		= -DWIN32 -D_CONSOLE -DNO_STRICT
  702 LOCDEFS		= -DPERLDLL -DPERL_CORE
  703 CXX_FLAG	= -TP -EHsc
  704 
  705 ifeq ($(CCTYPE),MSVC140)
  706 LIBC		= ucrt.lib
  707 else ifeq ($(CCTYPE),MSVC141)
  708 LIBC		= ucrt.lib
  709 else ifeq ($(CCTYPE),MSVC142)
  710 LIBC		= ucrt.lib
  711 else
  712 LIBC		= msvcrt.lib
  713 endif
  714 
  715 ifeq ($(CFG),Debug)
  716 OPTIMIZE	= -Od -MD -Zi -DDEBUGGING
  717 LINK_DBG	= -debug
  718 else ifeq ($(CFG),DebugSymbols)
  719 OPTIMIZE	= -Od -MD -Zi
  720 LINK_DBG	= -debug
  721 else ifeq ($(CFG),DebugFull)
  722 ifeq ($(CCTYPE),MSVC140)
  723 LIBC		= ucrtd.lib
  724 else ifeq ($(CCTYPE),MSVC141)
  725 LIBC		= ucrtd.lib
  726 else ifeq ($(CCTYPE),MSVC142)
  727 LIBC		= ucrtd.lib
  728 else
  729 LIBC		= msvcrtd.lib
  730 endif
  731 OPTIMIZE	= -Od -MDd -Zi -D_DEBUG -DDEBUGGING
  732 LINK_DBG	= -debug
  733 else
  734 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
  735 OPTIMIZE	= -O1 -MD -Zi -DNDEBUG
  736 # we enable debug symbols in release builds also
  737 LINK_DBG	= -debug -opt:ref,icf
  738 # you may want to enable this if you want COFF symbols in the executables
  739 # in addition to the PDB symbols.  The default Dr. Watson that ships with
  740 # Windows can use the the former but not latter.  The free WinDbg can be
  741 # installed to get better stack traces from just the PDB symbols, so we
  742 # avoid the bloat of COFF symbols by default.
  743 #LINK_DBG	= $(LINK_DBG) -debugtype:both
  744 ifneq ($(CCTYPE),MSVC60)
  745 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
  746 OPTIMIZE	+= -GL
  747 LINK_DBG	+= -ltcg
  748 LIB_FLAGS	= -ltcg
  749 endif
  750 endif
  751 
  752 ifeq ($(WIN64),define)
  753 DEFINES		+= -DWIN64 -DCONSERVATIVE
  754 OPTIMIZE	+= -fp:precise
  755 endif
  756 
  757 # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions
  758 # and POSIX CRT function names being deprecated.
  759 ifeq ($(PREMSVC80),undef)
  760 DEFINES		+= -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
  761 endif
  762 
  763 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
  764 ifeq ($(CCTYPE),MSVC140)
  765 DEFINES		+= -D_WINSOCK_DEPRECATED_NO_WARNINGS
  766 else ifeq ($(CCTYPE),MSVC141)
  767 DEFINES		+= -D_WINSOCK_DEPRECATED_NO_WARNINGS
  768 else ifeq ($(CCTYPE),MSVC142)
  769 DEFINES		+= -D_WINSOCK_DEPRECATED_NO_WARNINGS
  770 endif
  771 
  772 # The Windows Server 2003 SP1 SDK compiler only defines _configthreadlocale() if
  773 # _MT is defined, i.e. when using /MT (the LIBCMT.lib version of the CRT), which
  774 # the perl build doesn't use. We therefore specify NO_THREAD_SAFE_LOCALE so that
  775 # perl.h doesn't set USE_THREAD_SAFE_LOCALE, which it otherwise would do since
  776 # _MSC_VER is 1400 for this compiler (as per MSVC80).
  777 ifeq ($(CCTYPE),SDK2003SP1)
  778 DEFINES		+= -DNO_THREAD_SAFE_LOCALE
  779 endif
  780 
  781 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
  782 # 64-bit, even in 32-bit mode.  It also provides the _USE_32BIT_TIME_T
  783 # preprocessor option to revert back to the old functionality for
  784 # backward compatibility.  We define this symbol here for older 32-bit
  785 # compilers only (which aren't using it at all) for the sole purpose
  786 # of getting it into $Config{ccflags}.  That way if someone builds
  787 # Perl itself with e.g. VC6 but later installs an XS module using VC8
  788 # the time_t types will still be compatible.
  789 ifeq ($(WIN64),undef)
  790 ifeq ($(PREMSVC80),define)
  791 BUILDOPT	+= -D_USE_32BIT_TIME_T
  792 endif
  793 endif
  794 
  795 LIBBASEFILES	= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
  796 	comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
  797 	netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
  798 	odbc32.lib odbccp32.lib comctl32.lib
  799 
  800 ifeq ($(CCTYPE),MSVC140)
  801 ifeq ($(CFG),DebugFull)
  802 LIBBASEFILES	+= msvcrtd.lib vcruntimed.lib
  803 else
  804 LIBBASEFILES	+= msvcrt.lib vcruntime.lib
  805 endif
  806 else ifeq ($(CCTYPE),MSVC141)
  807 ifeq ($(CFG),DebugFull)
  808 LIBBASEFILES	+= msvcrtd.lib vcruntimed.lib
  809 else
  810 LIBBASEFILES	+= msvcrt.lib vcruntime.lib
  811 endif
  812 else ifeq ($(CCTYPE),MSVC142)
  813 ifeq ($(CFG),DebugFull)
  814 LIBBASEFILES	+= msvcrtd.lib vcruntimed.lib
  815 else
  816 LIBBASEFILES	+= msvcrt.lib vcruntime.lib
  817 endif
  818 endif
  819 
  820 # Avoid __intel_new_proc_init link error for libircmt.
  821 # libmmd is /MD equivelent, other variants exist.
  822 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
  823 # and optimized C89 funcs
  824 ifeq ($(__ICC),define)
  825 LIBBASEFILES	+= libircmt.lib libmmd.lib
  826 endif
  827 
  828 # The Windows Server 2003 SP1 SDK compiler links against MSVCRT.dll, which
  829 # doesn't include the buffer overrun verification code used by the /GS switch.
  830 # Since the code links against libraries that are compiled with /GS, this
  831 # "security cookie verification" code must be included via bufferoverflow.lib.
  832 ifeq ($(CCTYPE),SDK2003SP1)
  833 LIBBASEFILES    += bufferoverflowU.lib
  834 endif
  835 
  836 LIBFILES	= $(LIBBASEFILES) $(LIBC)
  837 
  838 EXTRACFLAGS	= -nologo -GF -W3
  839 ifeq ($(__ICC),define)
  840 EXTRACFLAGS	+= -Qstd=c99
  841 endif
  842 ifeq ($(USE_CPLUSPLUS),define)
  843 EXTRACFLAGS	+= $(CXX_FLAG)
  844 endif
  845 CFLAGS		= $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
  846 		$(PCHFLAGS) $(OPTIMIZE)
  847 LINK_FLAGS	= -nologo -nodefaultlib $(LINK_DBG) \
  848 		-libpath:"$(INST_COREDIR)" \
  849 		-machine:$(PROCESSOR_ARCHITECTURE)
  850 LIB_FLAGS	+= -nologo
  851 OBJOUT_FLAG	= -Fo
  852 EXEOUT_FLAG	= -Fe
  853 LIBOUT_FLAG	= /out:
  854 PDBOUT		= -Fd$(*).pdb
  855 TESTPREPGCC	=
  856 
  857 endif
  858 
  859 CFLAGS_O	= $(CFLAGS) $(BUILDOPT)
  860 
  861 ifeq ($(PREMSVC80),undef)
  862 PRIV_LINK_FLAGS	+= "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
  863 else
  864 RSC_FLAGS	= -DINCLUDE_MANIFEST
  865 endif
  866 
  867 # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
  868 
  869 # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
  870 # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
  871 # Console vs GUI makes no difference for DLLs, so use default for cleaner
  872 # building cmd lines
  873 
  874 ifeq ($(CCTYPE),MSVC120)
  875 ifeq ($(WIN64),define)
  876 LINK_FLAGS	+= -subsystem:console,"5.02"
  877 else
  878 LINK_FLAGS	+= -subsystem:console,"5.01"
  879 endif
  880 
  881 else ifeq ($(CCTYPE),MSVC140)
  882 ifeq ($(WIN64),define)
  883 LINK_FLAGS	+= -subsystem:console,"5.02"
  884 else
  885 LINK_FLAGS	+= -subsystem:console,"5.01"
  886 endif
  887 
  888 else ifeq ($(CCTYPE),MSVC141)
  889 ifeq ($(WIN64),define)
  890 LINK_FLAGS	+= -subsystem:console,"5.02"
  891 else
  892 LINK_FLAGS	+= -subsystem:console,"5.01"
  893 endif
  894 
  895 else ifeq ($(CCTYPE),MSVC142)
  896 ifeq ($(WIN64),define)
  897 LINK_FLAGS	+= -subsystem:console,"5.02"
  898 else
  899 LINK_FLAGS	+= -subsystem:console,"5.01"
  900 endif
  901 
  902 else ifneq ($(CCTYPE),GCC)
  903 PRIV_LINK_FLAGS	+= -subsystem:console
  904 endif
  905 
  906 BLINK_FLAGS	= $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
  907 
  908 #################### do not edit below this line #######################
  909 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
  910 
  911 #prevent -j from reaching EUMM/make_ext.pl/"sub makes", Win32 EUMM not parallel
  912 #compatible yet
  913 unexport MAKEFLAGS
  914 
  915 a ?= .lib
  916 
  917 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
  918 
  919 %$(o): %.c
  920 	$(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) $<
  921 
  922 %.i: %.c
  923 	$(CC) -c -I$(<D) $(CFLAGS_O) -E $< >$@
  924 
  925 %.c: %.y
  926 	$(NOOP)
  927 
  928 %.dll: %$(o)
  929 	$(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
  930 	$(IMPLIB) --input-def $(*F).def --output-lib $(*F).a $@
  931 
  932 %.res: %.rc
  933 ifeq ($(CCTYPE),GCC)
  934 	$(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
  935 else
  936 	$(RSC) -i.. -DINCLUDE_MANIFEST $<
  937 endif
  938 
  939 #
  940 # various targets
  941 
  942 #do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL)
  943 #$(MINIPERL) is not a buildable target, use "gmake mp" if you want to just build
  944 #miniperl alone
  945 MINIPERL	= ..\miniperl.exe
  946 HAVEMINIPERL	= ..\lib\buildcustomize.pl
  947 MINIDIR		= mini
  948 PERLEXE		= ..\perl.exe
  949 WPERLEXE	= ..\wperl.exe
  950 PERLEXESTATIC	= ..\perl-static.exe
  951 STATICDIR	= .\static.tmp
  952 GLOBEXE		= ..\perlglob.exe
  953 CONFIGPM	= ..\lib\Config.pm
  954 GENUUDMAP	= ..\generate_uudmap.exe
  955 ifeq ($(BUILD_STATIC),define)
  956 PERLSTATIC	= static
  957 else
  958 ifeq ($(ALL_STATIC),define)
  959 PERLSTATIC	= static
  960 else
  961 PERLSTATIC	=
  962 endif
  963 endif
  964 
  965 # Unicode data files generated by mktables
  966 UNIDATAFILES	 = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
  967 		   ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
  968 		   ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm            \
  969 		   ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
  970 
  971 # Directories of Unicode data files generated by mktables
  972 UNIDATADIR1	= ..\lib\unicore\To
  973 UNIDATADIR2	= ..\lib\unicore\lib
  974 
  975 PERLEXE_MANIFEST= .\perlexe.manifest
  976 PERLEXE_ICO	= .\perlexe.ico
  977 PERLEXE_RES	= .\perlexe.res
  978 PERLDLL_RES	=
  979 
  980 # Nominate a target which causes extensions to be re-built
  981 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
  982 # on and really only the interface - i.e. the .def file used to export symbols
  983 # from the .dll
  984 PERLDEP = $(PERLIMPLIB)
  985 
  986 
  987 PL2BAT		= bin\pl2bat.pl
  988 
  989 UTILS		=			\
  990 		..\utils\h2ph		\
  991 		..\utils\splain		\
  992 		..\utils\perlbug	\
  993 		..\utils\pl2pm 		\
  994 		..\utils\h2xs		\
  995 		..\utils\perldoc	\
  996 		..\utils\perlivp	\
  997 		..\utils\libnetcfg	\
  998 		..\utils\enc2xs		\
  999 		..\utils\encguess	\
 1000 		..\utils\piconv		\
 1001 		..\utils\corelist	\
 1002 		..\utils\cpan		\
 1003 		..\utils\xsubpp		\
 1004 		..\utils\pod2html	\
 1005 		..\utils\prove		\
 1006 		..\utils\ptar		\
 1007 		..\utils\ptardiff	\
 1008 		..\utils\ptargrep	\
 1009 		..\utils\zipdetails	\
 1010 		..\utils\shasum		\
 1011 		..\utils\instmodsh	\
 1012 		..\utils\json_pp	\
 1013 		bin\exetype.pl		\
 1014 		bin\runperl.pl		\
 1015 		bin\pl2bat.pl		\
 1016 		bin\perlglob.pl		\
 1017 		bin\search.pl
 1018 
 1019 ifeq ($(CCTYPE),GCC)
 1020 
 1021 CFGSH_TMPL	= config.gc
 1022 CFGH_TMPL	= config_H.gc
 1023 PERLIMPLIB	= $(COREDIR)\libperl530$(a)
 1024 PERLIMPLIBBASE	= libperl530$(a)
 1025 PERLSTATICLIB	= ..\libperl530s$(a)
 1026 INT64		= long long
 1027 
 1028 else
 1029 
 1030 CFGSH_TMPL	= config.vc
 1031 CFGH_TMPL	= config_H.vc
 1032 INT64		= __int64
 1033 
 1034 endif
 1035 
 1036 # makedef.pl must be updated if this changes, and this should normally
 1037 # only change when there is an incompatible revision of the public API.
 1038 PERLIMPLIB	?= $(COREDIR)\perl530$(a)
 1039 PERLIMPLIBBASE	?= perl530$(a)
 1040 PERLEXPLIB	?= $(COREDIR)\perl530.exp
 1041 PERLSTATICLIB	?= ..\perl530s$(a)
 1042 PERLDLL		= ..\perl530.dll
 1043 PERLDLLBASE	= perl530.dll
 1044 
 1045 # don't let "gmake -n all" try to run "miniperl.exe make_ext.pl"
 1046 PLMAKE		= gmake
 1047 
 1048 XCOPY		= xcopy /f /r /i /d /y
 1049 RCOPY		= xcopy /f /r /i /e /d /y
 1050 NOOP		= @rem
 1051 
 1052 #first ones are arrange in compile time order for faster parallel building
 1053 #see #123867 for details
 1054 MICROCORE_SRC	=		\
 1055 		..\toke.c	\
 1056 		..\regcomp.c	\
 1057 		..\regexec.c	\
 1058 		..\op.c		\
 1059 		..\sv.c		\
 1060 		..\pp.c		\
 1061 		..\pp_ctl.c	\
 1062 		..\pp_sys.c	\
 1063 		..\pp_pack.c	\
 1064 		..\pp_hot.c	\
 1065 		..\gv.c		\
 1066 		..\perl.c	\
 1067 		..\utf8.c	\
 1068 		..\dump.c	\
 1069 		..\hv.c		\
 1070 		..\av.c		\
 1071 		..\caretx.c	\
 1072 		..\deb.c	\
 1073 		..\doio.c	\
 1074 		..\doop.c	\
 1075 		..\dquote.c	\
 1076 		..\globals.c	\
 1077 		..\mro_core.c	\
 1078 		..\locale.c	\
 1079 		..\keywords.c	\
 1080 		..\mathoms.c    \
 1081 		..\mg.c		\
 1082 		..\numeric.c	\
 1083 		..\pad.c	\
 1084 		..\perlapi.c	\
 1085 		..\perly.c	\
 1086 		..\pp_sort.c	\
 1087 		..\reentr.c	\
 1088 		..\run.c	\
 1089 		..\scope.c	\
 1090 		..\taint.c	\
 1091 		..\time64.c	\
 1092 		..\universal.c	\
 1093 		..\util.c
 1094 
 1095 EXTRACORE_SRC	+= perllib.c
 1096 
 1097 ifeq ($(PERL_MALLOC),define)
 1098 EXTRACORE_SRC	+= ..\malloc.c
 1099 endif
 1100 
 1101 EXTRACORE_SRC	+= ..\perlio.c
 1102 
 1103 WIN32_SRC	=		\
 1104 		.\win32.c	\
 1105 		.\win32sck.c	\
 1106 		.\win32thread.c	\
 1107 		.\fcrypt.c
 1108 
 1109 # We need this for miniperl build unless we override canned
 1110 # config.h #define building mini\*
 1111 #ifeq ($(USE_PERLIO)" == "define"
 1112 WIN32_SRC	+= .\win32io.c
 1113 #endif
 1114 
 1115 CORE_NOCFG_H	=		\
 1116 		..\av.h		\
 1117 		..\cop.h	\
 1118 		..\cv.h		\
 1119 		..\dosish.h	\
 1120 		..\embed.h	\
 1121 		..\form.h	\
 1122 		..\gv.h		\
 1123 		..\handy.h	\
 1124 		..\hv.h		\
 1125 		..\hv_func.h	\
 1126 		..\iperlsys.h	\
 1127 		..\mg.h		\
 1128 		..\nostdio.h	\
 1129 		..\op.h		\
 1130 		..\opcode.h	\
 1131 		..\perl.h	\
 1132 		..\perlapi.h	\
 1133 		..\perlsdio.h	\
 1134 		..\perly.h	\
 1135 		..\pp.h		\
 1136 		..\proto.h	\
 1137 		..\regcomp.h	\
 1138 		..\regexp.h	\
 1139 		..\scope.h	\
 1140 		..\sv.h		\
 1141 		..\thread.h	\
 1142 		..\unixish.h	\
 1143 		..\utf8.h	\
 1144 		..\util.h	\
 1145 		..\warnings.h	\
 1146 		..\XSUB.h	\
 1147 		..\EXTERN.h	\
 1148 		..\perlvars.h	\
 1149 		..\intrpvar.h	\
 1150 		.\include\dirent.h	\
 1151 		.\include\netdb.h	\
 1152 		.\include\sys\errno2.h	\
 1153 		.\include\sys\socket.h	\
 1154 		.\win32.h
 1155 
 1156 CORE_H		= $(CORE_NOCFG_H) .\config.h ..\git_version.h
 1157 
 1158 UUDMAP_H	= ..\uudmap.h
 1159 BITCOUNT_H	= ..\bitcount.h
 1160 MG_DATA_H	= ..\mg_data.h
 1161 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
 1162 
 1163 HAVE_COREDIR	= .coreheaders
 1164 
 1165 MICROCORE_OBJ	= $(MICROCORE_SRC:.c=$(o))
 1166 CORE_OBJ	= $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=$(o))
 1167 WIN32_OBJ	= $(WIN32_SRC:.c=$(o))
 1168 
 1169 MINICORE_OBJ	= $(subst ..\,mini\,$(MICROCORE_OBJ))	\
 1170 		  $(MINIDIR)\miniperlmain$(o)	\
 1171 		  $(MINIDIR)\perlio$(o)
 1172 MINIWIN32_OBJ	= $(subst .\,mini\,$(WIN32_OBJ))
 1173 MINI_OBJ	= $(MINICORE_OBJ) $(MINIWIN32_OBJ)
 1174 DLL_OBJ		= $(DYNALOADER)
 1175 
 1176 PERLDLL_OBJ	= $(CORE_OBJ)
 1177 PERLEXE_OBJ	= perlmain$(o)
 1178 PERLEXEST_OBJ	= perlmainst$(o)
 1179 
 1180 PERLDLL_OBJ	+= $(WIN32_OBJ) $(DLL_OBJ)
 1181 
 1182 ifneq ($(USE_SETARGV),)
 1183 SETARGV_OBJ	= setargv$(o)
 1184 endif
 1185 
 1186 ifeq ($(ALL_STATIC),define)
 1187 # some exclusions, unfortunately, until fixed:
 1188 #  - MakeMaker isn't capable enough for SDBM_File (small bug)
 1189 STATIC_EXT	= * !SDBM_File
 1190 NORMALIZE_STATIC = Normalize_static
 1191 else
 1192 # specify static extensions here, for example:
 1193 # (be sure to include Win32CORE to load Win32 on demand)
 1194 #STATIC_EXT	= Win32CORE Cwd Compress/Raw/Zlib
 1195 STATIC_EXT	= Win32CORE
 1196 NORMALIZE_DYN	= Normalize_dyn
 1197 endif
 1198 
 1199 DYNALOADER	= ..\DynaLoader$(o)
 1200 
 1201 # vars must be separated by "\t+~\t+", since we're using the tempfile
 1202 # version of config_sh.pl (we were overflowing someone's buffer by
 1203 # trying to fit them all on the command line)
 1204 #	-- BKS 10-17-1999
 1205 CFG_VARS	=					\
 1206 		"INST_TOP=$(INST_TOP)"			\
 1207 		"INST_VER=$(INST_VER)"			\
 1208 		"INST_ARCH=$(INST_ARCH)"		\
 1209 		"archname=$(ARCHNAME)"			\
 1210 		"cc=$(CC)"				\
 1211 		"ld=$(LINK32)"				\
 1212 		"ccflags=$(subst ",\",$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT))" \
 1213 		"usecplusplus=$(USE_CPLUSPLUS)"		\
 1214 		"cf_email=$(EMAIL)"			\
 1215 		"d_mymalloc=$(PERL_MALLOC)"		\
 1216 		"libs=$(LIBFILES)"			\
 1217 		"incpath=$(subst ",\",$(CCINCDIR))"			\
 1218 		"libperl=$(subst ",\",$(PERLIMPLIBBASE))"		\
 1219 		"libpth=$(subst ",\",$(CCLIBDIR);$(EXTRALIBDIRS))"	\
 1220 		"libc=$(LIBC)"				\
 1221 		"make=$(PLMAKE)"				\
 1222 		"_o=$(o)"				\
 1223 		"obj_ext=$(o)"				\
 1224 		"_a=$(a)"				\
 1225 		"lib_ext=$(a)"				\
 1226 		"static_ext=$(STATIC_EXT)"		\
 1227 		"usethreads=$(USE_ITHREADS)"		\
 1228 		"useithreads=$(USE_ITHREADS)"		\
 1229 		"usemultiplicity=$(USE_MULTI)"		\
 1230 		"useperlio=$(USE_PERLIO)"		\
 1231 		"use64bitint=$(USE_64_BIT_INT)"		\
 1232 		"uselongdouble=$(USE_LONG_DOUBLE)"	\
 1233 		"uselargefiles=$(USE_LARGE_FILES)"	\
 1234 		"usesitecustomize=$(USE_SITECUST)"	\
 1235 		"default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)"	\
 1236 		"LINK_FLAGS=$(subst ",\",$(LINK_FLAGS))"\
 1237 		"optimize=$(subst ",\",$(OPTIMIZE))"	\
 1238 		"ARCHPREFIX=$(ARCHPREFIX)"		\
 1239 		"WIN64=$(WIN64)"
 1240 
 1241 #
 1242 # Top targets
 1243 #
 1244 
 1245 .PHONY: all info
 1246 
 1247 all : info rebasePE Extensions_nonxs $(PERLSTATIC)
 1248 
 1249 info :
 1250 ifeq ($(CCTYPE),GCC)
 1251 	@echo # CCTYPE=$(CCTYPE)&& \
 1252 	echo # GCCBIN=$(GCCBIN)&& \
 1253 	echo # GCCVER=$(GCCVER1).$(GCCVER2).$(GCCVER3)&& \
 1254 	echo # GCCTARGET=$(GCCTARGET)&& \
 1255 	echo # GCCCROSS=$(GCCCROSS)&& \
 1256 	echo # WIN64=$(WIN64)&& \
 1257 	echo # ARCHITECTURE=$(ARCHITECTURE)&& \
 1258 	echo # ARCHNAME=$(ARCHNAME)&& \
 1259 	echo # MAKE=$(PLMAKE)
 1260 else
 1261 	@echo # CCTYPE=$(CCTYPE)&& \
 1262 	echo # WIN64=$(WIN64)&& \
 1263 	echo # ARCHITECTURE=$(ARCHITECTURE)&& \
 1264 	echo # ARCHNAME=$(ARCHNAME)&& \
 1265 	echo # MAKE=$(PLMAKE)
 1266 endif
 1267 ifeq ($(CCTYPE),)
 1268 	@echo Unable to detect gcc and/or architecture!
 1269 	@exit 1
 1270 endif
 1271 
 1272 
 1273 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
 1274 
 1275 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
 1276 
 1277 reonly : ..\regnodes.h .\config.h ..\git_version.h $(GLOBEXE) $(HAVEMINIPERL)\
 1278 	$(CONFIGPM) $(UNIDATAFILES) $(PERLEXE)				\
 1279 	Extensions_reonly
 1280 
 1281 static: $(PERLEXESTATIC)
 1282 
 1283 #----------------------------------------------------------------
 1284 
 1285 $(GLOBEXE) : perlglob.c
 1286 ifeq ($(CCTYPE),GCC)
 1287 	$(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
 1288 else
 1289 	$(CC) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \
 1290 	setargv$(o) $(LIBFILES) && $(EMBED_EXE_MANI)
 1291 endif
 1292 
 1293 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
 1294 	$(MINIPERL) -I..\lib ..\make_patchnum.pl
 1295 
 1296 # make sure that we recompile perl.c if the git version changes
 1297 ..\perl$(o) : ..\git_version.h
 1298 
 1299 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL)
 1300 	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
 1301 
 1302 # This target is for when changes to the main config.sh happen.
 1303 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
 1304 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
 1305 # this target to regenerate config_H.gc.
 1306 regen_config_h:
 1307 	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
 1308 	$(MINIPERL) -I..\lib ..\configpm --chdir=..
 1309 	-del /f $(CFGH_TMPL)
 1310 	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
 1311 	rename config.h $(CFGH_TMPL)
 1312 
 1313 $(CONFIGPM): ..\config.sh config_h.PL
 1314 	$(MINIPERL) -I..\lib ..\configpm --chdir=..
 1315 	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
 1316 
 1317 .\config.h : $(CONFIGPM)
 1318 
 1319 # See the comment in Makefile.SH explaining this seemingly cranky ordering
 1320 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
 1321 ifeq ($(CCTYPE),GCC)
 1322 	$(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
 1323 else
 1324 	$(LINK32) -out:$(MINIPERL) $(BLINK_FLAGS) \
 1325 	    $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)
 1326 	$(subst $@,$(MINIPERL),$(EMBED_EXE_MANI))
 1327 
 1328 endif
 1329 	$(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
 1330 
 1331 #convinence target, get a working miniperl
 1332 mp : $(CONFIGPM)
 1333 
 1334 $(MINIDIR)\.exists : $(CFGH_TMPL)
 1335 	if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
 1336 #
 1337 # Copy the template config.h and set configurables at the end of it
 1338 # as per the options chosen and compiler used.
 1339 # Note: This config.h is only used to build miniperl.exe anyway, but
 1340 # it's as well to have its options correct to be sure that it builds
 1341 # and so that it's "-V" options are correct for use by makedef.pl. The
 1342 # real config.h used to build perl.exe is generated from the top-level
 1343 # config_h.SH by config_h.PL (run by miniperl.exe).
 1344 #
 1345 # MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd
 1346 # config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ).
 1347 	copy $(CFGH_TMPL) config.h
 1348 	@(echo.&& \
 1349 	echo #ifndef _config_h_footer_&& \
 1350 	echo #define _config_h_footer_&& \
 1351 	echo #undef Off_t&& \
 1352 	echo #undef LSEEKSIZE&& \
 1353 	echo #undef Off_t_size&& \
 1354 	echo #undef PTRSIZE&& \
 1355 	echo #undef SSize_t&& \
 1356 	echo #undef HAS_ATOLL&& \
 1357 	echo #undef HAS_STRTOLL&& \
 1358 	echo #undef HAS_STRTOULL&& \
 1359 	echo #undef Size_t_size&& \
 1360 	echo #undef IVTYPE&& \
 1361 	echo #undef UVTYPE&& \
 1362 	echo #undef IVSIZE&& \
 1363 	echo #undef UVSIZE&& \
 1364 	echo #undef NV_PRESERVES_UV&& \
 1365 	echo #undef NV_PRESERVES_UV_BITS&& \
 1366 	echo #undef IVdf&& \
 1367 	echo #undef UVuf&& \
 1368 	echo #undef UVof&& \
 1369 	echo #undef UVxf&& \
 1370 	echo #undef UVXf&& \
 1371 	echo #undef USE_64_BIT_INT&& \
 1372 	echo #undef Gconvert&& \
 1373 	echo #undef HAS_FREXPL&& \
 1374 	echo #undef HAS_ISNANL&& \
 1375 	echo #undef HAS_MODFL&& \
 1376 	echo #undef HAS_MODFL_PROTO&& \
 1377 	echo #undef HAS_SQRTL&& \
 1378 	echo #undef HAS_STRTOLD&& \
 1379 	echo #undef PERL_PRIfldbl&& \
 1380 	echo #undef PERL_PRIgldbl&& \
 1381 	echo #undef PERL_PRIeldbl&& \
 1382 	echo #undef PERL_SCNfldbl&& \
 1383 	echo #undef NVTYPE&& \
 1384 	echo #undef NVSIZE&& \
 1385 	echo #undef LONG_DOUBLESIZE&& \
 1386 	echo #undef NV_OVERFLOWS_INTEGERS_AT&& \
 1387 	echo #undef NVef&& \
 1388 	echo #undef NVff&& \
 1389 	echo #undef NVgf&& \
 1390 	echo #undef USE_LONG_DOUBLE&& \
 1391 	echo #undef USE_CPLUSPLUS)>> config.h
 1392 ifeq ($(CCTYPE),MSVC140)
 1393 	@(echo #undef FILE_ptr&& \
 1394 	echo #undef FILE_cnt&& \
 1395 	echo #undef FILE_base&& \
 1396 	echo #undef FILE_bufsiz&& \
 1397 	echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
 1398 	echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
 1399 	echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
 1400 	echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
 1401 	echo #define I_STDBOOL)>> config.h
 1402 else ifeq ($(CCTYPE),MSVC141)
 1403 	@(echo #undef FILE_ptr&& \
 1404 	echo #undef FILE_cnt&& \
 1405 	echo #undef FILE_base&& \
 1406 	echo #undef FILE_bufsiz&& \
 1407 	echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
 1408 	echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
 1409 	echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
 1410 	echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
 1411 	echo #define I_STDBOOL)>> config.h
 1412 else ifeq ($(CCTYPE),MSVC142)
 1413 	@(echo #undef FILE_ptr&& \
 1414 	echo #undef FILE_cnt&& \
 1415 	echo #undef FILE_base&& \
 1416 	echo #undef FILE_bufsiz&& \
 1417 	echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
 1418 	echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
 1419 	echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
 1420 	echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
 1421 	echo #define I_STDBOOL)>> config.h
 1422 endif
 1423 ifeq ($(USE_LARGE_FILES),define)
 1424 	@(echo #define Off_t $(INT64)&& \
 1425 	echo #define LSEEKSIZE ^8&& \
 1426 	echo #define Off_t_size ^8)>> config.h
 1427 else
 1428 	@(echo #define Off_t long&& \
 1429 	echo #define LSEEKSIZE ^4&& \
 1430 	echo #define Off_t_size ^4)>> config.h
 1431 endif
 1432 ifeq ($(WIN64),define)
 1433 ifeq ($(CCTYPE),GCC)
 1434 	@(echo #define LONG_DOUBLESIZE ^16)>> config.h
 1435 else
 1436 	@(echo #define LONG_DOUBLESIZE ^8)>> config.h
 1437 endif
 1438 	@(echo #define PTRSIZE ^8&& \
 1439 	echo #define SSize_t $(INT64)&& \
 1440 	echo #define HAS_ATOLL&& \
 1441 	echo #define HAS_STRTOLL&& \
 1442 	echo #define HAS_STRTOULL&& \
 1443 	echo #define Size_t_size ^8)>> config.h
 1444 else
 1445 ifeq ($(CCTYPE),GCC)
 1446 	@(echo #define LONG_DOUBLESIZE ^12)>> config.h
 1447 else
 1448 	@(echo #define LONG_DOUBLESIZE ^8)>> config.h
 1449 endif
 1450 	@(echo #define PTRSIZE ^4&& \
 1451 	echo #define SSize_t int&& \
 1452 	echo #undef HAS_ATOLL&& \
 1453 	echo #undef HAS_STRTOLL&& \
 1454 	echo #undef HAS_STRTOULL&& \
 1455 	echo #define Size_t_size ^4)>> config.h
 1456 endif
 1457 ifeq ($(USE_64_BIT_INT),define)
 1458 	@(echo #define IVTYPE $(INT64)&& \
 1459 	echo #define UVTYPE unsigned $(INT64)&& \
 1460 	echo #define IVSIZE ^8&& \
 1461 	echo #define UVSIZE ^8)>> config.h
 1462 ifeq ($(USE_LONG_DOUBLE),define)
 1463 	@(echo #define NV_PRESERVES_UV&& \
 1464 	echo #define NV_PRESERVES_UV_BITS 64)>> config.h
 1465 else
 1466 	@(echo #undef NV_PRESERVES_UV&& \
 1467 	echo #define NV_PRESERVES_UV_BITS 53)>> config.h
 1468 endif
 1469 	@(echo #define IVdf "I64d"&& \
 1470 	echo #define UVuf "I64u"&& \
 1471 	echo #define UVof "I64o"&& \
 1472 	echo #define UVxf "I64x"&& \
 1473 	echo #define UVXf "I64X"&& \
 1474 	echo #define USE_64_BIT_INT)>> config.h
 1475 else
 1476 	@(echo #define IVTYPE long&& \
 1477 	echo #define UVTYPE unsigned long&& \
 1478 	echo #define IVSIZE ^4&& \
 1479 	echo #define UVSIZE ^4&& \
 1480 	echo #define NV_PRESERVES_UV&& \
 1481 	echo #define NV_PRESERVES_UV_BITS 32&& \
 1482 	echo #define IVdf "ld"&& \
 1483 	echo #define UVuf "lu"&& \
 1484 	echo #define UVof "lo"&& \
 1485 	echo #define UVxf "lx"&& \
 1486 	echo #define UVXf "lX"&& \
 1487 	echo #undef USE_64_BIT_INT)>> config.h
 1488 endif
 1489 ifeq ($(USE_LONG_DOUBLE),define)
 1490 	@(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*""Lg",^(n^),^(x^)^)&& \
 1491 	echo #define HAS_FREXPL&& \
 1492 	echo #define HAS_ISNANL&& \
 1493 	echo #define HAS_MODFL&& \
 1494 	echo #define HAS_MODFL_PROTO&& \
 1495 	echo #define HAS_SQRTL&& \
 1496 	echo #define HAS_STRTOLD&& \
 1497 	echo #define PERL_PRIfldbl "Lf"&& \
 1498 	echo #define PERL_PRIgldbl "Lg"&& \
 1499 	echo #define PERL_PRIeldbl "Le"&& \
 1500 	echo #define PERL_SCNfldbl "Lf"&& \
 1501 	echo #define NVTYPE long double&& \
 1502 	echo #define NVSIZE LONG_DOUBLESIZE&& \
 1503 	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&& \
 1504 	echo #define NVef "Le"&& \
 1505 	echo #define NVff "Lf"&& \
 1506 	echo #define NVgf "Lg"&& \
 1507 	echo #define USE_LONG_DOUBLE)>> config.h
 1508 else
 1509 	@(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*g",^(n^),^(x^)^)&& \
 1510 	echo #undef HAS_FREXPL&& \
 1511 	echo #undef HAS_ISNANL&& \
 1512 	echo #undef HAS_MODFL&& \
 1513 	echo #undef HAS_MODFL_PROTO&& \
 1514 	echo #undef HAS_SQRTL&& \
 1515 	echo #undef HAS_STRTOLD&& \
 1516 	echo #undef PERL_PRIfldbl&& \
 1517 	echo #undef PERL_PRIgldbl&& \
 1518 	echo #undef PERL_PRIeldbl&& \
 1519 	echo #undef PERL_SCNfldbl&& \
 1520 	echo #define NVTYPE double&& \
 1521 	echo #define NVSIZE ^8&& \
 1522 	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&& \
 1523 	echo #define NVef "e"&& \
 1524 	echo #define NVff "f"&& \
 1525 	echo #define NVgf "g"&& \
 1526 	echo #undef USE_LONG_DOUBLE)>> config.h
 1527 endif
 1528 ifeq ($(USE_CPLUSPLUS),define)
 1529 	@(echo #define USE_CPLUSPLUS&& \
 1530 	echo #endif)>> config.h
 1531 else
 1532 	@(echo #undef USE_CPLUSPLUS&& \
 1533 	echo #endif)>> config.h
 1534 endif
 1535 #separate line since this is sentinal that this target is done
 1536 	@rem. > $(MINIDIR)\.exists
 1537 
 1538 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
 1539 	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*F).c
 1540 
 1541 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
 1542 	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*F).c
 1543 
 1544 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
 1545 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
 1546 # unless the .IF is true), so instead we use a .ELSE with the default.
 1547 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
 1548 
 1549 perllib$(o)	: perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h
 1550 ifeq ($(USE_IMP_SYS),define)
 1551 	$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
 1552 else
 1553 	$(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
 1554 endif
 1555 
 1556 # 1. we don't want to rebuild miniperl.exe when config.h changes
 1557 # 2. we don't want to rebuild miniperl.exe with non-default config.h
 1558 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
 1559 $(MINI_OBJ)	: $(MINIDIR)\.exists $(CORE_NOCFG_H)
 1560 
 1561 $(WIN32_OBJ)	: $(CORE_H)
 1562 
 1563 $(CORE_OBJ)	: $(CORE_H)
 1564 
 1565 $(DLL_OBJ)	: $(CORE_H)
 1566 
 1567 
 1568 perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl
 1569 	$(MINIPERL) -I..\lib create_perllibst_h.pl
 1570 
 1571 perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
 1572 	$(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
 1573 	$(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
 1574 
 1575 $(PERLEXPLIB) : $(PERLIMPLIB)
 1576 
 1577 $(PERLIMPLIB) : perldll.def
 1578 ifeq ($(CCTYPE),GCC)
 1579 	$(IMPLIB) -k -d perldll.def -D $(PERLDLLBASE) -l $(PERLIMPLIB) -e $(PERLEXPLIB)
 1580 else
 1581 	lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
 1582 endif
 1583 
 1584 $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
 1585 ifeq ($(CCTYPE),GCC)
 1586 	$(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
 1587 	   $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) $(PERLEXPLIB)
 1588 else
 1589 	$(LINK32) -dll -out:$@ $(BLINK_FLAGS) \
 1590 	    @Extensions_static \
 1591 	    -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
 1592 	    $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB)
 1593 	$(EMBED_DLL_MANI)
 1594 endif
 1595 
 1596 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
 1597 ifeq ($(CCTYPE),GCC)
 1598 	$(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
 1599 	if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
 1600 	for %%i in ($(shell type Extensions_static)) do \
 1601 		@mkdir $(STATICDIR) && cd $(STATICDIR) && \
 1602 		$(ARCHPREFIX)ar x ..\%%i && \
 1603 		$(ARCHPREFIX)ar q ..\$@ *$(o) && \
 1604 		cd .. && rmdir /s /q $(STATICDIR)
 1605 else
 1606 	$(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
 1607 	    $(PERLDLL_OBJ)
 1608 endif
 1609 	$(XCOPY) $(PERLSTATICLIB) $(COREDIR)
 1610 
 1611 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
 1612 
 1613 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
 1614 
 1615 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
 1616 
 1617 $(BITCOUNT_H) : $(GENUUDMAP)
 1618 	$(GENUUDMAP) $(GENERATED_HEADERS)
 1619 
 1620 $(GENUUDMAP) : ..\mg_raw.h
 1621 ifeq ($(CCTYPE),GCC)
 1622 	$(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
 1623 	$(BLINK_FLAGS) $(LIBFILES)
 1624 else
 1625 	$(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c -link $(LIBFILES) $(BLINK_FLAGS)
 1626 	$(EMBED_EXE_MANI)
 1627 endif
 1628 
 1629 .PHONY: MakePPPort
 1630 
 1631 MakePPPort : $(HAVEMINIPERL) $(CONFIGPM)
 1632 	$(MINIPERL) -I..\lib ..\mkppport
 1633 
 1634 # also known as $(HAVE_COREDIR)
 1635 .coreheaders : $(CORE_H)
 1636 	$(XCOPY) *.h $(COREDIR)\\*.*
 1637 	$(RCOPY) include $(COREDIR)\\*.*
 1638 	$(XCOPY) ..\\*.h $(COREDIR)\\*.*
 1639 	rem. > $@
 1640 
 1641 perlmain$(o) : runperl.c $(CONFIGPM)
 1642 	$(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 1643 
 1644 perlmainst$(o) : runperl.c $(CONFIGPM)
 1645 	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 1646 
 1647 $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
 1648 ifeq ($(CCTYPE),GCC)
 1649 	$(LINK32) -mconsole -o $@ $(BLINK_FLAGS)  \
 1650 	    $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
 1651 else
 1652 	$(LINK32) -out:$@ $(BLINK_FLAGS) \
 1653 	    $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
 1654 	$(EMBED_EXE_MANI)
 1655 endif
 1656 	copy $(PERLEXE) $(WPERLEXE)
 1657 	$(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
 1658 
 1659 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
 1660 ifeq ($(CCTYPE),GCC)
 1661 	$(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
 1662 	    $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
 1663 else
 1664 	$(LINK32) -out:$@ $(BLINK_FLAGS) \
 1665 	    $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
 1666 	$(EMBED_EXE_MANI)
 1667 endif
 1668 
 1669 #-------------------------------------------------------------------------------
 1670 # There's no direct way to mark a dependency on
 1671 # DynaLoader.pm, so this will have to do
 1672 
 1673 #most of deps of this target are in DYNALOADER and therefore omitted here
 1674 Extensions : $(PERLDEP) $(DYNALOADER) Extension_lib $(GLOBEXE) MakePPPort
 1675 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
 1676 
 1677 Normalize_static : $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) $(UNIDATAFILES)
 1678 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static +Unicode/Normalize
 1679 
 1680 Normalize_dyn : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
 1681 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
 1682 
 1683 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
 1684 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
 1685 
 1686 Exts_static_general : ..\make_ext.pl $(CONFIGPM) Extension_lib $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
 1687 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static !Unicode/Normalize
 1688 
 1689 Extensions_static : list_static_libs.pl Exts_static_general $(NORMALIZE_STATIC)
 1690 	$(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 1691 
 1692 Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
 1693 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
 1694 
 1695 Extension_lib : ..\make_ext.pl $(CONFIGPM)
 1696 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) lib
 1697 
 1698 #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
 1699 $(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
 1700 	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader
 1701 
 1702 Extensions_clean :
 1703 	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
 1704 
 1705 Extensions_realclean :
 1706 	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
 1707 
 1708 # all PE files need to be built by the time this target runs, PP files can still
 1709 # be running in parallel like UNIDATAFILES, this target a placeholder for the
 1710 # future
 1711 ifeq ($(PERLSTATIC),static)
 1712 rebasePE : Extensions $(PERLDLL) $(PERLEXE) $(PERLEXESTATIC)
 1713 else
 1714 rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
 1715 endif
 1716 	$(NOOP)
 1717 
 1718 #-------------------------------------------------------------------------------
 1719 
 1720 doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod
 1721 	$(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
 1722 	    --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
 1723 	    --recurse
 1724 
 1725 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
 1726 	$(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
 1727 
 1728 # Note that this next section is parsed (and regenerated) by pod/buildtoc
 1729 # so please check that script before making structural changes here
 1730 utils: $(HAVEMINIPERL) ..\utils\Makefile
 1731 	cd ..\utils && $(PLMAKE) PERL=$(MINIPERL)
 1732 	copy ..\README.aix      ..\pod\perlaix.pod
 1733 	copy ..\README.amiga    ..\pod\perlamiga.pod
 1734 	copy ..\README.android  ..\pod\perlandroid.pod
 1735 	copy ..\README.bs2000   ..\pod\perlbs2000.pod
 1736 	copy ..\README.ce       ..\pod\perlce.pod
 1737 	copy ..\README.cn       ..\pod\perlcn.pod
 1738 	copy ..\README.cygwin   ..\pod\perlcygwin.pod
 1739 	copy ..\README.dos      ..\pod\perldos.pod
 1740 	copy ..\README.freebsd  ..\pod\perlfreebsd.pod
 1741 	copy ..\README.haiku    ..\pod\perlhaiku.pod
 1742 	copy ..\README.hpux     ..\pod\perlhpux.pod
 1743 	copy ..\README.hurd     ..\pod\perlhurd.pod
 1744 	copy ..\README.irix     ..\pod\perlirix.pod
 1745 	copy ..\README.jp       ..\pod\perljp.pod
 1746 	copy ..\README.ko       ..\pod\perlko.pod
 1747 	copy ..\README.linux    ..\pod\perllinux.pod
 1748 	copy ..\README.macos    ..\pod\perlmacos.pod
 1749 	copy ..\README.macosx   ..\pod\perlmacosx.pod
 1750 	copy ..\README.netware  ..\pod\perlnetware.pod
 1751 	copy ..\README.openbsd  ..\pod\perlopenbsd.pod
 1752 	copy ..\README.os2      ..\pod\perlos2.pod
 1753 	copy ..\README.os390    ..\pod\perlos390.pod
 1754 	copy ..\README.os400    ..\pod\perlos400.pod
 1755 	copy ..\README.plan9    ..\pod\perlplan9.pod
 1756 	copy ..\README.qnx      ..\pod\perlqnx.pod
 1757 	copy ..\README.riscos   ..\pod\perlriscos.pod
 1758 	copy ..\README.solaris  ..\pod\perlsolaris.pod
 1759 	copy ..\README.symbian  ..\pod\perlsymbian.pod
 1760 	copy ..\README.synology ..\pod\perlsynology.pod
 1761 	copy ..\README.tru64    ..\pod\perltru64.pod
 1762 	copy ..\README.tw       ..\pod\perltw.pod
 1763 	copy ..\README.vos      ..\pod\perlvos.pod
 1764 	copy ..\README.win32    ..\pod\perlwin32.pod
 1765 	copy ..\pod\perldelta.pod ..\pod\perl5303delta.pod
 1766 	$(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
 1767 	$(MINIPERL) -I..\lib ..\autodoc.pl ..
 1768 	$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
 1769 
 1770 ..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs $(NORMALIZE_DYN) utils
 1771 	$(PERLEXE) -f ..\pod\buildtoc -q
 1772 
 1773 # Note that the pod cleanup in this next section is parsed (and regenerated
 1774 # by pod/buildtoc so please check that script before making changes here
 1775 
 1776 distclean: realclean
 1777 	-del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
 1778 		$(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
 1779 	-del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
 1780 	-del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
 1781 	-del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
 1782 	-del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
 1783 	-del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
 1784 	-del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
 1785 	-del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
 1786 	-del /f $(LIBDIR)\File\Glob.pm
 1787 	-del /f $(LIBDIR)\Sys\Hostname.pm
 1788 	-del /f $(LIBDIR)\Time\HiRes.pm
 1789 	-del /f $(LIBDIR)\Unicode\Normalize.pm
 1790 	-del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
 1791 	-del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
 1792 	-del /f $(LIBDIR)\Win32.pm
 1793 	-del /f $(LIBDIR)\Win32CORE.pm
 1794 	-del /f $(LIBDIR)\Win32API\File.pm
 1795 	-del /f $(LIBDIR)\Win32API\File\cFile.pc
 1796 	-del /f $(LIBDIR)\buildcustomize.pl
 1797 	-del /f $(DISTDIR)\XSLoader\XSLoader.pm
 1798 	-del /f *.def *.map
 1799 	-if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga
 1800 	-if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
 1801 	-if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
 1802 	-if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
 1803 	-if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
 1804 	-if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
 1805 	-if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
 1806 	-if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
 1807 	-if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
 1808 	-if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
 1809 	-if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
 1810 	-if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
 1811 	-if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
 1812 	-if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
 1813 	-if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
 1814 	-if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
 1815 	-if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
 1816 	-if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
 1817 	-if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
 1818 	-if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
 1819 	-if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
 1820 	-if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
 1821 	-if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
 1822 	-if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
 1823 	-if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
 1824 	-if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
 1825 	-if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
 1826 	-if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
 1827 	-if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
 1828 	-if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
 1829 	-if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
 1830 	-if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
 1831 	-if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
 1832 	-if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
 1833 	-if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
 1834 	-if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
 1835 	-if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
 1836 	-if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
 1837 	-if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
 1838 	-if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
 1839 	-if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
 1840 	-if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
 1841 	-if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
 1842 	-if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
 1843 	-if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
 1844 	-if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
 1845 	-if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
 1846 	-if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
 1847 	-if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
 1848 	-if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
 1849 	-if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
 1850 	-if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
 1851 	-if exist $(LIBDIR)\Test2 rmdir /s /q $(LIBDIR)\Test2
 1852 	-if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
 1853 	-if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
 1854 	-if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
 1855 	-if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
 1856 	-if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
 1857 	-if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
 1858 	-if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
 1859 	-if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
 1860 	-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
 1861 	-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
 1862 	-cd $(PODDIR) && del /f *.html *.bat roffitall \
 1863 	    perl5303delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
 1864 	    perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
 1865 	    perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
 1866 	    perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
 1867 	    perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
 1868 	    perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
 1869 	    perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
 1870 	    perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
 1871 	    perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
 1872 	    perlwin32.pod
 1873 	-cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \
 1874 	    perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
 1875 	    xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
 1876 	-del /f ..\config.sh perlmain.c dlutils.c config.h.new \
 1877 	    perlmainst.c
 1878 	-del /f $(CONFIGPM)
 1879 	-del /f ..\lib\Config_git.pl
 1880 	-del /f "bin\*.bat"
 1881 	-del /f perllibst.h
 1882 	-del /f $(PERLEXE_RES) perl.base
 1883 	-cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
 1884 	-cd $(EXTDIR) && del /s *.def Makefile Makefile.old
 1885 	-cd $(DISTDIR) && del /s *.def Makefile Makefile.old
 1886 	-cd $(CPANDIR) && del /s *.def Makefile Makefile.old
 1887 	-del /s ..\utils\Makefile
 1888 	-if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
 1889 	-if exist $(COREDIR) rmdir /s /q $(COREDIR)
 1890 	-if exist pod2htmd.tmp del pod2htmd.tmp
 1891 	-if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
 1892 	-del /f ..\t\test_state
 1893 
 1894 install : all installbare installhtml
 1895 
 1896 installbare : utils ..\pod\perltoc.pod
 1897 	$(PERLEXE) ..\installperl
 1898 	if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\$(NULL)
 1899 	if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\$(NULL)
 1900 	$(XCOPY) $(GLOBEXE) $(INST_BIN)\$(NULL)
 1901 	if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\$(NULL)
 1902 	$(XCOPY) "bin\*.bat" $(INST_SCRIPT)\$(NULL)
 1903 
 1904 installhtml : doc
 1905 	$(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\$(NULL)
 1906 
 1907 inst_lib : $(CONFIGPM)
 1908 	$(RCOPY) ..\lib $(INST_LIB)\$(NULL)
 1909 
 1910 $(UNIDATAFILES) : ..\pod\perluniprops.pod
 1911 
 1912 ..\pod\perluniprops.pod: ..\lib\unicore\mktables $(CONFIGPM)
 1913 	$(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
 1914 
 1915 minitest : $(HAVEMINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
 1916 	$(XCOPY) $(MINIPERL) ..\t\$(NULL)
 1917 	if exist ..\t\perl.exe del /f ..\t\perl.exe
 1918 	rename ..\t\miniperl.exe perl.exe
 1919 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
 1920 	attrib -r "..\t\*.*"
 1921 	cd ..\t && \
 1922 	$(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
 1923 
 1924 test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC)
 1925 	$(XCOPY) $(PERLEXE) ..\t\$(NULL)
 1926 	$(XCOPY) $(PERLDLL) ..\t\$(NULL)
 1927 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
 1928 # If building with gcc versions 4.x.x or greater, then
 1929 # the GCC helper DLL will also need copied to the test directory.
 1930 # The name of the dll can change, depending upon which vendor has supplied
 1931 # your compiler, and upon the values of "x".
 1932 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
 1933 # Without this copying, the op/taint.t test script will fail.
 1934 
 1935 ifeq ($(CCTYPE),GCC)
 1936 
 1937 test-prep-gcc :
 1938 	if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
 1939 	if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
 1940 	if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
 1941 	if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
 1942 	if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
 1943 
 1944 endif
 1945 
 1946 test : test-prep
 1947 	set PERL_STATIC_EXT=$(STATIC_EXT) && \
 1948 	    cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
 1949 
 1950 test_porting : test-prep
 1951 	set PERL_STATIC_EXT=$(STATIC_EXT) && \
 1952 	    cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
 1953 
 1954 test-reonly : reonly utils
 1955 	$(XCOPY) $(PERLEXE) ..\t\$(NULL)
 1956 	$(XCOPY) $(PERLDLL) ..\t\$(NULL)
 1957 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
 1958 	cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA)
 1959 
 1960 regen :
 1961 	cd .. && regen.pl
 1962 
 1963 test-notty : test-prep
 1964 	set PERL_STATIC_EXT=$(STATIC_EXT) && \
 1965 	    set PERL_SKIP_TTY_TEST=1 && \
 1966 	    cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
 1967 
 1968 _test :
 1969 	$(XCOPY) $(PERLEXE) ..\t\$(NULL)
 1970 	$(XCOPY) $(PERLDLL) ..\t\$(NULL)
 1971 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
 1972 	set PERL_STATIC_EXT=$(STATIC_EXT) && \
 1973 	    cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
 1974 
 1975 _clean :
 1976 	-@erase miniperlmain$(o)
 1977 	-@erase $(MINIPERL)
 1978 	-@erase perlglob$(o)
 1979 	-@erase perlmain$(o)
 1980 	-@erase perlmainst$(o)
 1981 	-@erase /f config.h
 1982 	-@erase /f ..\git_version.h
 1983 	-@erase $(GLOBEXE)
 1984 	-@erase $(PERLEXE)
 1985 	-@erase $(WPERLEXE)
 1986 	-@erase $(PERLEXESTATIC)
 1987 	-@erase $(PERLSTATICLIB)
 1988 	-@erase $(PERLDLL)
 1989 	-@erase $(CORE_OBJ)
 1990 	-@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
 1991 	-@erase .coreheaders
 1992 	-if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
 1993 	-if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
 1994 	-if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
 1995 	-@erase $(UNIDATAFILES)
 1996 	-@erase $(WIN32_OBJ)
 1997 	-@erase $(DLL_OBJ)
 1998 	-@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
 1999 	-@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
 2000 	-@erase *.ilk
 2001 	-@erase *.pdb ..\*.pdb
 2002 	-@erase Extensions_static
 2003 
 2004 clean : Extensions_clean _clean
 2005 
 2006 realclean : Extensions_realclean _clean
 2007 
 2008 # Handy way to run perlbug -ok without having to install and run the
 2009 # installed perlbug. We don't re-run the tests here - we trust the user.
 2010 # Please *don't* use this unless all tests pass.
 2011 # If you want to report test failures, use "gmake nok" instead.
 2012 ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 2013 	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
 2014 
 2015 okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 2016 	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
 2017 
 2018 nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 2019 	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
 2020 
 2021 nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 2022 	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
 2023