2 # Makefile to build perl on Windows NT using DMAKE.
4 # Visual C++ 2.0 or later
5 # Borland C++ 5.02 or later
6 # MinGW with gcc-2.95.2 or later
7 # MS Platform SDK 64-bit compiler and tools **experimental**
9 # This is set up to build a perl.exe that runs off a shared library
10 # (perl513.dll). Also makes individual DLLs for the XS extensions.
14 ## Make sure you read README.win32 *before* you mess with anything here!
18 ## Build configuration. Edit the values below to suit your needs.
22 # Set these to wherever you want "dmake install" to put your
26 INST_TOP *= $(INST_DRV)\perl
29 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
30 # on a 64-bit version of Windows.
34 # Comment this out if you DON'T want your perl installation to be versioned.
35 # This means that the new installation will overwrite any files from the
36 # old installation at the same INST_TOP location. Leaving it enabled is
37 # the safest route, as perl adds the extra version directory to all the
38 # locations it installs files to. If you disable it, an alternative
39 # versioned installation can be obtained by setting INST_TOP above to a
40 # path that includes an arbitrary version string.
45 # Comment this out if you DON'T want your perl installation to have
46 # architecture specific components. This means that architecture-
47 # specific files will be installed along with the architecture-neutral
48 # files. Leaving it enabled is safer and more flexible, in case you
49 # want to build multiple flavors of perl and install them together in
50 # the same location. Commenting it out gives you a simpler
51 # installation that is easier to understand for beginners.
53 #INST_ARCH *= \$(ARCHNAME)
56 # Uncomment this if you want perl to run
57 # $Config{sitelibexp}\sitecustomize.pl
58 # before anything else. This script can then be set up, for example,
59 # to add additional entries to @INC.
61 #USE_SITECUST *= define
64 # uncomment to enable multiple interpreters. This is need for fork()
65 # emulation and for thread support.
70 # Interpreter cloning/threads; now reasonably complete.
71 # This should be enabled to get the fork() emulation.
72 # This needs USE_MULTI above.
74 USE_ITHREADS *= define
77 # uncomment to enable the implicit "host" layer for all system calls
78 # made by perl. This needs USE_MULTI above.
79 # This is also needed to get fork().
84 # Comment out next assign to disable perl's I/O subsystem and use compiler's
85 # stdio for IO - depending on your compiler vendor and run time library you may
86 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
87 # You will also be unable to take full advantage of perl5.8's support for multiple
88 # encodings and may see lower IO performance. You have been warned.
92 # Comment this out if you don't want to enable large file support for
93 # some reason. Should normally only be changed to maintain compatibility
94 # with an older release of perl.
95 USE_LARGE_FILES *= define
98 # uncomment exactly one of the following
102 # Visual C++ > 2.x and < 6.x
104 # Visual C++ 6.x (aka Visual C++ 98)
106 # Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
107 #CCTYPE *= MSVC70FREE
108 # Visual C++ .NET 2003 (aka Visual C++ 7.x) (full version)
110 # Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
111 #CCTYPE *= MSVC80FREE
112 # Visual C++ 2005 (aka Visual C++ 8.x) (full version)
114 # Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
115 #CCTYPE *= MSVC90FREE
116 # Visual C++ 2008 (aka Visual C++ 9.x) (full version)
118 # Borland 5.02 or later
120 # MinGW or mingw-w64 with gcc-2.95.2 or later
124 # uncomment this if your Borland compiler is older than v5.4.
127 # uncomment this if you want to use Borland's VCL as your CRT
131 # uncomment this if you are compiling under Windows 95/98 and command.com
132 # (not needed if you're running under 4DOS/NT 6.01 or later)
136 # uncomment next line if you want debug version of perl (big,slow)
137 # If not enabled, we automatically try to use maximum optimization
138 # with all compilers that are known to have a working optimizer.
143 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
144 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
145 # This currently requires VC 5.0 with Service Pack 3 or later.
146 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
147 # and follow the directions in the package to install.
149 # Not recommended if you have VC 6.x and you're not running Windows 9x.
151 #USE_PERLCRT *= define
154 # uncomment to enable linking with setargv.obj under the Visual C
155 # compiler. Setting this options enables perl to expand wildcards in
156 # arguments, but it may be harder to use alternate methods like
157 # File::DosGlob that are more powerful. This option is supported only with
160 #USE_SETARGV *= define
163 # if you want to have the crypt() builtin function implemented, leave this or
164 # CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable
165 # version of des_fcrypt().
167 CRYPT_SRC *= fcrypt.c
170 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
171 # library, uncomment this, and make sure the library exists (see README.win32)
172 # Specify the full pathname of the library.
174 #CRYPT_LIB *= fcrypt.lib
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 perl513s.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)" == "BORLAND"
218 CCHOME *= C:\Borland\BCC55
219 .ELIF "$(CCTYPE)" == "GCC"
224 CCINCDIR *= $(CCHOME)\include
225 CCLIBDIR *= $(CCHOME)\lib
228 # If building with gcc-4.x.x (or x86_64-w64-mingw32-gcc-4.x.x), then
229 # uncomment the following assignment to GCC_4XX, make sure that CCHOME
230 # has been set correctly above, and uncomment the appropriate
232 # The name of the dll can change, depending upon which vendor has supplied
233 # your 4.x.x compiler, and upon the values of "x".
234 # (The dll will be in your mingw/bin folder, so check there if you're
235 # unsure about the correct name.)
236 # Without these corrections, the op/taint.t test script will fail.
239 #GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_sjlj-1.dll
240 #GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_dw2-1.dll
241 #GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_1.dll
244 # uncomment this if you are using x86_64-w64-mingw32 cross-compiler
245 # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc'
246 # instead of the usual 'gcc'.
251 # Additional compiler flags can be specified here.
253 BUILDOPT *= $(BUILDOPTEXTRA)
256 # Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's
257 # internal hash function unless the PERL_HASH_SEED environment variable is set.
258 # Alternatively, adding -DNO_HASH_SEED will completely disable the
259 # randomization feature.
260 # The latter is required to maintain binary compatibility with Perl 5.8.0.
262 #BUILDOPT += -DPERL_HASH_SEED_EXPLICIT
263 #BUILDOPT += -DNO_HASH_SEED
266 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
267 # for old symbols by default, at the expense of extreme pollution. You most
268 # probably just want to build modules that won't compile with
269 # perl Makefile.PL POLLUTE=1
270 # instead of enabling this. Please report such modules to the respective
273 #BUILDOPT += -DPERL_POLLUTE
276 # This should normally be disabled. Enabling it will disable the File::Glob
277 # implementation of CORE::glob.
279 #BUILDOPT += -DPERL_EXTERNAL_GLOB
282 # This should normally be disabled. Enabling it causes perl to read scripts
283 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
285 #BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
288 # specify semicolon-separated list of extra directories that modules will
289 # look for libraries (spaces in path names need not be quoted)
294 # set this to point to cmd.exe (only needed if you use some
295 # alternate shell that doesn't grok cmd.exe style commands)
297 #SHELL *= g:\winnt\system32\cmd.exe
300 # set this to your email address (perl will guess a value from
301 # from your loginname and your hostname, which may not be right)
306 ## Build configuration ends.
309 ##################### CHANGE THESE ONLY IF YOU MUST #####################
311 .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
315 CRYPT_FLAG = -DHAVE_DES_FCRYPT
319 DEBUG_MSTATS *= undef
321 USE_SITECUST *= undef
323 USE_ITHREADS *= undef
326 USE_LARGE_FILES *= undef
329 .IF "$(USE_IMP_SYS)" == "define"
333 .IF "$(PERL_MALLOC)" == "undef"
337 .IF "$(DEBUG_MSTATS)" == "define"
338 BUILDOPT += -DPERL_DEBUGGING_MSTATS
341 .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
345 .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
349 .IF "$(USE_SITECUST)" == "define"
350 BUILDOPT += -DUSE_SITECUSTOMIZE
353 .IF "$(USE_MULTI)" != "undef"
354 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
357 .IF "$(USE_IMP_SYS)" != "undef"
358 BUILDOPT += -DPERL_IMPLICIT_SYS
361 .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE PROCESSOR_ARCHITEW6432 WIN64
363 PROCESSOR_ARCHITECTURE *= x86
366 # When we are running from a 32bit cmd.exe on AMD64 then
367 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
369 .IF "$(PROCESSOR_ARCHITEW6432)" != ""
370 PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
372 .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
379 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
380 .IF "$(ARCHITECTURE)" == "AMD64"
383 .IF "$(ARCHITECTURE)" == "IA64"
387 .IF "$(USE_MULTI)" == "define"
388 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
390 .IF "$(USE_PERLIO)" == "define"
391 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
393 ARCHNAME = MSWin32-$(ARCHITECTURE)
397 .IF "$(USE_ITHREADS)" == "define"
398 ARCHNAME !:= $(ARCHNAME)-thread
401 # Visual C++ 98, .NET 2003, 2005 and 2008 specific.
402 # VC++ 6.x, 7.x, 8.x and 9.x can load DLL's on demand. Makes the test suite run
403 # in about 10% less time. (The free version of 7.x can't do this, but the free
404 # versions of 8.x and 9.x can.)
405 .IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70" || \
406 "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" ||
407 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
408 DELAYLOAD *= -DELAYLOAD:ws2_32.dll delayimp.lib
411 # Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
412 # DLLs. These either need copying everywhere with the binaries, or else need
413 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
414 # simplicity, embed them if they exist (and delete them afterwards so that they
415 # don't get installed too).
416 EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
417 if exist $@.manifest del $@.manifest
418 EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
419 if exist $@.manifest del $@.manifest
421 ARCHDIR = ..\lib\$(ARCHNAME)
422 COREDIR = ..\lib\CORE
423 AUTODIR = ..\lib\auto
429 EXTUTILSDIR = $(LIBDIR)\ExtUtils
433 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
434 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
435 INST_LIB = $(INST_TOP)$(INST_VER)\lib
436 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
437 INST_COREDIR = $(INST_ARCHLIB)\CORE
438 INST_HTML = $(INST_TOP)$(INST_VER)\html
441 # Programs to compile, build .lib files and link
446 .IF "$(CCTYPE)" == "BORLAND"
449 .IF "$(BCCOLD)" != "define"
454 LIB32 = tlib /a /P128
461 INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
462 #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
463 DEFINES = -DWIN32 $(CRYPT_FLAG)
464 LOCDEFS = -DPERLDLL -DPERL_CORE
470 # same libs as MSVC, except Borland doesn't have oldnames.lib
471 LIBFILES = $(CRYPT_LIB) \
472 kernel32.lib user32.lib gdi32.lib winspool.lib \
473 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
474 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
475 version.lib odbc32.lib odbccp32.lib comctl32.lib \
478 .IF "$(CFG)" == "Debug"
479 OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
482 OPTIMIZE = -O2 -D_RTLDLL
487 CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
488 $(PCHFLAGS) $(OPTIMIZE)
489 LINK_FLAGS = $(LINK_DBG) -x -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" \
494 .IF "$(BCCOLD)" != "define"
496 DEFINES += -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0x0410
498 .IF "$(BCCVCL)" == "define"
499 LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib
500 LINK_FLAGS += -L"$(CCLIBDIR)\Release"
504 .ELIF "$(CCTYPE)" == "GCC"
506 .IF "$(GCCCROSS)" == "define"
507 ARCHPREFIX = x86_64-w64-mingw32-
510 CC = $(ARCHPREFIX)gcc
511 LINK32 = $(ARCHPREFIX)g++
512 LIB32 = $(ARCHPREFIX)ar rc
513 IMPLIB = $(ARCHPREFIX)dlltool
514 RSC = $(ARCHPREFIX)windres
524 INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
525 DEFINES = -DWIN32 $(CRYPT_FLAG)
526 .IF "$(WIN64)" == "define"
527 DEFINES += -DWIN64 -DCONSERVATIVE
529 LOCDEFS = -DPERLDLL -DPERL_CORE
533 # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link
534 # correctly if -lmsvcrt is specified explicitly.
539 LIBFILES = $(CRYPT_LIB) $(LIBC) \
540 -lmoldname -lkernel32 -luser32 -lgdi32 \
541 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
542 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
543 -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
545 .IF "$(CFG)" == "Debug"
546 OPTIMIZE = -g -O2 -DDEBUGGING
554 CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
555 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
560 # NOTE: we assume that GCC uses MSVCRT.DLL
561 # See comments about PERL_MSVCRT_READFIX in the "cl" compiler section below.
562 BUILDOPT += -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX
568 LIB32 = $(LINK32) -lib
575 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
576 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
577 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
578 LOCDEFS = -DPERLDLL -DPERL_CORE
582 .IF "$(USE_PERLCRT)" != "define"
588 .IF "$(CFG)" == "Debug"
589 .IF "$(CCTYPE)" == "MSVC20"
590 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
592 OPTIMIZE = -O1 -MD -Zi -DDEBUGGING
596 OPTIMIZE = -MD -Zi -DNDEBUG
597 # we enable debug symbols in release builds also
598 LINK_DBG = -debug -opt:ref,icf
599 # you may want to enable this if you want COFF symbols in the executables
600 # in addition to the PDB symbols. The default Dr. Watson that ships with
601 # Windows can use the the former but not latter. The free WinDbg can be
602 # installed to get better stack traces from just the PDB symbols, so we
603 # avoid the bloat of COFF symbols by default.
604 #LINK_DBG = $(LINK_DBG) -debugtype:both
605 .IF "$(WIN64)" == "define"
606 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
610 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
616 .IF "$(WIN64)" == "define"
617 DEFINES += -DWIN64 -DCONSERVATIVE
618 OPTIMIZE += -Wp64 -fp:precise
621 # For now, silence VC++ 8.x's and 9.x's warnings about "unsafe" CRT functions
622 # and POSIX CRT function names being deprecated.
623 .IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
624 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
625 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
628 # Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using
629 # VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which
630 # do not require the fix.
631 .IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60"
632 .IF "$(USE_PERLCRT)" != "define"
633 BUILDOPT += -DPERL_MSVCRT_READFIX
637 LIBBASEFILES = $(CRYPT_LIB) \
638 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
639 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
640 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
641 version.lib odbc32.lib odbccp32.lib comctl32.lib
643 # The 64 bit Platform SDK compilers contain a runtime library that doesn't
644 # include the buffer overrun verification code used by the /GS switch.
645 # Since the code links against libraries that are compiled with /GS, this
646 # "security cookie verification" must be included via bufferoverlow.lib.
647 .IF "$(WIN64)" == "define"
648 LIBBASEFILES += bufferoverflowU.lib
651 # we add LIBC here, since we may be using PerlCRT.dll
652 LIBFILES = $(LIBBASEFILES) $(LIBC)
654 EXTRACFLAGS = -nologo -GF -W3
655 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
656 $(PCHFLAGS) $(OPTIMIZE)
657 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
658 -libpath:"$(INST_COREDIR)" \
659 -machine:$(PROCESSOR_ARCHITECTURE)
667 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
669 .IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
670 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
671 LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
673 RSC_FLAGS = -DINCLUDE_MANIFEST
677 # used to allow local linking flags that are not propogated into Config.pm,
681 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
683 #################### do not edit below this line #######################
684 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
686 # Some old dmakes (including Sarathy's one at
687 # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
688 # don't support logical OR (||) or logical AND (&&) in conditional
689 # expressions and hence don't process this makefile correctly. Determine
690 # whether this is the case so that we can give the user an error message.
707 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
710 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
713 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
719 .IF "$(CCTYPE)" == "BORLAND"
720 $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
721 $(IMPLIB) $(*B).lib $@
722 .ELIF "$(CCTYPE)" == "GCC"
723 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
724 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
726 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
727 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
732 .IF "$(CCTYPE)" == "GCC"
733 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
735 $(RSC) -i.. -DINCLUDE_MANIFEST $<
740 MINIPERL = ..\miniperl.exe
742 PERLEXE = ..\perl.exe
743 WPERLEXE = ..\wperl.exe
744 PERLEXESTATIC = ..\perl-static.exe
745 GLOBEXE = ..\perlglob.exe
746 CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
747 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
749 GENUUDMAP = ..\generate_uudmap.exe
750 .IF "$(BUILD_STATIC)" == "define"
756 # Unicode data files generated by mktables
757 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
758 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
759 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
761 # Directories of Unicode data files generated by mktables
762 UNIDATADIR1 = ..\lib\unicore\To
763 UNIDATADIR2 = ..\lib\unicore\lib
765 PERLEXE_MANIFEST= .\perlexe.manifest
766 PERLEXE_ICO = .\perlexe.ico
767 PERLEXE_RES = .\perlexe.res
770 # Nominate a target which causes extensions to be re-built
771 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
772 # on and really only the interface - i.e. the .def file used to export symbols
774 PERLDEP = perldll.def
777 PL2BAT = bin\pl2bat.pl
778 GLOBBAT = bin\perlglob.bat
794 ..\utils\config_data \
801 ..\utils\cpanp-run-perl \
822 .IF "$(CCTYPE)" == "BORLAND"
824 CFGSH_TMPL = config.bc
825 CFGH_TMPL = config_H.bc
827 .ELIF "$(CCTYPE)" == "GCC"
829 .IF "$(WIN64)" == "define"
830 .IF "$(GCCCROSS)" == "define"
831 CFGSH_TMPL = config.gc64
832 CFGH_TMPL = config_H.gc64
834 CFGSH_TMPL = config.gc64nox
835 CFGH_TMPL = config_H.gc64nox
838 CFGSH_TMPL = config.gc
839 CFGH_TMPL = config_H.gc
841 PERLIMPLIB = ..\libperl511$(a)
842 PERLSTATICLIB = ..\libperl511s$(a)
846 .IF "$(WIN64)" == "define"
847 CFGSH_TMPL = config.vc64
848 CFGH_TMPL = config_H.vc64
850 CFGSH_TMPL = config.vc
851 CFGH_TMPL = config_H.vc
856 # makedef.pl must be updated if this changes, and this should normally
857 # only change when there is an incompatible revision of the public API.
858 PERLIMPLIB *= ..\perl513$(a)
859 PERLSTATICLIB *= ..\perl513s$(a)
860 PERLDLL = ..\perl513.dll
862 XCOPY = xcopy /f /r /i /d /y
863 RCOPY = xcopy /f /r /i /e /d /y
903 EXTRACORE_SRC += perllib.c
905 .IF "$(PERL_MALLOC)" == "define"
906 EXTRACORE_SRC += ..\malloc.c
909 EXTRACORE_SRC += ..\perlio.c
916 # We need this for miniperl build unless we override canned
917 # config.h #define building mini\*
918 #.IF "$(USE_PERLIO)" == "define"
919 WIN32_SRC += .\win32io.c
922 .IF "$(CRYPT_SRC)" != ""
923 WIN32_SRC += .\$(CRYPT_SRC)
970 .\include\sys\socket.h \
973 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
975 UUDMAP_H = ..\uudmap.h
976 BITCOUNT_H = ..\bitcount.h
978 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
979 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
980 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
981 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
982 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
983 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
984 DLL_OBJ = $(DYNALOADER)
985 X2P_OBJ = $(X2P_SRC:db:+$(o))
986 GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o))
988 PERLDLL_OBJ = $(CORE_OBJ)
989 PERLEXE_OBJ = perlmain$(o)
990 PERLEXEST_OBJ = perlmainst$(o)
992 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
994 .IF "$(USE_SETARGV)" != ""
995 SETARGV_OBJ = setargv$(o)
998 .IF "$(ALL_STATIC)" == "define"
999 # some exclusions, unfortunately, until fixed:
1000 # - Win32 extension contains overlapped symbols with win32.c (BUG!)
1001 # - MakeMaker isn't capable enough for SDBM_File (smaller bug)
1002 # - Encode (encoding search algorithm relies on shared library?)
1003 STATIC_EXT = * !Win32 !SDBM_File !Encode
1005 # specify static extensions here, for example:
1006 #STATIC_EXT = Cwd Compress/Raw/Zlib
1007 STATIC_EXT = Win32CORE
1010 DYNALOADER = ..\DynaLoader$(o)
1012 # vars must be separated by "\t+~\t+", since we're using the tempfile
1013 # version of config_sh.pl (we were overflowing someone's buffer by
1014 # trying to fit them all on the command line)
1017 INST_DRV=$(INST_DRV) ~ \
1018 INST_TOP=$(INST_TOP) ~ \
1019 INST_VER=$(INST_VER) ~ \
1020 INST_ARCH=$(INST_ARCH) ~ \
1021 archname=$(ARCHNAME) ~ \
1024 ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
1025 cf_email=$(EMAIL) ~ \
1026 d_crypt=$(D_CRYPT) ~ \
1027 d_mymalloc=$(PERL_MALLOC) ~ \
1028 libs=$(LIBFILES:f) ~ \
1029 incpath=$(CCINCDIR) ~ \
1030 libperl=$(PERLIMPLIB:f) ~ \
1031 libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
1038 static_ext=$(STATIC_EXT) ~ \
1039 usethreads=$(USE_ITHREADS) ~ \
1040 useithreads=$(USE_ITHREADS) ~ \
1041 usemultiplicity=$(USE_MULTI) ~ \
1042 useperlio=$(USE_PERLIO) ~ \
1043 uselargefiles=$(USE_LARGE_FILES) ~ \
1044 usesitecustomize=$(USE_SITECUST) ~ \
1045 LINK_FLAGS=$(LINK_FLAGS) ~ \
1046 optimize=$(OPTIMIZE)
1049 # set up targets varying between Win95 and WinNT builds
1052 .IF "$(IS_WIN95)" == "define"
1054 RIGHTMAKE = __switch_makefiles
1060 .IMPORT .IGNORE : SystemRoot windir
1062 # Don't just .IMPORT OS from the environment because dmake sets OS itself.
1063 ENV_OS=$(subst,OS=, $(shell @set OS))
1065 .IF "$(ENV_OS)" == "Windows_NT"
1066 ODBCCP32_DLL = $(SystemRoot)\system32\odbccp32.dll
1068 ODBCCP32_DLL = $(windir)\system\odbccp32.dll
1071 ICWD = -I..\cpan\Cwd -I..\cpan\Cwd\lib
1077 all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) $(MK2) \
1078 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) MakePPPort \
1079 $(PERLEXE) $(X2P) Extensions Extensions_nonxs $(PERLSTATIC)
1081 ..\regcharclass.h : ..\Porting\regcharclass.pl
1082 cd .. && miniperl Porting\regcharclass.pl && cd win32
1084 regnodes : ..\regnodes.h
1086 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
1088 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
1090 reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) $(MK2) \
1091 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
1092 $(X2P) Extensions_reonly
1094 static: $(PERLEXESTATIC)
1096 #----------------------------------------------------------------
1098 #-------------------- BEGIN Win95 SPECIFIC ----------------------
1100 # this target is a jump-off point for Win95
1101 # 1. it switches to the Win95-specific makefile if it exists
1102 # (__do_switch_makefiles)
1103 # 2. it prints a message when the Win95-specific one finishes (__done)
1104 # 3. it then kills this makefile by trying to make __no_such_target
1106 __switch_makefiles: __do_switch_makefiles __done __no_such_target
1108 __do_switch_makefiles:
1109 .IF "$(NOTFIRST)" != "true"
1110 if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true
1115 .IF "$(NOTFIRST)" != "true"
1117 @echo Build process complete. Ignore any errors after this message.
1118 @echo Run "dmake test" to test and "dmake install" to install
1121 # dummy targets for Win95-specific makefile
1131 # This target is used to generate the new makefile (.\makefile.95) for Win95
1133 .\makefile.95: .\makefile.mk
1134 $(MINIPERL) genmk95.pl makefile.mk $(MK2)
1136 #--------------------- END Win95 SPECIFIC ---------------------
1138 # a blank target for when builds don't need to do certain things
1139 # this target added for Win95 port but used to keep the WinNT port able to
1145 .IF "$(NEWDMAKE)" == "define"
1148 @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions.
1149 @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/
1153 $(GLOBEXE) : perlglob$(o)
1154 .IF "$(CCTYPE)" == "BORLAND"
1155 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
1156 $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \
1157 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
1158 .ELIF "$(CCTYPE)" == "GCC"
1159 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
1161 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
1162 perlglob$(o) setargv$(o)
1166 perlglob$(o) : perlglob.c
1168 config.w32 : $(CFGSH_TMPL)
1169 copy $(CFGSH_TMPL) config.w32
1171 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
1173 copy $(CFGH_TMPL) config.h
1175 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
1176 cd .. && miniperl -Ilib make_patchnum.pl
1178 # make sure that we recompile perl.c if the git version changes
1179 ..\perl$(o) : ..\git_version.h
1181 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
1182 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
1183 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
1185 # this target is for when changes to the main config.sh happen.
1186 # edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1187 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES, PERLIO and CRYPT off), then make
1188 # this target to regenerate config_H.gc.
1189 # unfortunately, some further manual editing is also then required to restore all
1190 # the special _MSC_VER handling that is otherwise lost.
1191 # repeat for config.bc and config_H.bc (using BORLAND), except that there is no
1192 # _MSC_VER stuff in that case.
1194 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
1195 $(CFGSH_TMPL) > ..\config.sh
1196 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1197 -del /f $(CFGH_TMPL)
1198 -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)"
1199 rename config.h $(CFGH_TMPL)
1201 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
1202 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1203 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
1204 $(XCOPY) ..\*.h $(COREDIR)\*.*
1205 $(XCOPY) *.h $(COREDIR)\*.*
1206 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
1207 $(RCOPY) include $(COREDIR)\*.*
1208 $(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)" \
1209 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
1211 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
1212 .IF "$(CCTYPE)" == "BORLAND"
1213 if not exist $(CCLIBDIR)\PSDK\odbccp32.lib \
1214 cd $(CCLIBDIR)\PSDK && implib odbccp32.lib $(ODBCCP32_DLL)
1215 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1216 @$(mktmp c0x32$(o) $(MINI_OBJ),$@,,$(LIBFILES),)
1217 .ELIF "$(CCTYPE)" == "GCC"
1218 $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
1219 $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
1221 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1222 @$(mktmp $(LIBFILES) $(MINI_OBJ))
1227 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1229 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1230 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*B).c
1232 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1233 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
1235 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1236 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1237 # unless the .IF is true), so instead we use a .ELSE with the default.
1238 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1240 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1241 .IF "$(USE_IMP_SYS)" == "define"
1242 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1244 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1247 # 1. we don't want to rebuild miniperl.exe when config.h changes
1248 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1249 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1250 $(MINI_OBJ) : $(CORE_NOCFG_H)
1252 $(WIN32_OBJ) : $(CORE_H)
1254 $(CORE_OBJ) : $(CORE_H)
1256 $(DLL_OBJ) : $(CORE_H)
1258 $(X2P_OBJ) : $(CORE_H)
1260 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl create_perllibst_h.pl
1261 $(MINIPERL) -I..\lib create_perllibst_h.pl
1262 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1263 $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
1265 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1266 .IF "$(CCTYPE)" == "BORLAND"
1267 $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
1268 @$(mktmp c0d32$(o) $(PERLDLL_OBJ),$@,, \
1269 $(shell @type Extensions_static) $(LIBFILES),perldll.def)
1271 .ELIF "$(CCTYPE)" == "GCC"
1272 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
1273 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1274 $(shell @type Extensions_static) \
1275 $(LIBFILES) $(LKPOST))
1276 $(IMPLIB) --output-lib $(PERLIMPLIB) \
1277 --dllname $(PERLDLL:b).dll \
1279 --base-file perl.base \
1280 --output-exp perl.exp
1281 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1282 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1283 $(shell @type Extensions_static) \
1284 $(LIBFILES) perl.exp $(LKPOST))
1286 $(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \
1287 @Extensions_static \
1288 @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
1289 $(PERLDLL_RES) $(PERLDLL_OBJ))
1292 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1294 $(PERLSTATICLIB): Extensions_static
1295 .IF "$(CCTYPE)" == "BORLAND"
1296 $(LIB32) $(LIB_FLAGS) $@ \
1297 @$(mktmp $(shell @type Extensions_static) \
1299 .ELIF "$(CCTYPE)" == "GCC"
1300 # XXX: It would be nice if MinGW's ar accepted a temporary file, but this
1301 # doesn't seem to work:
1302 # $(LIB32) $(LIB_FLAGS) $@ \
1303 # $(mktmp $(LKPRE) $(shell @type Extensions_static) \
1304 # $(PERLDLL_OBJ) $(LKPOST))
1305 $(LIB32) $(LIB_FLAGS) $@ \
1306 $(shell @type Extensions_static) \
1309 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1310 @$(mktmp $(PERLDLL_OBJ))
1312 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1314 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1316 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
1317 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
1319 ..\x2p\a2p$(o) : ..\x2p\a2p.c
1320 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
1322 ..\x2p\hash$(o) : ..\x2p\hash.c
1323 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
1325 ..\x2p\str$(o) : ..\x2p\str.c
1326 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
1328 ..\x2p\util$(o) : ..\x2p\util.c
1329 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1331 ..\x2p\walk$(o) : ..\x2p\walk.c
1332 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1334 $(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions
1335 $(MINIPERL) -I..\lib ..\x2p\find2perl.PL
1336 $(MINIPERL) -I..\lib ..\x2p\s2p.PL
1337 .IF "$(CCTYPE)" == "BORLAND"
1338 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1339 @$(mktmp c0x32$(o) $(X2P_OBJ),$@,,$(LIBFILES),)
1340 .ELIF "$(CCTYPE)" == "GCC"
1341 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1342 $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST))
1344 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1345 @$(mktmp $(LIBFILES) $(X2P_OBJ))
1349 $(MINIDIR)\globals$(o) : $(UUDMAP_H) $(BITCOUNT_H)
1351 $(UUDMAP_H) $(BITCOUNT_H) : $(GENUUDMAP)
1352 $(GENUUDMAP) $(UUDMAP_H) $(BITCOUNT_H)
1354 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1355 .IF "$(CCTYPE)" == "BORLAND"
1356 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1357 @$(mktmp c0x32$(o) $(GENUUDMAP_OBJ),$@,,$(LIBFILES),)
1358 .ELIF "$(CCTYPE)" == "GCC"
1359 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1360 $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST))
1362 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1363 @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ))
1367 perlmain.c : runperl.c
1368 copy runperl.c perlmain.c
1370 perlmain$(o) : perlmain.c
1371 $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ -c perlmain.c
1373 perlmainst.c : runperl.c
1374 copy runperl.c perlmainst.c
1376 perlmainst$(o) : perlmainst.c
1377 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1379 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1380 .IF "$(CCTYPE)" == "BORLAND"
1381 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1382 @$(mktmp c0x32$(o) $(PERLEXE_OBJ),$@,, \
1383 $(PERLIMPLIB) $(LIBFILES),,$(PERLEXE_RES))
1384 .ELIF "$(CCTYPE)" == "GCC"
1385 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1386 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1388 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1389 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
1392 copy $(PERLEXE) $(WPERLEXE)
1393 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1395 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1396 .IF "$(CCTYPE)" == "BORLAND"
1397 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1398 @$(mktmp c0x32$(o) $(PERLEXEST_OBJ),$@,, \
1399 $(shell @type Extensions_static) $(PERLSTATICLIB) $(LIBFILES),, \
1401 .ELIF "$(CCTYPE)" == "GCC"
1402 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1403 $(mktmp $(LKPRE) $(shell @type Extensions_static) \
1404 $(PERLSTATICLIB) $(LIBFILES) $(PERLEXEST_OBJ) \
1405 $(PERLEXE_RES) $(LKPOST))
1407 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1408 @Extensions_static $(PERLSTATICLIB) /PDB:NONE \
1409 $(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES)
1413 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1414 $(MINIPERL) -I..\lib $(ICWD) ..\mkppport
1416 #-------------------------------------------------------------------------------
1417 # There's no direct way to mark a dependency on
1418 # DynaLoader.pm, so this will have to do
1419 Extensions : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1420 $(XCOPY) ..\*.h $(COREDIR)\*.*
1421 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1423 Extensions_reonly : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1424 $(XCOPY) ..\*.h $(COREDIR)\*.*
1425 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1427 Extensions_static : ..\make_ext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
1428 $(XCOPY) ..\*.h $(COREDIR)\*.*
1429 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1430 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1432 Extensions_nonxs : ..\make_ext.pl $(PERLDEP) $(CONFIGPM)
1433 $(XCOPY) ..\*.h $(COREDIR)\*.*
1434 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1436 $(DYNALOADER) : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1437 $(XCOPY) ..\*.h $(COREDIR)\*.*
1438 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1441 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1443 Extensions_realclean :
1444 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1446 #-------------------------------------------------------------------------------
1449 doc: $(PERLEXE) ..\pod\perltoc.pod
1450 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1451 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1452 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1454 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1455 # so please check that script before making structural changes here
1456 utils: $(PERLEXE) $(X2P)
1457 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1458 copy ..\README.aix ..\pod\perlaix.pod
1459 copy ..\README.amiga ..\pod\perlamiga.pod
1460 copy ..\README.apollo ..\pod\perlapollo.pod
1461 copy ..\README.beos ..\pod\perlbeos.pod
1462 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1463 copy ..\README.ce ..\pod\perlce.pod
1464 copy ..\README.cn ..\pod\perlcn.pod
1465 copy ..\README.cygwin ..\pod\perlcygwin.pod
1466 copy ..\README.dgux ..\pod\perldgux.pod
1467 copy ..\README.dos ..\pod\perldos.pod
1468 copy ..\README.epoc ..\pod\perlepoc.pod
1469 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1470 copy ..\README.haiku ..\pod\perlhaiku.pod
1471 copy ..\README.hpux ..\pod\perlhpux.pod
1472 copy ..\README.hurd ..\pod\perlhurd.pod
1473 copy ..\README.irix ..\pod\perlirix.pod
1474 copy ..\README.jp ..\pod\perljp.pod
1475 copy ..\README.ko ..\pod\perlko.pod
1476 copy ..\README.linux ..\pod\perllinux.pod
1477 copy ..\README.macos ..\pod\perlmacos.pod
1478 copy ..\README.macosx ..\pod\perlmacosx.pod
1479 copy ..\README.mpeix ..\pod\perlmpeix.pod
1480 copy ..\README.netware ..\pod\perlnetware.pod
1481 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1482 copy ..\README.os2 ..\pod\perlos2.pod
1483 copy ..\README.os390 ..\pod\perlos390.pod
1484 copy ..\README.os400 ..\pod\perlos400.pod
1485 copy ..\README.plan9 ..\pod\perlplan9.pod
1486 copy ..\README.qnx ..\pod\perlqnx.pod
1487 copy ..\README.riscos ..\pod\perlriscos.pod
1488 copy ..\README.solaris ..\pod\perlsolaris.pod
1489 copy ..\README.symbian ..\pod\perlsymbian.pod
1490 copy ..\README.tru64 ..\pod\perltru64.pod
1491 copy ..\README.tw ..\pod\perltw.pod
1492 copy ..\README.uts ..\pod\perluts.pod
1493 copy ..\README.vmesa ..\pod\perlvmesa.pod
1494 copy ..\README.vos ..\pod\perlvos.pod
1495 copy ..\README.win32 ..\pod\perlwin32.pod
1496 copy ..\pod\perl5131delta.pod ..\pod\perldelta.pod
1497 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1498 $(PERLEXE) $(PL2BAT) $(UTILS)
1499 $(PERLEXE) $(ICWD) ..\autodoc.pl ..
1500 $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q
1502 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1503 $(PERLEXE) -f ..\pod\buildtoc --build-toc -q
1505 # Note that the pod cleanup in this next section is parsed (and regenerated
1506 # by pod/buildtoc so please check that script before making changes here
1508 distclean: realclean
1509 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1510 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD) \
1511 $(PERLEXESTATIC) $(PERLSTATICLIB)
1513 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1514 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1515 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1516 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1517 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1518 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1519 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1520 -del /f $(LIBDIR)\File\Glob.pm
1521 -del /f $(LIBDIR)\Storable.pm
1522 -del /f $(LIBDIR)\Sys\Hostname.pm
1523 -del /f $(LIBDIR)\Time\HiRes.pm
1524 -del /f $(LIBDIR)\Unicode\Normalize.pm
1525 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1526 -del /f $(LIBDIR)\Win32.pm
1527 -del /f $(LIBDIR)\Win32CORE.pm
1528 -del /f $(LIBDIR)\Win32API\File.pm
1529 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1530 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1531 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1532 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1533 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1534 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1535 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1536 -if exist $(LIBDIR)\CGI rmdir /s /q $(LIBDIR)\CGI
1537 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1538 -if exist $(LIBDIR)\CPANPLUS rmdir /s /q $(LIBDIR)\CPANPLUS
1539 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1540 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1541 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1542 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1543 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1544 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1545 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1546 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1547 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1548 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1549 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1550 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1551 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1552 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1553 -if exist $(LIBDIR)\I18N\LangTags rmdir /s /q $(LIBDIR)\I18N\LangTags
1554 -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1555 -if exist $(LIBDIR)\Module\Pluggable rmdir /s /q $(LIBDIR)\Module\Pluggable
1556 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1557 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1558 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1559 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1560 -if exist $(LIBDIR)\Log rmdir /s /q $(LIBDIR)\Log
1561 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1562 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1563 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1564 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1565 -if exist $(LIBDIR)\mro rmdir /s /q $(LIBDIR)\mro
1566 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1567 -if exist $(LIBDIR)\Object rmdir /s /q $(LIBDIR)\Object
1568 -if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package
1569 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1570 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1571 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1572 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1573 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1574 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1575 -if exist $(LIBDIR)\re rmdir /s /q $(LIBDIR)\re
1576 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1577 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1578 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1579 -if exist $(LIBDIR)\Term\UI rmdir /s /q $(LIBDIR)\Term\UI
1580 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1581 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1582 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1583 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1584 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1585 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1586 -cd $(PODDIR) && del /f *.html *.bat \
1587 perlaix.pod perlamiga.pod perlapi.pod perlapollo.pod \
1588 perlbeos.pod perlbs2000.pod perlce.pod perlcn.pod \
1589 perlcygwin.pod perldelta.pod perldgux.pod perldos.pod \
1590 perlepoc.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1591 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1592 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1593 perlmpeix.pod perlnetware.pod perlopenbsd.pod perlos2.pod \
1594 perlos390.pod perlos400.pod perlplan9.pod perlqnx.pod \
1595 perlriscos.pod perlsolaris.pod perlsymbian.pod perltoc.pod \
1596 perltru64.pod perltw.pod perluniprops.pod perluts.pod \
1597 perlvmesa.pod perlvos.pod perlwin32.pod \
1598 pod2html pod2latex pod2man pod2text pod2usage \
1599 podchecker podselect
1600 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1601 perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
1602 xsubpp instmodsh prove ptar ptardiff cpanp-run-perl cpanp cpan2dist shasum corelist config_data
1603 -cd ..\x2p && del /f find2perl s2p psed *.bat
1604 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1607 -del /f ..\lib\Config_git.pl
1610 -del /f $(PERLEXE_RES) perl.base
1611 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.tds *.bs *$(o) .exists pm_to_blib ppport.h
1612 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1613 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1614 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1615 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1616 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1617 -if exist pod2htmd.tmp del pod2htmd.tmp
1618 -if exist pod2htmi.tmp del pod2htmi.tmp
1619 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1620 -del /f ..\t\test_state
1622 install : all installbare installhtml
1624 installbare : $(RIGHTMAKE) utils ..\pod\perltoc.pod
1625 $(PERLEXE) ..\installperl
1626 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1627 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1628 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1629 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1630 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
1631 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1634 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1636 inst_lib : $(CONFIGPM)
1637 $(RCOPY) ..\lib $(INST_LIB)\*.*
1639 $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1640 cd ..\lib\unicore && \
1641 ..\$(MINIPERL) -I.. -I..\..\cpan\Cwd\lib -I..\..\cpan\Cwd mktables -P ..\..\pod -maketest -makelist -p
1643 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1644 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1645 if exist ..\t\perl.exe del /f ..\t\perl.exe
1646 rename ..\t\miniperl.exe perl.exe
1647 .IF "$(CCTYPE)" == "BORLAND"
1648 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1650 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1654 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1656 test-prep : all utils
1657 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1658 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1659 .IF "$(CCTYPE)" == "BORLAND"
1660 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1662 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1664 .IF "$(CCTYPE)" == "GCC"
1665 .IF "$(GCC_4XX)" == "define"
1666 $(XCOPY) $(GCCHELPERDLL) ..\t\$(NULL)
1670 test : $(RIGHTMAKE) test-prep
1671 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1673 test-reonly : reonly utils
1674 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1675 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1676 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1678 $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
1682 cd .. && regen.pl && cd win32
1684 test-notty : test-prep
1685 set PERL_SKIP_TTY_TEST=1 && \
1686 cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1688 _test : $(RIGHTMAKE)
1689 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1690 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1691 .IF "$(CCTYPE)" == "BORLAND"
1692 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1694 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1696 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1699 -@erase miniperlmain$(o)
1701 -@erase perlglob$(o)
1702 -@erase perlmain$(o)
1703 -@erase perlmainst$(o)
1706 -@erase /f ..\git_version.h
1710 -@erase $(PERLEXESTATIC)
1711 -@erase $(PERLSTATICLIB)
1714 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(UUDMAP_H) $(BITCOUNT_H)
1715 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1716 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1717 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1718 -@erase $(UNIDATAFILES)
1719 -@erase $(WIN32_OBJ)
1722 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1723 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1724 -@erase ..\x2p\*.exe ..\x2p\*.bat
1728 -@erase Extensions_static
1732 clean : Extensions_clean _clean
1734 realclean : Extensions_realclean _clean
1736 # Handy way to run perlbug -ok without having to install and run the
1737 # installed perlbug. We don't re-run the tests here - we trust the user.
1738 # Please *don't* use this unless all tests pass.
1739 # If you want to report test failures, use "dmake nok" instead.
1741 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1744 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1747 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1750 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok