2 # Makefile to build perl on Windows using DMAKE.
4 # Microsoft Visual C++ 6.0 or later
5 # MinGW with gcc-3.4.5 or later
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 # (perl521.dll). Also makes individual DLLs for the XS extensions.
13 ## Make sure you read README.win32 *before* you mess with anything here!
17 # Import everything from the environment like NMAKE does.
22 ## Build configuration. Edit the values below to suit your needs.
26 # Set these to wherever you want "dmake install" to put your
30 INST_TOP *= $(INST_DRV)\perl
33 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
34 # on a 64-bit version of Windows.
39 # Comment this out if you DON'T want your perl installation to be versioned.
40 # This means that the new installation will overwrite any files from the
41 # old installation at the same INST_TOP location. Leaving it enabled is
42 # the safest route, as perl adds the extra version directory to all the
43 # locations it installs files to. If you disable it, an alternative
44 # versioned installation can be obtained by setting INST_TOP above to a
45 # path that includes an arbitrary version string.
50 # Comment this out if you DON'T want your perl installation to have
51 # architecture specific components. This means that architecture-
52 # specific files will be installed along with the architecture-neutral
53 # files. Leaving it enabled is safer and more flexible, in case you
54 # want to build multiple flavors of perl and install them together in
55 # the same location. Commenting it out gives you a simpler
56 # installation that is easier to understand for beginners.
58 #INST_ARCH *= \$(ARCHNAME)
61 # Uncomment this if you want perl to run
62 # $Config{sitelibexp}\sitecustomize.pl
63 # before anything else. This script can then be set up, for example,
64 # to add additional entries to @INC.
66 #USE_SITECUST *= define
69 # uncomment to enable multiple interpreters. This is needed for fork()
70 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
71 # and USE_ITHREADS below.
76 # Interpreter cloning/threads; now reasonably complete.
77 # This should be enabled to get the fork() emulation. This needs (and
78 # will auto-enable) USE_MULTI above.
80 USE_ITHREADS *= define
83 # uncomment to enable the implicit "host" layer for all system calls
84 # made by perl. This is also needed to get fork(). This needs (and
85 # will auto-enable) USE_MULTI above.
90 # Comment this out if you don't want to enable large file support for
91 # some reason. Should normally only be changed to maintain compatibility
92 # with an older release of perl.
94 USE_LARGE_FILES *= define
97 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
98 # (If you're building a 64-bit perl then you will have 64-bit integers whether
99 # or not this is uncommented.)
100 # Note: This option is not supported in 32-bit MSVC60 builds.
102 #USE_64_BIT_INT *= define
105 # Uncomment this if you want to support the use of long doubles in GCC builds.
106 # This option is not supported for MSVC builds.
108 #USE_LONG_DOUBLE *=define
111 # uncomment exactly one of the following
113 # Visual C++ 6.x (aka Visual C++ 98)
115 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.x) (full version)
117 # Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
118 #CCTYPE *= MSVC70FREE
119 # Windows Server 2003 SP1 Platform SDK (April 2005)
121 # Visual C++ 2005 (aka Visual C++ 8.x) (full version)
123 # Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
124 #CCTYPE *= MSVC80FREE
125 # Visual C++ 2008 (aka Visual C++ 9.x) (full version)
127 # Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
128 #CCTYPE *= MSVC90FREE
129 # Visual C++ 2010 (aka Visual C++ 10.x) (full version)
131 # Visual C++ 2010 Express Edition (aka Visual C++ 10.x) (free version)
132 #CCTYPE = MSVC100FREE
133 # Visual C++ 2012 (aka Visual C++ 11.x) (full version)
135 # Visual C++ 2012 Express Edition (aka Visual C++ 11.x) (free version)
136 #CCTYPE = MSVC110FREE
137 # Visual C++ 2013 (aka Visual C++ 12.x) (full version)
139 # Visual C++ 2013 Express Edition (aka Visual C++ 12.x) (free version)
140 #CCTYPE = MSVC120FREE
141 # MinGW or mingw-w64 with gcc-3.4.5 or later
145 # If you are using GCC, 4.3 or later by default we add the -fwrapv option.
146 # See https://rt.perl.org/Ticket/Display.html?id=121505
151 # If you are using Intel C++ Compiler uncomment this
156 # Uncomment this if you want to build everything in C++ mode
158 #USE_CPLUSPLUS *= define
161 # uncomment next line if you want debug version of perl (big,slow)
162 # If not enabled, we automatically try to use maximum optimization
163 # with all compilers that are known to have a working optimizer.
168 # uncomment to enable linking with setargv.obj under the Visual C
169 # compiler. Setting this options enables perl to expand wildcards in
170 # arguments, but it may be harder to use alternate methods like
171 # File::DosGlob that are more powerful. This option is supported only with
174 #USE_SETARGV *= define
177 # set this if you wish to use perl's malloc
178 # WARNING: Turning this on/off WILL break binary compatibility with extensions
179 # you may have compiled with/without it. Be prepared to recompile all
180 # extensions if you change the default. Currently, this cannot be enabled
181 # if you ask for USE_IMP_SYS above.
183 #PERL_MALLOC *= define
186 # set this to enable debugging mstats
187 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
188 # be enabled without PERL_MALLOC as well.
190 #DEBUG_MSTATS *= define
193 # set this to additionally provide a statically linked perl-static.exe.
194 # Note that dynamic loading will not work with this perl, so you must
195 # include required modules statically using the STATIC_EXT or ALL_STATIC
196 # variables below. A static library perl521s.lib will also be created.
197 # Ordinary perl.exe is not affected by this option.
199 #BUILD_STATIC *= define
202 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
203 # extension get statically built
204 # This will result in a very large perl executable, but the main purpose
205 # is to have proper linking set so as to be able to create miscellaneous
206 # executables with different built-in extensions
208 #ALL_STATIC *= define
211 # set the install locations of the compiler include/libraries
212 # Running VCVARS32.BAT is *required* when using Visual C.
213 # Some versions of Visual C don't define MSVCDIR in the environment,
214 # so you may have to set CCHOME explicitly (spaces in the path name should
217 .IF "$(CCTYPE)" == "GCC"
224 # uncomment this if you are using x86_64-w64-mingw32 cross-compiler
225 # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc'
226 # instead of the usual 'gcc'.
231 # Following sets $Config{incpath} and $Config{libpth}
234 .IF "$(GCCCROSS)" == "define"
235 CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include
236 CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib
237 CCDLLDIR *= $(CCLIBDIR)
239 CCINCDIR *= $(CCHOME)\include
240 CCLIBDIR *= $(CCHOME)\lib
241 CCDLLDIR *= $(CCHOME)\bin
245 # Additional compiler flags can be specified here.
247 BUILDOPT *= $(BUILDOPTEXTRA)
250 # This should normally be disabled. Enabling it will disable the File::Glob
251 # implementation of CORE::glob.
253 #BUILDOPT += -DPERL_EXTERNAL_GLOB
256 # Perl needs to read scripts in text mode so that the DATA filehandle
257 # works correctly with seek() and tell(), or around auto-flushes of
258 # all filehandles (e.g. by system(), backticks, fork(), etc).
260 # The current version on the ByteLoader module on CPAN however only
261 # works if scripts are read in binary mode. But before you disable text
262 # mode script reading (and break some DATA filehandle functionality)
263 # please check first if an updated ByteLoader isn't available on CPAN.
265 BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
268 # specify semicolon-separated list of extra directories that modules will
269 # look for libraries (spaces in path names need not be quoted)
274 # set this to point to cmd.exe (only needed if you use some
275 # alternate shell that doesn't grok cmd.exe style commands)
277 #SHELL *= g:\winnt\system32\cmd.exe
280 # set this to your email address (perl will guess a value from
281 # from your loginname and your hostname, which may not be right)
286 ## Build configuration ends.
289 ##################### CHANGE THESE ONLY IF YOU MUST #####################
292 DEBUG_MSTATS *= undef
294 USE_SITECUST *= undef
296 USE_ITHREADS *= undef
298 USE_LARGE_FILES *= undef
299 USE_64_BIT_INT *= undef
300 USE_LONG_DOUBLE *= undef
302 .IF "$(USE_IMP_SYS)" == "define"
306 .IF "$(PERL_MALLOC)" == "undef"
310 .IF "$(DEBUG_MSTATS)" == "define"
311 BUILDOPT += -DPERL_DEBUGGING_MSTATS
314 .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
318 .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
322 .IF "$(USE_SITECUST)" == "define"
323 BUILDOPT += -DUSE_SITECUSTOMIZE
326 .IF "$(USE_MULTI)" != "undef"
327 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
330 .IF "$(USE_IMP_SYS)" != "undef"
331 BUILDOPT += -DPERL_IMPLICIT_SYS
334 PROCESSOR_ARCHITECTURE *= x86
337 # When we are running from a 32bit cmd.exe on AMD64 then
338 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
340 .IF "$(PROCESSOR_ARCHITEW6432)" != ""
341 PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
343 .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
350 .IF "$(WIN64)" == "define"
351 USE_64_BIT_INT = define
354 # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
355 # both link against MSVCRT.dll (which is part of Windows itself) and
356 # not against a compiler specific versioned runtime.
357 .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
361 # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
362 # does not support it.
363 .IF "$(CCTYPE)" == "MSVC60"
364 USE_64_BIT_INT != undef
367 # Disable the long double option for MSVC builds since that compiler
368 # does not support it.
369 .IF "$(CCTYPE)" != "GCC"
370 USE_LONG_DOUBLE != undef
373 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
374 .IF "$(ARCHITECTURE)" == "AMD64"
377 .IF "$(ARCHITECTURE)" == "IA64"
381 .IF "$(USE_MULTI)" == "define"
382 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
384 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
387 .IF "$(USE_ITHREADS)" == "define"
388 ARCHNAME !:= $(ARCHNAME)-thread
391 .IF "$(WIN64)" != "define"
392 .IF "$(USE_64_BIT_INT)" == "define"
393 ARCHNAME !:= $(ARCHNAME)-64int
397 .IF "$(USE_LONG_DOUBLE)" == "define"
398 ARCHNAME !:= $(ARCHNAME)-ld
401 ARCHDIR = ..\lib\$(ARCHNAME)
402 COREDIR = ..\lib\CORE
403 AUTODIR = ..\lib\auto
412 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
413 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
414 INST_LIB = $(INST_TOP)$(INST_VER)\lib
415 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
416 INST_COREDIR = $(INST_ARCHLIB)\CORE
417 INST_HTML = $(INST_TOP)$(INST_VER)\html
420 # Programs to compile, build .lib files and link
427 .IF "$(CCTYPE)" == "GCC"
429 .IF "$(GCCCROSS)" == "define"
430 ARCHPREFIX = x86_64-w64-mingw32-
433 CC = $(ARCHPREFIX)gcc
434 LINK32 = $(ARCHPREFIX)g++
435 LIB32 = $(ARCHPREFIX)ar rc
436 IMPLIB = $(ARCHPREFIX)dlltool
437 RSC = $(ARCHPREFIX)windres
439 .IF "$(USE_LONG_DOUBLE)" == "define"
440 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
441 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
444 GCCWRAPV *= $(shell for /f "delims=. tokens=1,2,3" %i in ('$(CC) -dumpversion') do @if "%i"=="4" (if "%j" geq "3" echo define) else if "%i" geq "5" (echo define))
446 .IF "$(GCCWRAPV)" == "define"
448 MINIBUILDOPT += -fwrapv
459 INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
461 .IF "$(WIN64)" == "define"
462 DEFINES += -DWIN64 -DCONSERVATIVE
464 LOCDEFS = -DPERLDLL -DPERL_CORE
468 # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link
469 # correctly if -lmsvcrt is specified explicitly.
475 -lmoldname -lkernel32 -luser32 -lgdi32 \
476 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
477 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
478 -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
480 .IF "$(CFG)" == "Debug"
481 OPTIMIZE = -g -O2 -DDEBUGGING
489 .IF "$(USE_CPLUSPLUS)" == "define"
490 EXTRACFLAGS += $(CXX_FLAG)
492 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
493 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
498 BUILDOPT += -fno-strict-aliasing -mms-bitfields
502 # All but the free version of VC++ 7.x can load DLLs on demand. Makes the test
503 # suite run in about 10% less time.
504 .IF "$(CCTYPE)" != "MSVC70FREE"
505 DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
508 # Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
509 # DLLs. These either need copying everywhere with the binaries, or else need
510 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
511 # simplicity, embed them if they exist (and delete them afterwards so that they
512 # don't get installed too).
513 EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
514 if exist $@.manifest del $@.manifest
515 EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
516 if exist $@.manifest del $@.manifest
518 # Most relevant compiler-specific options fall into two groups:
519 # either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
520 .IF "$(CCTYPE)" == "MSVC60" || \
521 "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
527 .IF "$(__ICC)" != "define"
534 LIB32 = $(LINK32) -lib
541 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
542 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
543 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
544 LOCDEFS = -DPERLDLL -DPERL_CORE
550 .IF "$(CFG)" == "Debug"
551 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
554 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
555 OPTIMIZE = -O1 -MD -Zi -DNDEBUG
556 # we enable debug symbols in release builds also
557 LINK_DBG = -debug -opt:ref,icf
558 # you may want to enable this if you want COFF symbols in the executables
559 # in addition to the PDB symbols. The default Dr. Watson that ships with
560 # Windows can use the the former but not latter. The free WinDbg can be
561 # installed to get better stack traces from just the PDB symbols, so we
562 # avoid the bloat of COFF symbols by default.
563 #LINK_DBG = $(LINK_DBG) -debugtype:both
564 .IF "$(CCTYPE)" != "MSVC60"
565 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
572 .IF "$(WIN64)" == "define"
573 DEFINES += -DWIN64 -DCONSERVATIVE
574 OPTIMIZE += -fp:precise
577 # For now, silence warnings from VC++ 8.x onwards about "unsafe" CRT functions
578 # and POSIX CRT function names being deprecated.
579 .IF "$(PREMSVC80)" == "undef"
580 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
583 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
584 # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
585 # preprocessor option to revert back to the old functionality for
586 # backward compatibility. We define this symbol here for older 32-bit
587 # compilers only (which aren't using it at all) for the sole purpose
588 # of getting it into $Config{ccflags}. That way if someone builds
589 # Perl itself with e.g. VC6 but later installs an XS module using VC8
590 # the time_t types will still be compatible.
591 .IF "$(WIN64)" == "undef"
592 .IF "$(PREMSVC80)" == "define"
593 BUILDOPT += -D_USE_32BIT_TIME_T
598 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
599 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
600 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
601 version.lib odbc32.lib odbccp32.lib comctl32.lib
603 # Avoid __intel_new_proc_init link error for libircmt.
604 # libmmd is /MD equivelent, other variants exist.
605 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
606 # and optimized C89 funcs
607 .IF "$(__ICC)" == "define"
608 LIBBASEFILES += libircmt.lib libmmd.lib
611 # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which
612 # doesn't include the buffer overrun verification code used by the /GS switch.
613 # Since the code links against libraries that are compiled with /GS, this
614 # "security cookie verification" code must be included via bufferoverflow.lib.
615 .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1"
616 LIBBASEFILES += bufferoverflowU.lib
619 LIBFILES = $(LIBBASEFILES) $(LIBC)
621 EXTRACFLAGS = -nologo -GF -W3
622 .IF "$(__ICC)" == "define"
623 EXTRACFLAGS += -Qstd=c99
625 .IF "$(USE_CPLUSPLUS)" == "define"
626 EXTRACFLAGS += $(CXX_FLAG)
628 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
629 $(PCHFLAGS) $(OPTIMIZE)
630 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
631 -libpath:"$(INST_COREDIR)" \
632 -machine:$(PROCESSOR_ARCHITECTURE)
633 LIB_FLAGS = $(LIB_FLAGS) -nologo
640 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
642 .IF "$(PREMSVC80)" == "undef"
643 LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
645 RSC_FLAGS = -DINCLUDE_MANIFEST
649 # used to allow local linking flags that are not propogated into Config.pm,
653 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
655 #################### do not edit below this line #######################
656 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
658 # Some old dmakes (including Sarathy's one at
659 # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
660 # don't support logical OR (||) or logical AND (&&) in conditional
661 # expressions and hence don't process this makefile correctly. Determine
662 # whether this is the case so that we can give the user an error message.
679 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
682 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
685 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
691 .IF "$(CCTYPE)" == "GCC"
692 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
693 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
695 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
696 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
701 .IF "$(CCTYPE)" == "GCC"
702 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
704 $(RSC) -i.. -DINCLUDE_MANIFEST $<
709 MINIPERL = ..\miniperl.exe
711 PERLEXE = ..\perl.exe
712 WPERLEXE = ..\wperl.exe
713 PERLEXESTATIC = ..\perl-static.exe
714 STATICDIR = .\static.tmp
715 GLOBEXE = ..\perlglob.exe
716 CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
717 GENUUDMAP = ..\generate_uudmap.exe
718 .IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define"
724 # Unicode data files generated by mktables
725 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
726 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
727 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
728 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
730 # Directories of Unicode data files generated by mktables
731 UNIDATADIR1 = ..\lib\unicore\To
732 UNIDATADIR2 = ..\lib\unicore\lib
734 PERLEXE_MANIFEST= .\perlexe.manifest
735 PERLEXE_ICO = .\perlexe.ico
736 PERLEXE_RES = .\perlexe.res
739 # Nominate a target which causes extensions to be re-built
740 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
741 # on and really only the interface - i.e. the .def file used to export symbols
743 PERLDEP = perldll.def
746 PL2BAT = bin\pl2bat.pl
769 ..\utils\zipdetails \
779 .IF "$(CCTYPE)" == "GCC"
781 CFGSH_TMPL = config.gc
782 CFGH_TMPL = config_H.gc
783 PERLIMPLIB = ..\libperl521$(a)
784 PERLSTATICLIB = ..\libperl521s$(a)
789 CFGSH_TMPL = config.vc
790 CFGH_TMPL = config_H.vc
795 # makedef.pl must be updated if this changes, and this should normally
796 # only change when there is an incompatible revision of the public API.
797 PERLIMPLIB *= ..\perl521$(a)
798 PERLSTATICLIB *= ..\perl521s$(a)
799 PERLDLL = ..\perl521.dll
801 XCOPY = xcopy /f /r /i /d /y
802 RCOPY = xcopy /f /r /i /e /d /y
844 EXTRACORE_SRC += perllib.c
846 .IF "$(PERL_MALLOC)" == "define"
847 EXTRACORE_SRC += ..\malloc.c
850 EXTRACORE_SRC += ..\perlio.c
896 .\include\sys\errno2.h \
897 .\include\sys\socket.h \
900 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
902 UUDMAP_H = ..\uudmap.h
903 BITCOUNT_H = ..\bitcount.h
904 MG_DATA_H = ..\mg_data.h
905 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
907 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
908 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
909 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
910 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
911 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
912 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
913 DLL_OBJ = $(DYNALOADER)
914 GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o))
916 PERLDLL_OBJ = $(CORE_OBJ)
917 PERLEXE_OBJ = perlmain$(o)
918 PERLEXEST_OBJ = perlmainst$(o)
920 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
922 .IF "$(USE_SETARGV)" != ""
923 SETARGV_OBJ = setargv$(o)
926 .IF "$(ALL_STATIC)" == "define"
927 # some exclusions, unfortunately, until fixed:
928 # - MakeMaker isn't capable enough for SDBM_File (small bug)
929 STATIC_EXT = * !SDBM_File
931 # specify static extensions here, for example:
932 # (be sure to include Win32CORE to load Win32 on demand)
933 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
934 STATIC_EXT = Win32CORE
937 DYNALOADER = ..\DynaLoader$(o)
939 # vars must be separated by "\t+~\t+", since we're using the tempfile
940 # version of config_sh.pl (we were overflowing someone's buffer by
941 # trying to fit them all on the command line)
944 INST_TOP=$(INST_TOP) ~ \
945 INST_VER=$(INST_VER) ~ \
946 INST_ARCH=$(INST_ARCH) ~ \
947 archname=$(ARCHNAME) ~ \
950 ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
951 usecplusplus=$(USE_CPLUSPLUS) ~ \
952 cf_email=$(EMAIL) ~ \
953 d_mymalloc=$(PERL_MALLOC) ~ \
954 libs=$(LIBFILES:f) ~ \
955 incpath=$(CCINCDIR) ~ \
956 libperl=$(PERLIMPLIB:f) ~ \
957 libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
964 static_ext=$(STATIC_EXT) ~ \
965 usethreads=$(USE_ITHREADS) ~ \
966 useithreads=$(USE_ITHREADS) ~ \
967 usemultiplicity=$(USE_MULTI) ~ \
968 use64bitint=$(USE_64_BIT_INT) ~ \
969 uselongdouble=$(USE_LONG_DOUBLE) ~ \
970 uselargefiles=$(USE_LARGE_FILES) ~ \
971 usesitecustomize=$(USE_SITECUST) ~ \
972 LINK_FLAGS=$(LINK_FLAGS) ~ \
973 optimize=$(OPTIMIZE) ~ \
974 ARCHPREFIX=$(ARCHPREFIX) ~ \
981 all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
982 $(CONFIGPM) $(UNIDATAFILES) MakePPPort \
983 $(PERLEXE) Extensions Extensions_nonxs $(PERLSTATIC)
985 regnodes : ..\regnodes.h
987 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
989 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
991 reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
992 $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
995 static: $(PERLEXESTATIC)
997 #----------------------------------------------------------------
1000 .IF "$(NEWDMAKE)" == "define"
1003 @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions.
1004 @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/
1008 $(GLOBEXE) : perlglob$(o)
1009 .IF "$(CCTYPE)" == "GCC"
1010 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
1012 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
1013 perlglob$(o) setargv$(o)
1017 perlglob$(o) : perlglob.c
1019 config.w32 : $(CFGSH_TMPL)
1020 copy $(CFGSH_TMPL) config.w32
1023 # Copy the template config.h and set configurables at the end of it
1024 # as per the options chosen and compiler used.
1025 # Note: This config.h is only used to build miniperl.exe anyway, but
1026 # it's as well to have its options correct to be sure that it builds
1027 # and so that it's "-V" options are correct for use by makedef.pl. The
1028 # real config.h used to build perl.exe is generated from the top-level
1029 # config_h.SH by config_h.PL (run by miniperl.exe).
1031 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
1033 copy $(CFGH_TMPL) config.h
1035 @echo #ifndef _config_h_footer_>>$@
1036 @echo #define _config_h_footer_>>$@
1037 @echo #undef Off_t>>$@
1038 @echo #undef LSEEKSIZE>>$@
1039 @echo #undef Off_t_size>>$@
1040 @echo #undef PTRSIZE>>$@
1041 @echo #undef SSize_t>>$@
1042 @echo #undef HAS_ATOLL>>$@
1043 @echo #undef HAS_STRTOLL>>$@
1044 @echo #undef HAS_STRTOULL>>$@
1045 @echo #undef Size_t_size>>$@
1046 @echo #undef IVTYPE>>$@
1047 @echo #undef UVTYPE>>$@
1048 @echo #undef IVSIZE>>$@
1049 @echo #undef UVSIZE>>$@
1050 @echo #undef NV_PRESERVES_UV>>$@
1051 @echo #undef NV_PRESERVES_UV_BITS>>$@
1052 @echo #undef IVdf>>$@
1053 @echo #undef UVuf>>$@
1054 @echo #undef UVof>>$@
1055 @echo #undef UVxf>>$@
1056 @echo #undef UVXf>>$@
1057 @echo #undef USE_64_BIT_INT>>$@
1058 @echo #undef Gconvert>>$@
1059 @echo #undef HAS_FREXPL>>$@
1060 @echo #undef HAS_ISNANL>>$@
1061 @echo #undef HAS_MODFL>>$@
1062 @echo #undef HAS_MODFL_PROTO>>$@
1063 @echo #undef HAS_SQRTL>>$@
1064 @echo #undef HAS_STRTOLD>>$@
1065 @echo #undef PERL_PRIfldbl>>$@
1066 @echo #undef PERL_PRIgldbl>>$@
1067 @echo #undef PERL_PRIeldbl>>$@
1068 @echo #undef PERL_SCNfldbl>>$@
1069 @echo #undef NVTYPE>>$@
1070 @echo #undef NVSIZE>>$@
1071 @echo #undef LONG_DOUBLESIZE>>$@
1072 @echo #undef NV_OVERFLOWS_INTEGERS_AT>>$@
1073 @echo #undef NVef>>$@
1074 @echo #undef NVff>>$@
1075 @echo #undef NVgf>>$@
1076 @echo #undef USE_LONG_DOUBLE>>$@
1077 @echo #undef USE_CPLUSPLUS>>$@
1078 .IF "$(USE_LARGE_FILES)"=="define"
1079 @echo #define Off_t $(INT64)>>$@
1080 @echo #define LSEEKSIZE ^8>>$@
1081 @echo #define Off_t_size ^8>>$@
1083 @echo #define Off_t long>>$@
1084 @echo #define LSEEKSIZE ^4>>$@
1085 @echo #define Off_t_size ^4>>$@
1087 .IF "$(WIN64)"=="define"
1088 @echo #define PTRSIZE ^8>>$@
1089 @echo #define SSize_t $(INT64)>>$@
1090 @echo #define HAS_ATOLL>>$@
1091 @echo #define HAS_STRTOLL>>$@
1092 @echo #define HAS_STRTOULL>>$@
1093 @echo #define Size_t_size ^8>>$@
1095 @echo #define PTRSIZE ^4>>$@
1096 @echo #define SSize_t int>>$@
1097 @echo #undef HAS_ATOLL>>$@
1098 @echo #undef HAS_STRTOLL>>$@
1099 @echo #undef HAS_STRTOULL>>$@
1100 @echo #define Size_t_size ^4>>$@
1102 .IF "$(USE_64_BIT_INT)"=="define"
1103 @echo #define IVTYPE $(INT64)>>$@
1104 @echo #define UVTYPE unsigned $(INT64)>>$@
1105 @echo #define IVSIZE ^8>>$@
1106 @echo #define UVSIZE ^8>>$@
1107 .IF "$(USE_LONG_DOUBLE)"=="define"
1108 @echo #define NV_PRESERVES_UV>>$@
1109 @echo #define NV_PRESERVES_UV_BITS 64>>$@
1111 @echo #undef NV_PRESERVES_UV>>$@
1112 @echo #define NV_PRESERVES_UV_BITS 53>>$@
1114 @echo #define IVdf "I64d">>$@
1115 @echo #define UVuf "I64u">>$@
1116 @echo #define UVof "I64o">>$@
1117 @echo #define UVxf "I64x">>$@
1118 @echo #define UVXf "I64X">>$@
1119 @echo #define USE_64_BIT_INT>>$@
1121 @echo #define IVTYPE long>>$@
1122 @echo #define UVTYPE unsigned long>>$@
1123 @echo #define IVSIZE ^4>>$@
1124 @echo #define UVSIZE ^4>>$@
1125 @echo #define NV_PRESERVES_UV>>$@
1126 @echo #define NV_PRESERVES_UV_BITS 32>>$@
1127 @echo #define IVdf "ld">>$@
1128 @echo #define UVuf "lu">>$@
1129 @echo #define UVof "lo">>$@
1130 @echo #define UVxf "lx">>$@
1131 @echo #define UVXf "lX">>$@
1132 @echo #undef USE_64_BIT_INT>>$@
1134 .IF "$(USE_LONG_DOUBLE)"=="define"
1135 @echo #define Gconvert(x,n,t,b) sprintf((b),"%.*""Lg",(n),(x))>>$@
1136 @echo #define HAS_FREXPL>>$@
1137 @echo #define HAS_ISNANL>>$@
1138 @echo #define HAS_MODFL>>$@
1139 @echo #define HAS_MODFL_PROTO>>$@
1140 @echo #define HAS_SQRTL>>$@
1141 @echo #define HAS_STRTOLD>>$@
1142 @echo #define PERL_PRIfldbl "Lf">>$@
1143 @echo #define PERL_PRIgldbl "Lg">>$@
1144 @echo #define PERL_PRIeldbl "Le">>$@
1145 @echo #define PERL_SCNfldbl "Lf">>$@
1146 @echo #define NVTYPE long double>>$@
1147 .IF "$(WIN64)"=="define"
1148 @echo #define NVSIZE ^16>>$@
1149 @echo #define LONG_DOUBLESIZE ^16>>$@
1151 @echo #define NVSIZE ^12>>$@
1152 @echo #define LONG_DOUBLESIZE ^12>>$@
1154 @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>>$@
1155 @echo #define NVef "Le">>$@
1156 @echo #define NVff "Lf">>$@
1157 @echo #define NVgf "Lg">>$@
1158 @echo #define USE_LONG_DOUBLE>>$@
1160 @echo #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))>>$@
1161 @echo #undef HAS_FREXPL>>$@
1162 @echo #undef HAS_ISNANL>>$@
1163 @echo #undef HAS_MODFL>>$@
1164 @echo #undef HAS_MODFL_PROTO>>$@
1165 @echo #undef HAS_SQRTL>>$@
1166 @echo #undef HAS_STRTOLD>>$@
1167 @echo #undef PERL_PRIfldbl>>$@
1168 @echo #undef PERL_PRIgldbl>>$@
1169 @echo #undef PERL_PRIeldbl>>$@
1170 @echo #undef PERL_SCNfldbl>>$@
1171 @echo #define NVTYPE double>>$@
1172 @echo #define NVSIZE ^8>>$@
1173 @echo #define LONG_DOUBLESIZE ^8>>$@
1174 @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>>$@
1175 @echo #define NVef "e">>$@
1176 @echo #define NVff "f">>$@
1177 @echo #define NVgf "g">>$@
1178 @echo #undef USE_LONG_DOUBLE>>$@
1180 .IF "$(USE_CPLUSPLUS)"=="define"
1181 @echo #define USE_CPLUSPLUS>>$@
1183 @echo #undef USE_CPLUSPLUS>>$@
1187 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
1188 cd .. && miniperl -Ilib make_patchnum.pl
1190 # make sure that we recompile perl.c if the git version changes
1191 ..\perl$(o) : ..\git_version.h
1193 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
1194 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
1195 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
1197 # This target is for when changes to the main config.sh happen.
1198 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1199 # with MULTI, ITHREADS, IMP_SYS and LARGE_FILES off), then make
1200 # this target to regenerate config_H.gc.
1202 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
1203 $(CFGSH_TMPL) > ..\config.sh
1204 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1205 -del /f $(CFGH_TMPL)
1206 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1207 rename config.h $(CFGH_TMPL)
1209 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
1210 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1211 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
1212 $(XCOPY) ..\*.h $(COREDIR)\*.*
1213 $(XCOPY) *.h $(COREDIR)\*.*
1214 $(RCOPY) include $(COREDIR)\*.*
1215 $(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \
1216 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
1218 # See the comment in Makefile.SH explaining this seemingly cranky ordering
1219 $(MINIPERL) : ..\lib\buildcustomize.pl
1221 ..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl
1222 .IF "$(CCTYPE)" == "GCC"
1223 $(LINK32) -v -mconsole -o $(MINIPERL) $(BLINK_FLAGS) \
1224 $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
1226 $(LINK32) -subsystem:console -out:$(MINIPERL) $(BLINK_FLAGS) \
1227 @$(mktmp $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ))
1228 $(EMBED_EXE_MANI:s/$@/$(MINIPERL)/)
1230 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1233 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1235 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1236 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*B).c
1238 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1239 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*B).c
1241 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1242 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1243 # unless the .IF is true), so instead we use a .ELSE with the default.
1244 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1246 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1247 .IF "$(USE_IMP_SYS)" == "define"
1248 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1250 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1253 # 1. we don't want to rebuild miniperl.exe when config.h changes
1254 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1255 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1256 $(MINI_OBJ) : $(CORE_NOCFG_H)
1258 $(WIN32_OBJ) : $(CORE_H)
1260 $(CORE_OBJ) : $(CORE_H)
1262 $(DLL_OBJ) : $(CORE_H)
1264 perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
1265 $(MINIPERL) -I..\lib create_perllibst_h.pl
1266 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1267 $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1269 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1270 .IF "$(CCTYPE)" == "GCC"
1271 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
1272 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1273 $(shell @type Extensions_static) \
1274 $(LIBFILES) $(LKPOST))
1275 $(IMPLIB) --output-lib $(PERLIMPLIB) \
1276 --dllname $(PERLDLL:b).dll \
1278 --base-file perl.base \
1279 --output-exp perl.exp
1280 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1281 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1282 $(shell @type Extensions_static) \
1283 $(LIBFILES) perl.exp $(LKPOST))
1285 $(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \
1286 @Extensions_static \
1287 @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
1288 $(PERLDLL_RES) $(PERLDLL_OBJ))
1291 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1293 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1294 .IF "$(CCTYPE)" == "GCC"
1295 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1296 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1297 for %i in ($(shell @type Extensions_static)) do \
1298 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1299 $(ARCHPREFIX)ar x ..\%i && \
1300 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1301 cd .. && rmdir /s /q $(STATICDIR)
1303 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1304 @$(mktmp $(PERLDLL_OBJ))
1306 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1308 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1310 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1312 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1314 $(BITCOUNT_H) : $(GENUUDMAP)
1315 $(GENUUDMAP) $(GENERATED_HEADERS)
1317 $(GENUUDMAP_OBJ) : ..\mg_raw.h
1319 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1320 .IF "$(CCTYPE)" == "GCC"
1321 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1322 $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST))
1324 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1325 @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ))
1329 perlmain.c : runperl.c
1330 copy runperl.c perlmain.c
1332 perlmain$(o) : perlmain.c
1333 $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ -c perlmain.c
1335 perlmainst.c : runperl.c
1336 copy runperl.c perlmainst.c
1338 perlmainst$(o) : perlmainst.c
1339 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1341 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1342 .IF "$(CCTYPE)" == "GCC"
1343 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1344 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1346 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1347 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1350 copy $(PERLEXE) $(WPERLEXE)
1351 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1353 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1354 .IF "$(CCTYPE)" == "GCC"
1355 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1356 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1358 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1359 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1363 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1364 $(MINIPERL) -I..\lib ..\mkppport
1366 #-------------------------------------------------------------------------------
1367 # There's no direct way to mark a dependency on
1368 # DynaLoader.pm, so this will have to do
1369 Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1370 $(XCOPY) ..\*.h $(COREDIR)\*.*
1371 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1373 Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1374 $(XCOPY) ..\*.h $(COREDIR)\*.*
1375 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1377 Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1378 $(XCOPY) ..\*.h $(COREDIR)\*.*
1379 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1380 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1382 Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
1383 $(XCOPY) ..\*.h $(COREDIR)\*.*
1384 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1386 $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1387 $(XCOPY) ..\*.h $(COREDIR)\*.*
1388 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1391 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1393 Extensions_realclean :
1394 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1396 #-------------------------------------------------------------------------------
1399 doc: $(PERLEXE) ..\pod\perltoc.pod
1400 $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1401 --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1404 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1405 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1407 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1408 # so please check that script before making structural changes here
1409 utils: $(PERLEXE) ..\utils\Makefile
1410 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1411 copy ..\README.aix ..\pod\perlaix.pod
1412 copy ..\README.amiga ..\pod\perlamiga.pod
1413 copy ..\README.android ..\pod\perlandroid.pod
1414 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1415 copy ..\README.ce ..\pod\perlce.pod
1416 copy ..\README.cn ..\pod\perlcn.pod
1417 copy ..\README.cygwin ..\pod\perlcygwin.pod
1418 copy ..\README.dos ..\pod\perldos.pod
1419 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1420 copy ..\README.haiku ..\pod\perlhaiku.pod
1421 copy ..\README.hpux ..\pod\perlhpux.pod
1422 copy ..\README.hurd ..\pod\perlhurd.pod
1423 copy ..\README.irix ..\pod\perlirix.pod
1424 copy ..\README.jp ..\pod\perljp.pod
1425 copy ..\README.ko ..\pod\perlko.pod
1426 copy ..\README.linux ..\pod\perllinux.pod
1427 copy ..\README.macos ..\pod\perlmacos.pod
1428 copy ..\README.macosx ..\pod\perlmacosx.pod
1429 copy ..\README.netware ..\pod\perlnetware.pod
1430 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1431 copy ..\README.os2 ..\pod\perlos2.pod
1432 copy ..\README.os390 ..\pod\perlos390.pod
1433 copy ..\README.os400 ..\pod\perlos400.pod
1434 copy ..\README.plan9 ..\pod\perlplan9.pod
1435 copy ..\README.qnx ..\pod\perlqnx.pod
1436 copy ..\README.riscos ..\pod\perlriscos.pod
1437 copy ..\README.solaris ..\pod\perlsolaris.pod
1438 copy ..\README.symbian ..\pod\perlsymbian.pod
1439 copy ..\README.synology ..\pod\perlsynology.pod
1440 copy ..\README.tru64 ..\pod\perltru64.pod
1441 copy ..\README.tw ..\pod\perltw.pod
1442 copy ..\README.vos ..\pod\perlvos.pod
1443 copy ..\README.win32 ..\pod\perlwin32.pod
1444 copy ..\pod\perldelta.pod ..\pod\perl5219delta.pod
1445 $(PERLEXE) $(PL2BAT) $(UTILS)
1446 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1447 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1449 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1450 $(PERLEXE) -f ..\pod\buildtoc -q
1452 # Note that the pod cleanup in this next section is parsed (and regenerated
1453 # by pod/buildtoc so please check that script before making changes here
1455 distclean: realclean
1456 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1457 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1458 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1459 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1460 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1461 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1462 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1463 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1464 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1465 -del /f $(LIBDIR)\File\Glob.pm
1466 -del /f $(LIBDIR)\Storable.pm
1467 -del /f $(LIBDIR)\Sys\Hostname.pm
1468 -del /f $(LIBDIR)\Time\HiRes.pm
1469 -del /f $(LIBDIR)\Unicode\Normalize.pm
1470 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1471 -del /f $(LIBDIR)\Win32.pm
1472 -del /f $(LIBDIR)\Win32CORE.pm
1473 -del /f $(LIBDIR)\Win32API\File.pm
1474 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1475 -del /f $(LIBDIR)\buildcustomize.pl
1476 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1478 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1479 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1480 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1481 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1482 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1483 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1484 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1485 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1486 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1487 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1488 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1489 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1490 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1491 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1492 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1493 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1494 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1495 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1496 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1497 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1498 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1499 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1500 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1501 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1502 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1503 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1504 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1505 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1506 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1507 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1508 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1509 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1510 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1511 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1512 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1513 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1514 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1515 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1516 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1517 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1518 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1519 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1520 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1521 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1522 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1523 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1524 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1525 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1526 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1527 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1528 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1529 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1530 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1531 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1532 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1533 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1534 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1535 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1536 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1537 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1538 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1539 perl5219delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1540 perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1541 perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1542 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1543 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1544 perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1545 perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1546 perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
1547 perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
1549 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1550 perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
1551 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1552 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1555 -del /f ..\lib\Config_git.pl
1558 -del /f $(PERLEXE_RES) perl.base
1559 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1560 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1561 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1562 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1563 -del /s ..\utils\Makefile
1564 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1565 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1566 -if exist pod2htmd.tmp del pod2htmd.tmp
1567 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1568 -del /f ..\t\test_state
1570 install : all installbare installhtml
1572 installbare : utils ..\pod\perltoc.pod
1573 $(PERLEXE) ..\installperl
1574 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1575 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1576 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1577 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1578 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1581 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1583 inst_lib : $(CONFIGPM)
1584 $(RCOPY) ..\lib $(INST_LIB)\*.*
1586 $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1587 cd ..\lib\unicore && \
1588 ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p
1590 minitest : .\config.h $(MINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) test-prep-gcc
1591 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1592 if exist ..\t\perl.exe del /f ..\t\perl.exe
1593 rename ..\t\miniperl.exe perl.exe
1594 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1595 # Note this perl.exe is miniperl
1596 cd ..\t && perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t
1598 test-prep : all utils ..\pod\perltoc.pod test-prep-gcc
1599 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1600 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1601 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1603 # If building with gcc versions 4.x.x or greater, then
1604 # the GCC helper DLL will also need copied to the test directory.
1605 # The name of the dll can change, depending upon which vendor has supplied
1606 # your compiler, and upon the values of "x".
1607 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1608 # Without this copying, the op/taint.t test script will fail.
1610 .IF "$(CCTYPE)" == "GCC"
1611 if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
1612 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1613 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1614 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1615 if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
1619 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1620 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1622 test_porting : test-prep
1623 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1624 cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1626 test-reonly : reonly utils
1627 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1628 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1629 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1630 cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA)
1635 test-notty : test-prep
1636 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1637 set PERL_SKIP_TTY_TEST=1 && \
1638 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1641 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1642 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1643 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1644 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1645 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1648 -@erase miniperlmain$(o)
1650 -@erase perlglob$(o)
1651 -@erase perlmain$(o)
1652 -@erase perlmainst$(o)
1655 -@erase /f ..\git_version.h
1659 -@erase $(PERLEXESTATIC)
1660 -@erase $(PERLSTATICLIB)
1663 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1664 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1665 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1666 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1667 -@erase $(UNIDATAFILES)
1668 -@erase $(WIN32_OBJ)
1670 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1671 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1674 -@erase Extensions_static
1678 clean : Extensions_clean _clean
1680 realclean : Extensions_realclean _clean
1682 # Handy way to run perlbug -ok without having to install and run the
1683 # installed perlbug. We don't re-run the tests here - we trust the user.
1684 # Please *don't* use this unless all tests pass.
1685 # If you want to report test failures, use "dmake nok" instead.
1687 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
1690 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1693 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
1696 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok