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 have the source for des_fcrypt(), uncomment this and make sure the
118 # file exists (see README.win32). File should be located in the same
119 # directory as this file.
121 #CRYPT_SRC = fcrypt.c
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 "$(PERL_MALLOC)" == ""
214 !IF "$(DEBUG_MSTATS)" == ""
218 !IF "$(DEBUG_MSTATS)" == "define"
219 BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
222 !IF "$(USE_IMP_SYS)" == "define"
226 !IF "$(USE_MULTI)" == ""
230 !IF "$(USE_ITHREADS)" == ""
234 !IF "$(USE_IMP_SYS)" == ""
238 !IF "$(USE_PERLIO)" == ""
242 !IF "$(USE_LARGE_FILES)" == ""
243 USE_LARGE_FILES = undef
246 !IF "$(USE_PERLCRT)" == ""
250 !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
254 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
258 !IF "$(USE_MULTI)" != "undef"
259 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
262 !IF "$(USE_IMP_SYS)" != "undef"
263 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
266 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
267 PROCESSOR_ARCHITECTURE = x86
271 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
272 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
275 !IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
283 !IF "$(USE_MULTI)" == "define"
284 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
286 !IF "$(USE_PERLIO)" == "define"
287 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
289 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
293 !IF "$(USE_PERLIO)" == "define"
294 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
297 !IF "$(USE_ITHREADS)" == "define"
298 ARCHNAME = $(ARCHNAME)-thread
301 # Visual Studio 98 specific
302 !IF "$(CCTYPE)" == "MSVC60"
304 # VC 6.0 can load the socket dll on demand. Makes the test suite
305 # run in about 10% less time.
306 DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
309 ARCHDIR = ..\lib\$(ARCHNAME)
310 COREDIR = ..\lib\CORE
311 AUTODIR = ..\lib\auto
315 EXTUTILSDIR = $(LIBDIR)\ExtUtils
318 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
319 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
320 INST_LIB = $(INST_TOP)$(INST_VER)\lib
321 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
322 INST_COREDIR = $(INST_ARCHLIB)\CORE
323 INST_POD = $(INST_LIB)\pod
324 INST_HTML = $(INST_TOP)$(INST_VER)\html
327 # Programs to compile, build .lib files and link
332 LIB32 = $(LINK32) -lib
339 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
340 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
341 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
342 LOCDEFS = -DPERLDLL -DPERL_CORE
346 !IF "$(USE_PERLCRT)" != "define"
355 !IF "$(CFG)" == "Debug"
356 ! IF "$(CCTYPE)" == "MSVC20"
357 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
359 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
363 OPTIMIZE = -MD -DNDEBUG
365 ! IF "$(WIN64)" == "define"
366 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
367 OPTIMIZE = $(OPTIMIZE) -Ox -GL
368 LINK_DBG = $(LINK_DBG) -ltcg
370 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
371 OPTIMIZE = $(OPTIMIZE) -O1
372 #OPTIMIZE = $(OPTIMIZE) -O2
376 !IF "$(WIN64)" == "define"
377 DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
378 OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
381 !IF "$(USE_PERLCRT)" != "define"
382 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
385 LIBBASEFILES = $(CRYPT_LIB) \
386 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
387 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
388 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
391 # win64 doesn't have some libs
392 !IF "$(WIN64)" != "define"
393 LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
396 # we add LIBC here, since we may be using PerlCRT.dll
397 LIBFILES = $(LIBBASEFILES) $(LIBC)
399 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
400 $(PCHFLAGS) $(OPTIMIZE)
401 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
402 -libpath:"$(INST_COREDIR)" \
403 -machine:$(PROCESSOR_ARCHITECTURE)
407 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
409 #################### do not edit below this line #######################
410 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
418 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
421 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
427 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
428 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
436 # makedef.pl must be updated if this changes, and this should normally
437 # only change when there is an incompatible revision of the public API.
438 PERLIMPLIB = ..\perl59.lib
439 PERLDLL = ..\perl59.dll
441 MINIPERL = ..\miniperl.exe
443 PERLEXE = ..\perl.exe
444 WPERLEXE = ..\wperl.exe
445 GLOBEXE = ..\perlglob.exe
446 CONFIGPM = ..\lib\Config.pm
447 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
450 # Nominate a target which causes extensions to be re-built
451 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
452 # on and really only the interface - i.e. the .def file used to export symbols
454 PERLDEP = perldll.def
456 PL2BAT = bin\pl2bat.pl
457 GLOBBAT = bin\perlglob.bat
486 ..\lib\ExtUtils\xsubpp \
496 !IF "$(WIN64)" == "define"
497 CFGSH_TMPL = config.vc64
498 CFGH_TMPL = config_H.vc64
500 CFGSH_TMPL = config.vc
501 CFGH_TMPL = config_H.vc
504 XCOPY = xcopy /f /r /i /d
505 RCOPY = xcopy /f /r /i /e /d
512 # filenames given to xsubpp must have forward slashes (since it puts
513 # full pathnames in #line strings)
514 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
553 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
555 !IF "$(PERL_MALLOC)" == "define"
556 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
559 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
566 # We need this for miniperl build unless we override canned
567 # config.h #define building mini\*
568 #!IF "$(USE_PERLIO)" == "define"
569 WIN32_SRC = $(WIN32_SRC) .\win32io.c
572 !IF "$(CRYPT_SRC)" != ""
573 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
576 DLL_SRC = $(DYNALOADER).c
622 .\include\sys\socket.h \
625 CORE_H = $(CORE_NOCFG_H) .\config.h
627 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
628 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
629 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
630 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
631 $(MINIDIR)\miniperlmain$(o) \
632 $(MINIDIR)\perlio$(o)
633 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
634 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
635 DLL_OBJ = $(DLL_SRC:.c=.obj)
636 X2P_OBJ = $(X2P_SRC:.c=.obj)
638 PERLDLL_OBJ = $(CORE_OBJ)
639 PERLEXE_OBJ = perlmain$(o)
641 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
642 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
644 !IF "$(USE_SETARGV)" != ""
645 SETARGV_OBJ = setargv$(o)
648 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
649 SOCKET = $(EXTDIR)\Socket\Socket
650 FCNTL = $(EXTDIR)\Fcntl\Fcntl
651 OPCODE = $(EXTDIR)\Opcode\Opcode
652 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
654 POSIX = $(EXTDIR)\POSIX\POSIX
655 ATTRS = $(EXTDIR)\attrs\attrs
656 THREAD = $(EXTDIR)\Thread\Thread
659 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
660 ERRNO = $(EXTDIR)\Errno\Errno
661 PEEK = $(EXTDIR)\Devel\Peek\Peek
662 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
663 DPROF = $(EXTDIR)\Devel\DProf\DProf
664 GLOB = $(EXTDIR)\File\Glob\Glob
665 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
666 STORABLE = $(EXTDIR)\Storable\Storable
667 FILTER = $(EXTDIR)\Filter\Util\Call\Call
668 ENCODE = $(EXTDIR)\Encode\Encode
669 MD5 = $(EXTDIR)\Digest\MD5\MD5
670 PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
671 MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
672 TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
673 CWD = $(EXTDIR)\Cwd\Cwd
674 LISTUTIL = $(EXTDIR)\List\Util\Util
675 PERLIOVIA = $(EXTDIR)\PerlIO\via\via
676 XSAPITEST = $(EXTDIR)\XS\APItest\APItest
677 XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
678 UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
680 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
681 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
682 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
683 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
684 IO_DLL = $(AUTODIR)\IO\IO.dll
685 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
686 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
687 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
688 B_DLL = $(AUTODIR)\B\B.dll
689 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
690 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
691 RE_DLL = $(AUTODIR)\re\re.dll
692 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
693 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
694 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
695 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
696 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
697 FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
698 ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
699 MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
700 PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
701 MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
702 TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
703 CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
704 LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
705 PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
706 XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
707 XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
708 UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
739 $(UNICODENORMALIZE).c
762 $(PERLIOSCALAR_DLL) \
770 $(UNICODENORMALIZE_DLL)
772 POD2HTML = $(PODDIR)\pod2html
773 POD2MAN = $(PODDIR)\pod2man
774 POD2LATEX = $(PODDIR)\pod2latex
775 POD2TEXT = $(PODDIR)\pod2text
778 "INST_DRV=$(INST_DRV)" \
779 "INST_TOP=$(INST_TOP)" \
780 "INST_VER=$(INST_VER)" \
781 "INST_ARCH=$(INST_ARCH)" \
782 "archname=$(ARCHNAME)" \
785 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
786 "cf_email=$(EMAIL)" \
787 "d_crypt=$(D_CRYPT)" \
788 "d_mymalloc=$(PERL_MALLOC)" \
790 "incpath=$(CCINCDIR:"=\")" \
791 "libperl=$(PERLIMPLIB:..\=)" \
792 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
794 "make=$(MAKE_BARE)" \
795 "useithreads=$(USE_ITHREADS)" \
796 "usemultiplicity=$(USE_MULTI)" \
797 "useperlio=$(USE_PERLIO)" \
798 "uselargefiles=$(USE_LARGE_FILES)" \
799 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
800 "optimize=$(OPTIMIZE:"=\")"
806 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
808 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
810 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
812 #------------------------------------------------------------
814 $(GLOBEXE) : perlglob$(o)
815 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
816 perlglob$(o) setargv$(o)
818 perlglob$(o) : perlglob.c
820 config.w32 : $(CFGSH_TMPL)
821 copy $(CFGSH_TMPL) config.w32
823 .\config.h : $(CFGH_TMPL)
825 copy $(CFGH_TMPL) config.h
827 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
828 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
830 # this target is for when changes to the main config.sh happen
831 # edit config.{b,v,g}c and make this target once for each supported
832 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
834 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
836 -del /f perl.exe perl*.dll
841 -perl config_h.PL "INST_VER=$(INST_VER)"
842 rename config.h $(CFGH_TMPL)
844 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
848 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
849 $(XCOPY) ..\*.h $(COREDIR)\*.*
850 $(XCOPY) *.h $(COREDIR)\*.*
851 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
852 $(RCOPY) include $(COREDIR)\*.*
853 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
854 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
856 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
857 $(LINK32) -subsystem:console -out:$@ @<<
858 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
862 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
864 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
865 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
867 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
868 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
870 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
871 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
872 !IF "$(USE_IMP_SYS)" == "define"
873 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
874 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
877 # 1. we don't want to rebuild miniperl.exe when config.h changes
878 # 2. we don't want to rebuild miniperl.exe with non-default config.h
879 $(MINI_OBJ) : $(CORE_NOCFG_H)
881 $(WIN32_OBJ) : $(CORE_H)
882 $(CORE_OBJ) : $(CORE_H)
883 $(DLL_OBJ) : $(CORE_H)
884 $(X2P_OBJ) : $(CORE_H)
886 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
887 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
888 CCTYPE=$(CCTYPE) > perldll.def
890 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
891 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
892 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
894 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
896 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
898 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
901 ..\x2p\a2p$(o) : ..\x2p\a2p.c
902 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
904 ..\x2p\hash$(o) : ..\x2p\hash.c
905 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
907 ..\x2p\str$(o) : ..\x2p\str.c
908 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
910 ..\x2p\util$(o) : ..\x2p\util.c
911 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
913 ..\x2p\walk$(o) : ..\x2p\walk.c
914 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
916 $(X2P) : $(MINIPERL) $(X2P_OBJ)
917 $(MINIPERL) ..\x2p\find2perl.PL
918 $(MINIPERL) ..\x2p\s2p.PL
919 $(LINK32) -subsystem:console -out:$@ @<<
920 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
923 perlmain.c : runperl.c
924 copy runperl.c perlmain.c
926 perlmain$(o) : perlmain.c
927 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
929 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
930 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
931 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
932 copy $(PERLEXE) $(WPERLEXE)
933 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
935 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
937 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
938 if not exist $(AUTODIR) mkdir $(AUTODIR)
940 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
941 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
943 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
944 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
946 $(XSUBPP) dl_win32.xs > $(*B).c
949 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
950 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
952 #----------------------------------------------------------------------------------
953 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
954 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
957 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
959 #----------------------------------------------------------------------------------
962 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
963 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
964 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
966 utils: $(PERLEXE) $(X2P)
968 $(MAKE) PERL=$(MINIPERL)
970 copy ..\README.aix .\perlaix.pod
971 copy ..\README.amiga .\perlamiga.pod
972 copy ..\README.apollo .\perlapollo.pod
973 copy ..\README.beos .\perlbeos.pod
974 copy ..\README.bs2000 .\perlbs2000.pod
975 copy ..\README.ce .\perlce.pod
976 copy ..\README.cygwin .\perlcygwin.pod
977 copy ..\README.dgux .\perldgux.pod
978 copy ..\README.dos .\perldos.pod
979 copy ..\README.epoc .\perlepoc.pod
980 copy ..\README.freebsd .\perlfreebsd.pod
981 copy ..\README.hurd .\perlhurd.pod
982 copy ..\README.hpux .\perlhpux.pod
983 copy ..\README.irix .\perlirix.pod
984 copy ..\README.machten .\perlmachten.pod
985 copy ..\README.macos .\perlmacos.pod
986 copy ..\README.mint .\perlmint.pod
987 copy ..\README.mpeix .\perlmpeix.pod
988 copy ..\README.netware .\perlnetware.pod
989 copy ..\README.os2 .\perlos2.pod
990 copy ..\README.os390 .\perlos390.pod
991 copy ..\README.os400 .\perlos400.pod
992 copy ..\README.plan9 .\perlplan9.pod
993 copy ..\README.qnx .\perlqnx.pod
994 copy ..\README.solaris .\perlsolaris.pod
995 copy ..\README.tru64 .\perltru64.pod
996 copy ..\README.uts .\perluts.pod
997 copy ..\README.vmesa .\perlvmesa.pod
998 copy ..\vms\perlvms.pod .\perlvms.pod
999 copy ..\README.vos .\perlvos.pod
1000 copy ..\README.win32 .\perlwin32.pod
1001 $(MAKE) -f ..\win32\pod.mak converters
1003 $(PERLEXE) lib_pm.PL
1005 $(PERLEXE) $(PL2BAT) $(UTILS)
1007 # the doubled rmdir calls are needed because older cmd shells
1008 # don't understand /q
1010 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1011 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1013 -del /f $(EXTENSION_DLL)
1014 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1015 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1016 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1017 -del /f $(LIBDIR)\XSLoader.pm
1018 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1019 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1020 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1021 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1022 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1023 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1024 -del /f $(LIBDIR)\File\Glob.pm
1025 -del /f $(LIBDIR)\Storable.pm
1026 -del /f $(LIBDIR)\Filter\Util\Call.pm
1027 -del /f $(LIBDIR)\Digest\MD5.pm
1028 -del /f $(LIBDIR)\PerlIO\scalar.pm
1029 -del /f $(LIBDIR)\PerlIO\via.pm
1030 -del /f $(LIBDIR)\MIME\Base64.pm
1031 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1032 -del /f $(LIBDIR)\List\Util.pm
1033 -del /f $(LIBDIR)\Scalar\Util.pm
1034 -del /f $(LIBDIR)\Time\HiRes.pm
1035 -del /f $(LIBDIR)\XS\APItest.pm
1036 -del /f $(LIBDIR)\XS\Typemap.pm
1037 -del /f $(LIBDIR)\Unicode\Normalize.pm
1038 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1039 -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
1040 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1041 -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
1042 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1043 -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
1044 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1045 -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
1046 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1047 -if exist $(LIBDIR)\Digest rmdir /s $(LIBDIR)\Digest
1048 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1049 -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
1050 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1051 -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
1052 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1053 -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
1054 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1055 -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
1057 -del /f *.html *.bat checkpods \
1058 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1059 perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1060 perldos.pod perlepoc.pod perlfreebsd.pod perlhurd.pod \
1061 perlhpux.pod perlirix.pod perlmachten.pod \
1062 perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1063 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1064 perlqnx.pod perlsolaris.pod perltru64.pod perluts.pod \
1065 perlvmesa.pod perlvms.pod perlvos.pod \
1066 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1067 podchecker podselect
1069 -del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs perldoc perlivp \
1070 dprofpp perlcc libnetcfg enc2xs piconv cpan
1074 -del /f find2perl s2p psed
1077 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1081 -del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1084 -del /s *.def Makefile Makefile.old
1086 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1087 -if exist $(AUTODIR) rmdir /s $(AUTODIR)
1088 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1089 -if exist $(COREDIR) rmdir /s $(COREDIR)
1091 install : all installbare installhtml
1094 $(PERLEXE) ..\installperl
1095 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1096 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1097 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1100 $(RCOPY) html\*.* $(INST_HTML)\*.*
1102 inst_lib : $(CONFIGPM)
1103 copy splittree.pl ..
1104 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1105 $(RCOPY) ..\lib $(INST_LIB)\*.*
1107 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1108 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1109 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1113 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1116 test-prep : all utils
1117 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1118 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1119 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1123 $(PERLEXE) -I..\lib harness
1126 test-notty : test-prep
1127 set PERL_SKIP_TTY_TEST=1
1129 $(PERLEXE) -I..\lib harness
1132 test-wide : test-prep
1133 set HARNESS_PERL_SWITCHES=-C
1135 $(PERLEXE) -I..\lib harness
1138 test-wide-notty : test-prep
1139 set PERL_SKIP_TTY_TEST=1
1140 set HARNESS_PERL_SWITCHES=-C
1142 $(PERLEXE) -I..\lib harness
1146 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1147 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1148 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1150 $(PERLEXE) -I..\lib harness
1153 clean : Extensions_clean
1154 -@$(DEL) miniperlmain$(o)
1155 -@$(DEL) $(MINIPERL)
1156 -@$(DEL) perlglob$(o)
1157 -@$(DEL) perlmain$(o)
1162 -@$(DEL) $(WPERLEXE)
1164 -@$(DEL) $(CORE_OBJ)
1165 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1166 -if exist $(MINIDIR) rmdir /s $(MINIDIR)
1167 -@$(DEL) $(WIN32_OBJ)
1170 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1171 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1172 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1176 # Handy way to run perlbug -ok without having to install and run the
1177 # installed perlbug. We don't re-run the tests here - we trust the user.
1178 # Please *don't* use this unless all tests pass.
1179 # If you want to report test failures, use "nmake nok" instead.
1181 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1184 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1187 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1190 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok