2 # Makefile to build perl on Windows NT using Microsoft NMAKE.
4 # Visual C++ 2.0 through 6.0 (and possibly newer versions)
5 # MS Platform SDK 64-bit compiler and tools **experimental**
7 # This is set up to build a perl.exe that runs off a shared library
8 # (perl59.dll). Also makes individual DLLs for the XS extensions.
12 ## Make sure you read README.win32 *before* you mess with anything here!
16 ## Build configuration. Edit the values below to suit your needs.
20 # Set these to wherever you want "nmake install" to put your
24 INST_TOP = $(INST_DRV)\perl
27 # Comment this out if you DON'T want your perl installation to be versioned.
28 # This means that the new installation will overwrite any files from the
29 # old installation at the same INST_TOP location. Leaving it enabled is
30 # the safest route, as perl adds the extra version directory to all the
31 # locations it installs files to. If you disable it, an alternative
32 # versioned installation can be obtained by setting INST_TOP above to a
33 # path that includes an arbitrary version string.
38 # Comment this out if you DON'T want your perl installation to have
39 # architecture specific components. This means that architecture-
40 # specific files will be installed along with the architecture-neutral
41 # files. Leaving it enabled is safer and more flexible, in case you
42 # want to build multiple flavors of perl and install them together in
43 # the same location. Commenting it out gives you a simpler
44 # installation that is easier to understand for beginners.
46 #INST_ARCH = \$(ARCHNAME)
49 # uncomment to enable multiple interpreters. This is need for fork()
50 # emulation and for thread support.
55 # Beginnings of interpreter cloning/threads; now reasonably complete.
56 # This should be enabled to get the fork() emulation. This needs
62 # uncomment to enable the implicit "host" layer for all system calls
63 # made by perl. This needs USE_MULTI above. This is also needed to
69 # Comment out next assign to disable perl's I/O subsystem and use compiler's
70 # stdio for IO - depending on your compiler vendor and run time library you may
71 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
72 # You will also be unable to take full advantage of perl5.8's support for multiple
73 # encodings and may see lower IO performance. You have been warned.
77 # Comment this out if you don't want to enable large file support for
78 # some reason. Should normally only be changed to maintain compatibility
79 # with an older release of perl.
80 USE_LARGE_FILES = define
83 # uncomment one of the following lines if you are using either
84 # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
90 # uncomment next line if you want debug version of perl (big,slow)
91 # If not enabled, we automatically try to use maximum optimization
92 # with all compilers that are known to have a working optimizer.
97 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
98 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
99 # This currently requires VC 5.0 with Service Pack 3 or later.
100 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
101 # and follow the directions in the package to install.
103 # Not recommended if you have VC 6.x and you're not running Windows 9x.
105 #USE_PERLCRT = define
108 # uncomment to enable linking with setargv.obj under the Visual C
109 # compiler. Setting this options enables perl to expand wildcards in
110 # arguments, but it may be harder to use alternate methods like
111 # File::DosGlob that are more powerful. This option is supported only with
114 #USE_SETARGV = define
117 # if you want to have the crypt() builtin function implemented, leave this or
118 # CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable
119 # version of des_fcrypt().
124 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
125 # library, uncomment this, and make sure the library exists (see README.win32)
126 # Specify the full pathname of the library.
128 #CRYPT_LIB = fcrypt.lib
131 # set this if you wish to use perl's malloc
132 # WARNING: Turning this on/off WILL break binary compatibility with extensions
133 # you may have compiled with/without it. Be prepared to recompile all
134 # extensions if you change the default. Currently, this cannot be enabled
135 # if you ask for USE_IMP_SYS above.
137 #PERL_MALLOC = define
140 # set this to enable debugging mstats
141 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
142 # be enabled without PERL_MALLOC as well.
144 #DEBUG_MSTATS = define
148 # set the install locations of the compiler include/libraries
149 # Running VCVARS32.BAT is *required* when using Visual C.
150 # Some versions of Visual C don't define MSVCDIR in the environment,
151 # so you may have to set CCHOME explicitly (spaces in the path name should
156 CCINCDIR = $(CCHOME)\include
157 CCLIBDIR = $(CCHOME)\lib
160 # Additional compiler flags can be specified here.
164 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
165 # for old symbols by default, at the expense of extreme pollution. You most
166 # probably just want to build modules that won't compile with
167 # perl Makefile.PL POLLUTE=1
168 # instead of enabling this. Please report such modules to the respective
171 #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
174 # This should normally be disabled. Enabling it will disable the File::Glob
175 # implementation of CORE::glob.
177 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
180 # This should normally be disabled. Enabling it causes perl to read scripts
181 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
182 #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
185 # specify semicolon-separated list of extra directories that modules will
186 # look for libraries (spaces in path names need not be quoted)
191 # set this to your email address (perl will guess a value from
192 # from your loginname and your hostname, which may not be right)
197 ## Build configuration ends.
200 ##################### CHANGE THESE ONLY IF YOU MUST #####################
202 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
206 CRYPT_FLAG = -DHAVE_DES_FCRYPT
209 !IF "$(USE_IMP_SYS)" == "define"
214 !IF "$(PERL_MALLOC)" == ""
219 !IF "$(DEBUG_MSTATS)" == ""
223 !IF "$(DEBUG_MSTATS)" == "define"
224 BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
227 !IF "$(USE_MULTI)" == ""
231 !IF "$(USE_ITHREADS)" == ""
235 !IF "$(USE_IMP_SYS)" == ""
239 !IF "$(USE_PERLIO)" == ""
243 !IF "$(USE_LARGE_FILES)" == ""
244 USE_LARGE_FILES = undef
247 !IF "$(USE_PERLCRT)" == ""
251 !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
255 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
259 !IF "$(USE_MULTI)" != "undef"
260 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
263 !IF "$(USE_IMP_SYS)" != "undef"
264 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
267 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
268 PROCESSOR_ARCHITECTURE = x86
272 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
273 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
276 !IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
284 !IF "$(USE_MULTI)" == "define"
285 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
287 !IF "$(USE_PERLIO)" == "define"
288 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
290 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
294 !IF "$(USE_PERLIO)" == "define"
295 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
298 !IF "$(USE_ITHREADS)" == "define"
299 ARCHNAME = $(ARCHNAME)-thread
302 # Visual Studio 98 specific
303 !IF "$(CCTYPE)" == "MSVC60"
305 # VC 6.0 can load the socket dll on demand. Makes the test suite
306 # run in about 10% less time.
307 DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
310 ARCHDIR = ..\lib\$(ARCHNAME)
311 COREDIR = ..\lib\CORE
312 AUTODIR = ..\lib\auto
316 EXTUTILSDIR = $(LIBDIR)\ExtUtils
319 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
320 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
321 INST_LIB = $(INST_TOP)$(INST_VER)\lib
322 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
323 INST_COREDIR = $(INST_ARCHLIB)\CORE
324 INST_POD = $(INST_LIB)\pod
325 INST_HTML = $(INST_TOP)$(INST_VER)\html
328 # Programs to compile, build .lib files and link
333 LIB32 = $(LINK32) -lib
340 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
341 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
342 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
343 LOCDEFS = -DPERLDLL -DPERL_CORE
347 !IF "$(USE_PERLCRT)" != "define"
353 !IF "$(CFG)" == "Debug"
354 ! IF "$(CCTYPE)" == "MSVC20"
355 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
357 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
361 OPTIMIZE = -MD -Zi -DNDEBUG
362 # we enable debug symbols in release builds also
363 LINK_DBG = -debug -opt:ref,icf
364 # you may want to enable this if you want COFF symbols in the executables
365 # in addition to the PDB symbols. The default Dr. Watson that ships with
366 # Windows can use the the former but not latter. The free WinDbg can be
367 # installed to get better stack traces from just the PDB symbols, so we
368 # avoid the bloat of COFF symbols by default.
369 #LINK_DBG = $(LINK_DBG) -debugtype:both
370 ! IF "$(WIN64)" == "define"
371 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
372 OPTIMIZE = $(OPTIMIZE) -Ox -GL
373 LINK_DBG = $(LINK_DBG) -ltcg
375 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
376 OPTIMIZE = $(OPTIMIZE) -O1
377 #OPTIMIZE = $(OPTIMIZE) -O2
381 !IF "$(WIN64)" == "define"
382 DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
383 OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
386 !IF "$(USE_PERLCRT)" != "define"
387 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
390 LIBBASEFILES = $(CRYPT_LIB) \
391 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
392 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
393 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
396 # win64 doesn't have some libs
397 !IF "$(WIN64)" != "define"
398 LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
401 # we add LIBC here, since we may be using PerlCRT.dll
402 LIBFILES = $(LIBBASEFILES) $(LIBC)
404 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
405 $(PCHFLAGS) $(OPTIMIZE)
406 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
407 -libpath:"$(INST_COREDIR)" \
408 -machine:$(PROCESSOR_ARCHITECTURE)
412 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
414 #################### do not edit below this line #######################
415 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
423 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
426 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
432 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
433 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
441 # makedef.pl must be updated if this changes, and this should normally
442 # only change when there is an incompatible revision of the public API.
443 PERLIMPLIB = ..\perl59.lib
444 PERLDLL = ..\perl59.dll
446 MINIPERL = ..\miniperl.exe
448 PERLEXE = ..\perl.exe
449 WPERLEXE = ..\wperl.exe
450 GLOBEXE = ..\perlglob.exe
451 CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
452 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
455 # Unicode data files generated by mktables
456 UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
457 ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
458 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
459 ..\lib\unicore\PVA.pl
461 # Directories of Unicode data files generated by mktables
462 UNIDATADIR1 = ..\lib\unicore\To
463 UNIDATADIR2 = ..\lib\unicore\lib
465 PERLEXE_ICO = .\perlexe.ico
466 PERLEXE_RES = .\perlexe.res
469 # Nominate a target which causes extensions to be re-built
470 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
471 # on and really only the interface - i.e. the .def file used to export symbols
473 PERLDEP = perldll.def
475 PL2BAT = bin\pl2bat.pl
476 GLOBBAT = bin\perlglob.bat
518 !IF "$(WIN64)" == "define"
519 CFGSH_TMPL = config.vc64
520 CFGH_TMPL = config_H.vc64
522 CFGSH_TMPL = config.vc
523 CFGH_TMPL = config_H.vc
526 XCOPY = xcopy /f /r /i /d
527 RCOPY = xcopy /f /r /i /e /d
534 # filenames given to xsubpp must have forward slashes (since it puts
535 # full pathnames in #line strings)
536 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
575 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
577 !IF "$(PERL_MALLOC)" == "define"
578 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
581 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
588 # We need this for miniperl build unless we override canned
589 # config.h #define building mini\*
590 #!IF "$(USE_PERLIO)" == "define"
591 WIN32_SRC = $(WIN32_SRC) .\win32io.c
594 !IF "$(CRYPT_SRC)" != ""
595 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
598 DLL_SRC = $(DYNALOADER).c
644 .\include\sys\socket.h \
647 CORE_H = $(CORE_NOCFG_H) .\config.h
649 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
650 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
651 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
652 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
653 $(MINIDIR)\miniperlmain$(o) \
654 $(MINIDIR)\perlio$(o)
655 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
656 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
657 DLL_OBJ = $(DLL_SRC:.c=.obj)
658 X2P_OBJ = $(X2P_SRC:.c=.obj)
660 PERLDLL_OBJ = $(CORE_OBJ)
661 PERLEXE_OBJ = perlmain$(o)
663 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
664 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
666 !IF "$(USE_SETARGV)" != ""
667 SETARGV_OBJ = setargv$(o)
670 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
671 SOCKET = $(EXTDIR)\Socket\Socket
672 FCNTL = $(EXTDIR)\Fcntl\Fcntl
673 OPCODE = $(EXTDIR)\Opcode\Opcode
674 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
676 POSIX = $(EXTDIR)\POSIX\POSIX
677 ATTRS = $(EXTDIR)\attrs\attrs
678 THREAD = $(EXTDIR)\Thread\Thread
681 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
682 ERRNO = $(EXTDIR)\Errno\Errno
683 PEEK = $(EXTDIR)\Devel\Peek\Peek
684 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
685 DPROF = $(EXTDIR)\Devel\DProf\DProf
686 GLOB = $(EXTDIR)\File\Glob\Glob
687 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
688 STORABLE = $(EXTDIR)\Storable\Storable
689 FILTER = $(EXTDIR)\Filter\Util\Call\Call
690 ENCODE = $(EXTDIR)\Encode\Encode
691 MD5 = $(EXTDIR)\Digest\MD5\MD5
692 PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
693 MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
694 TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
695 CWD = $(EXTDIR)\Cwd\Cwd
696 LISTUTIL = $(EXTDIR)\List\Util\Util
697 PERLIOVIA = $(EXTDIR)\PerlIO\via\via
698 XSAPITEST = $(EXTDIR)\XS\APItest\APItest
699 XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
700 UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
701 WIN32_DIR = ext\Win32
703 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
704 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
705 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
706 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
707 IO_DLL = $(AUTODIR)\IO\IO.dll
708 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
709 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
710 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
711 B_DLL = $(AUTODIR)\B\B.dll
712 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
713 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
714 RE_DLL = $(AUTODIR)\re\re.dll
715 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
716 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
717 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
718 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
719 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
720 FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
721 ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
722 MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
723 PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
724 MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
725 TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
726 CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
727 LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
728 PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
729 XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
730 XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
731 UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
732 WIN32_DLL = $(AUTODIR)\Win32\Win32.dll
763 $(UNICODENORMALIZE).c \
787 $(PERLIOSCALAR_DLL) \
795 $(UNICODENORMALIZE_DLL) \
798 POD2HTML = $(PODDIR)\pod2html
799 POD2MAN = $(PODDIR)\pod2man
800 POD2LATEX = $(PODDIR)\pod2latex
801 POD2TEXT = $(PODDIR)\pod2text
804 "INST_DRV=$(INST_DRV)" \
805 "INST_TOP=$(INST_TOP)" \
806 "INST_VER=$(INST_VER)" \
807 "INST_ARCH=$(INST_ARCH)" \
808 "archname=$(ARCHNAME)" \
811 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
812 "cf_email=$(EMAIL)" \
813 "d_crypt=$(D_CRYPT)" \
814 "d_mymalloc=$(PERL_MALLOC)" \
816 "incpath=$(CCINCDIR:"=\")" \
817 "libperl=$(PERLIMPLIB:..\=)" \
818 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
820 "make=$(MAKE_BARE)" \
821 "static_ext=$(STATIC_EXT)" \
822 "usethreads=$(USE_ITHREADS)" \
823 "useithreads=$(USE_ITHREADS)" \
824 "usemultiplicity=$(USE_MULTI)" \
825 "useperlio=$(USE_PERLIO)" \
826 "uselargefiles=$(USE_LARGE_FILES)" \
827 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
828 "optimize=$(OPTIMIZE:"=\")"
834 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
836 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
838 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
840 #------------------------------------------------------------
842 $(GLOBEXE) : perlglob$(o)
843 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
844 perlglob$(o) setargv$(o)
846 perlglob$(o) : perlglob.c
848 config.w32 : $(CFGSH_TMPL)
849 copy $(CFGSH_TMPL) config.w32
851 .\config.h : $(CFGH_TMPL)
853 copy $(CFGH_TMPL) config.h
855 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
856 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
858 # this target is for when changes to the main config.sh happen
859 # edit config.{b,v,g}c and make this target once for each supported
860 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
862 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
864 -del /f perl.exe perl*.dll
869 -perl config_h.PL "INST_VER=$(INST_VER)"
870 rename config.h $(CFGH_TMPL)
872 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
876 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
877 $(XCOPY) ..\*.h $(COREDIR)\*.*
878 $(XCOPY) *.h $(COREDIR)\*.*
879 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
880 $(RCOPY) include $(COREDIR)\*.*
881 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
882 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
884 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
885 $(LINK32) -subsystem:console -out:$@ @<<
886 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
890 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
892 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
893 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
895 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
896 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
898 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
899 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
900 !IF "$(USE_IMP_SYS)" == "define"
901 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
902 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
905 # 1. we don't want to rebuild miniperl.exe when config.h changes
906 # 2. we don't want to rebuild miniperl.exe with non-default config.h
907 $(MINI_OBJ) : $(CORE_NOCFG_H)
909 $(WIN32_OBJ) : $(CORE_H)
910 $(CORE_OBJ) : $(CORE_H)
911 $(DLL_OBJ) : $(CORE_H)
912 $(X2P_OBJ) : $(CORE_H)
914 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
915 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
916 CCTYPE=$(CCTYPE) > perldll.def
918 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
919 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
920 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
922 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
924 $(PERLEXE_ICO): $(MINIPERL) makeico.pl
925 $(MINIPERL) makeico.pl > $@
927 $(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO)
929 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
931 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
934 ..\x2p\a2p$(o) : ..\x2p\a2p.c
935 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
937 ..\x2p\hash$(o) : ..\x2p\hash.c
938 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
940 ..\x2p\str$(o) : ..\x2p\str.c
941 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
943 ..\x2p\util$(o) : ..\x2p\util.c
944 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
946 ..\x2p\walk$(o) : ..\x2p\walk.c
947 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
949 $(X2P) : $(MINIPERL) $(X2P_OBJ)
950 $(MINIPERL) ..\x2p\find2perl.PL
951 $(MINIPERL) ..\x2p\s2p.PL
952 $(LINK32) -subsystem:console -out:$@ @<<
953 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
956 perlmain.c : runperl.c
957 copy runperl.c perlmain.c
959 perlmain$(o) : perlmain.c
960 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
962 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
963 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
964 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
965 copy $(PERLEXE) $(WPERLEXE)
966 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
968 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
970 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
971 if not exist $(AUTODIR) mkdir $(AUTODIR)
973 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
974 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
976 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
977 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
979 $(XSUBPP) dl_win32.xs > $(*B).c
982 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
983 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
985 #----------------------------------------------------------------------------------
986 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
987 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
988 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext
990 # Note: The next two targets explicitly remove a "blibdirs.exists" file that
991 # currerntly gets left behind, until CPAN RT Ticket #5616 is resolved.
994 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
995 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean
996 -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
998 Extensions_realclean:
999 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean
1000 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext realclean
1001 -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
1003 #----------------------------------------------------------------------------------
1006 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1007 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
1008 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1010 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1011 # so please check that script before making structural changes here
1013 utils: $(PERLEXE) $(X2P)
1015 $(MAKE) PERL=$(MINIPERL)
1017 copy ..\vms\perlvms.pod .\perlvms.pod
1018 copy ..\README.aix ..\pod\perlaix.pod
1019 copy ..\README.amiga ..\pod\perlamiga.pod
1020 copy ..\README.apollo ..\pod\perlapollo.pod
1021 copy ..\README.beos ..\pod\perlbeos.pod
1022 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1023 copy ..\README.ce ..\pod\perlce.pod
1024 copy ..\README.cn ..\pod\perlcn.pod
1025 copy ..\README.cygwin ..\pod\perlcygwin.pod
1026 copy ..\README.dgux ..\pod\perldgux.pod
1027 copy ..\README.dos ..\pod\perldos.pod
1028 copy ..\README.epoc ..\pod\perlepoc.pod
1029 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1030 copy ..\README.hpux ..\pod\perlhpux.pod
1031 copy ..\README.hurd ..\pod\perlhurd.pod
1032 copy ..\README.irix ..\pod\perlirix.pod
1033 copy ..\README.jp ..\pod\perljp.pod
1034 copy ..\README.ko ..\pod\perlko.pod
1035 copy ..\README.machten ..\pod\perlmachten.pod
1036 copy ..\README.macos ..\pod\perlmacos.pod
1037 copy ..\README.macosx ..\pod\perlmacosx.pod
1038 copy ..\README.mint ..\pod\perlmint.pod
1039 copy ..\README.mpeix ..\pod\perlmpeix.pod
1040 copy ..\README.netware ..\pod\perlnetware.pod
1041 copy ..\README.os2 ..\pod\perlos2.pod
1042 copy ..\README.os390 ..\pod\perlos390.pod
1043 copy ..\README.os400 ..\pod\perlos400.pod
1044 copy ..\README.plan9 ..\pod\perlplan9.pod
1045 copy ..\README.qnx ..\pod\perlqnx.pod
1046 copy ..\README.solaris ..\pod\perlsolaris.pod
1047 copy ..\README.tru64 ..\pod\perltru64.pod
1048 copy ..\README.tw ..\pod\perltw.pod
1049 copy ..\README.uts ..\pod\perluts.pod
1050 copy ..\README.vmesa ..\pod\perlvmesa.pod
1051 copy ..\README.vms ..\pod\perlvms.pod
1052 copy ..\README.vos ..\pod\perlvos.pod
1053 copy ..\README.win32 ..\pod\perlwin32.pod
1054 copy ..\pod\perl592delta.pod ..\pod\perldelta.pod
1055 $(MAKE) -f ..\win32\pod.mak converters
1057 $(PERLEXE) lib_pm.PL
1059 $(PERLEXE) $(PL2BAT) $(UTILS)
1061 # Note that the pod cleanup in this next section is parsed (and regenerated
1062 # by pod/buildtoc so please check that script before making changes here
1064 # the doubled rmdir calls are needed because older cmd shells
1065 # don't understand /q
1066 distclean: realclean
1067 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1068 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1070 -del /f $(EXTENSION_DLL)
1071 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1072 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1073 -del /f $(EXTDIR)\DynaLoader\DynaLoader.pm
1074 -del /f $(EXTDIR)\DynaLoader\XSLoader.pm
1075 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1076 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1077 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1078 -del /f $(LIBDIR)\XSLoader.pm $(LIBDIR)\lib.pm
1079 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1080 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1081 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1082 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1083 -del /f $(LIBDIR)\ByteLoader.pm
1084 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1085 -del /f $(LIBDIR)\Devel\PPPort.pm
1086 -del /f $(LIBDIR)\File\Glob.pm
1087 -del /f $(LIBDIR)\Storable.pm
1088 -del /f $(LIBDIR)\Digest\MD5.pm
1089 -del /f $(LIBDIR)\PerlIO\encoding.pm
1090 -del /f $(LIBDIR)\PerlIO\scalar.pm
1091 -del /f $(LIBDIR)\PerlIO\via.pm
1092 -del /f $(LIBDIR)\Sys\Hostname.pm
1093 -del /f $(LIBDIR)\Thread\Signal.pm $(LIBDIR)\Thread\Specific.pm
1094 -del /f $(LIBDIR)\threads\shared.pm
1095 -del /f $(LIBDIR)\Time\HiRes.pm
1096 -del /f $(LIBDIR)\Unicode\Normalize.pm
1097 -del /f $(LIBDIR)\Win32.pm
1098 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1099 -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
1100 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1101 -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
1102 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1103 -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
1104 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1105 -if exist $(LIBDIR)\Encode rmdir /s $(LIBDIR)\Encode
1106 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1107 -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
1108 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1109 -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
1110 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1111 -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
1112 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1113 -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
1114 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1115 -if exist $(LIBDIR)\Sys rmdir /s $(LIBDIR)\Sys
1116 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1117 -if exist $(LIBDIR)\threads rmdir /s $(LIBDIR)\threads
1118 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1119 -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
1120 -cd $(PODDIR) && del /f *.html *.bat checkpods \
1121 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1122 perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1123 perldelta.pod perldgux.pod perldos.pod perlepoc.pod \
1124 perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \
1125 perljp.pod perlko.pod perlmachten.pod perlmacos.pod \
1126 perlmacosx.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1127 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1128 perlqnx.pod perlsolaris.pod perltru64.pod perltw.pod \
1129 perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \
1131 pod2html pod2latex pod2man pod2text pod2usage \
1132 podchecker podselect
1133 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1134 perldoc perlivp dprofpp perlcc libnetcfg enc2xs piconv cpan *.bat \
1135 xsubpp instmodsh prove corelist
1136 -cd ..\x2p && del /f find2perl s2p psed *.bat
1137 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1140 -del /f $(PERLEXE_ICO) perl.base
1141 -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1142 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1143 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1144 -if exist $(AUTODIR) rmdir /s $(AUTODIR)
1145 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1146 -if exist $(COREDIR) rmdir /s $(COREDIR)
1148 install : all installbare installhtml
1151 $(PERLEXE) ..\installperl
1152 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1153 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1154 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1155 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
1156 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1159 $(RCOPY) html\*.* $(INST_HTML)\*.*
1161 inst_lib : $(CONFIGPM)
1162 copy splittree.pl ..
1163 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1164 $(RCOPY) ..\lib $(INST_LIB)\*.*
1166 $(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
1167 cd ..\lib\unicore && \
1168 ..\$(MINIPERL) -I.. mktables
1170 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES)
1171 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1172 if exist ..\t\perl.exe del /f ..\t\perl.exe
1173 rename ..\t\miniperl.exe perl.exe
1174 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1177 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1179 test-prep : all utils
1180 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1181 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1182 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1186 $(PERLEXE) -I..\lib harness
1189 test-notty : test-prep
1190 set PERL_SKIP_TTY_TEST=1
1192 $(PERLEXE) -I..\lib harness
1196 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1197 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1198 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1200 $(PERLEXE) -I..\lib harness
1203 # the doubled rmdir calls are needed because older cmd shells
1204 # don't understand /q
1206 -@$(DEL) miniperlmain$(o)
1207 -@$(DEL) $(MINIPERL)
1208 -@$(DEL) perlglob$(o)
1209 -@$(DEL) perlmain$(o)
1214 -@$(DEL) $(WPERLEXE)
1216 -@$(DEL) $(CORE_OBJ)
1217 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1218 -if exist $(MINIDIR) rmdir /s $(MINIDIR)
1219 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1220 -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
1221 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1222 -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
1223 -@$(DEL) $(UNIDATAFILES)
1224 -@$(DEL) $(WIN32_OBJ)
1227 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1228 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1229 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1233 clean : Extensions_clean _clean
1235 realclean : Extensions_realclean _clean
1237 # Handy way to run perlbug -ok without having to install and run the
1238 # installed perlbug. We don't re-run the tests here - we trust the user.
1239 # Please *don't* use this unless all tests pass.
1240 # If you want to report test failures, use "nmake nok" instead.
1242 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1245 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1248 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1251 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok