2 # Makefile to build perl on Windows NT using Microsoft NMAKE.
4 # Visual C++ 5.x (possibly other versions)
6 # This is set up to build a perl.exe that runs off a shared library
7 # (perl57.dll). Also makes individual DLLs for the XS extensions.
11 ## Make sure you read README.win32 *before* you mess with anything here!
15 ## Build configuration. Edit the values below to suit your needs.
19 # Set these to wherever you want "nmake install" to put your
23 INST_TOP = $(INST_DRV)\perl
26 # Comment this out if you DON'T want your perl installation to be versioned.
27 # This means that the new installation will overwrite any files from the
28 # old installation at the same INST_TOP location. Leaving it enabled is
29 # the safest route, as perl adds the extra version directory to all the
30 # locations it installs files to. If you disable it, an alternative
31 # versioned installation can be obtained by setting INST_TOP above to a
32 # path that includes an arbitrary version string.
37 # Comment this out if you DON'T want your perl installation to have
38 # architecture specific components. This means that architecture-
39 # specific files will be installed along with the architecture-neutral
40 # files. Leaving it enabled is safer and more flexible, in case you
41 # want to build multiple flavors of perl and install them together in
42 # the same location. Commenting it out gives you a simpler
43 # installation that is easier to understand for beginners.
45 #INST_ARCH = \$(ARCHNAME)
48 # uncomment to enable multiple interpreters. This is need for fork()
54 # Beginnings of interpreter cloning/threads; still very incomplete.
55 # This should be enabled to get the fork() emulation. This needs
61 # uncomment to enable the implicit "host" layer for all system calls
62 # made by perl. This needs USE_MULTI above. This is also needed to
68 # uncomment to enable the experimental PerlIO I/O subsystem.
72 # WARNING! This option is deprecated and will eventually go away (enable
73 # USE_ITHREADS instead).
75 # uncomment to enable threads-capabilities. This is incompatible with
76 # USE_ITHREADS, and is only here for people who may have come to rely
77 # on the experimental Thread support that was in 5.005.
79 #USE_5005THREADS = define
82 # uncomment one of the following lines if you are using either
83 # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
89 # uncomment next line if you want debug version of perl (big,slow)
94 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
95 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
96 # This currently requires VC 5.0 with Service Pack 3 or later.
97 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
98 # and follow the directions in the package to install.
100 # Not recommended if you have VC 6.x and you're not running Windows 9x.
102 #USE_PERLCRT = define
105 # uncomment to enable linking with setargv.obj under the Visual C
106 # compiler. Setting this options enables perl to expand wildcards in
107 # arguments, but it may be harder to use alternate methods like
108 # File::DosGlob that are more powerful. This option is supported only with
111 #USE_SETARGV = define
114 # if you have the source for des_fcrypt(), uncomment this and make sure the
115 # file exists (see README.win32). File should be located in the same
116 # directory as this file.
118 #CRYPT_SRC = fcrypt.c
121 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
122 # library, uncomment this, and make sure the library exists (see README.win32)
123 # Specify the full pathname of the library.
125 #CRYPT_LIB = fcrypt.lib
128 # set this if you wish to use perl's malloc
129 # WARNING: Turning this on/off WILL break binary compatibility with extensions
130 # you may have compiled with/without it. Be prepared to recompile all
131 # extensions if you change the default. Currently, this cannot be enabled
132 # if you ask for USE_IMP_SYS above.
134 #PERL_MALLOC = define
137 # set the install locations of the compiler include/libraries
138 # Running VCVARS32.BAT is *required* when using Visual C.
139 # Some versions of Visual C don't define MSVCDIR in the environment,
140 # so you may have to set CCHOME explicitly (spaces in the path name should
145 CCINCDIR = $(CCHOME)\include
146 CCLIBDIR = $(CCHOME)\lib
149 # Additional compiler flags can be specified here.
153 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
154 # for old symbols by default, at the expense of extreme pollution. You most
155 # probably just want to build modules that won't compile with
156 # perl Makefile.PL POLLUTE=1
157 # instead of enabling this. Please report such modules to the respective
160 #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
163 # This should normally be disabled. Enabling it will disable the File::Glob
164 # implementation of CORE::glob.
166 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
169 # This should normally be disabled. Enabling it causes perl to read scripts
170 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
171 #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
174 # specify semicolon-separated list of extra directories that modules will
175 # look for libraries (spaces in path names need not be quoted)
180 # set this to your email address (perl will guess a value from
181 # from your loginname and your hostname, which may not be right)
186 ## Build configuration ends.
189 ##################### CHANGE THESE ONLY IF YOU MUST #####################
191 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
195 CRYPT_FLAG = -DHAVE_DES_FCRYPT
198 !IF "$(PERL_MALLOC)" == ""
202 !IF "$(USE_5005THREADS)" == ""
203 USE_5005THREADS = undef
206 !IF "$(USE_5005THREADS)" == "define"
210 !IF "$(USE_IMP_SYS)" == "define"
214 !IF "$(USE_MULTI)" == ""
218 !IF "$(USE_ITHREADS)" == ""
222 !IF "$(USE_IMP_SYS)" == ""
226 !IF "$(USE_PERLIO)" == ""
230 !IF "$(USE_PERLCRT)" == ""
234 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
238 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
240 USE_5005THREADS = undef
243 !IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
244 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
247 !IF "$(USE_IMP_SYS)" != "undef"
248 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
251 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
252 PROCESSOR_ARCHITECTURE = x86
255 !IF "$(USE_5005THREADS)" == "define"
256 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
258 !IF "$(USE_MULTI)" == "define"
259 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
261 !IF "$(USE_PERLIO)" == "define"
262 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
264 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
269 !IF "$(USE_PERLIO)" == "define"
270 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
273 !IF "$(USE_ITHREADS)" == "define"
274 ARCHNAME = $(ARCHNAME)-thread
277 # Visual Studio 98 specific
278 !IF "$(CCTYPE)" == "MSVC60"
280 # VC 6.0 can load the socket dll on demand. Makes the test suite
281 # run in about 10% less time.
282 DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
285 ARCHDIR = ..\lib\$(ARCHNAME)
286 COREDIR = ..\lib\CORE
287 AUTODIR = ..\lib\auto
291 EXTUTILSDIR = $(LIBDIR)\ExtUtils
294 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
295 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
296 INST_LIB = $(INST_TOP)$(INST_VER)\lib
297 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
298 INST_COREDIR = $(INST_ARCHLIB)\CORE
299 INST_POD = $(INST_LIB)\pod
300 INST_HTML = $(INST_TOP)$(INST_VER)\html
303 # Programs to compile, build .lib files and link
308 LIB32 = $(LINK32) -lib
315 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
316 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
317 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
318 LOCDEFS = -DPERLDLL -DPERL_CORE
322 !IF "$(USE_PERLCRT)" != "define"
331 !IF "$(CFG)" == "Debug"
332 ! IF "$(CCTYPE)" == "MSVC20"
333 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
335 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
337 LINK_DBG = -debug -pdb:none
339 # -O1 yields smaller code, which turns out to be faster than -O2
340 #OPTIMIZE = -O2 -MD -DNDEBUG
341 OPTIMIZE = -O1 -MD -DNDEBUG
345 !IF "$(USE_PERLCRT)" != "define"
346 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
349 LIBBASEFILES = $(CRYPT_LIB) \
350 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
351 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
352 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
353 version.lib odbc32.lib odbccp32.lib
355 # we add LIBC here, since we may be using PerlCRT.dll
356 LIBFILES = $(LIBBASEFILES) $(LIBC)
358 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
359 $(PCHFLAGS) $(OPTIMIZE)
360 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
361 -libpath:"$(INST_COREDIR)" \
362 -machine:$(PROCESSOR_ARCHITECTURE)
366 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
368 #################### do not edit below this line #######################
369 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
377 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
380 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
386 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
387 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
395 # makedef.pl must be updated if this changes, and this should normally
396 # only change when there is an incompatible revision of the public API.
397 # XXX so why did we change it from perl56 to perl57?
398 PERLIMPLIB = ..\perl57.lib
399 PERLDLL = ..\perl57.dll
401 MINIPERL = ..\miniperl.exe
403 PERLEXE = ..\perl.exe
404 WPERLEXE = ..\wperl.exe
405 GLOBEXE = ..\perlglob.exe
406 CONFIGPM = ..\lib\Config.pm
407 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
410 # Nominate a target which causes extensions to be re-built
411 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
412 # on and really only the interface - i.e. the .def file used to export symbols
414 PERLDEP = perldll.def
416 PL2BAT = bin\pl2bat.pl
417 GLOBBAT = bin\perlglob.bat
441 ..\lib\ExtUtils\xsubpp \
451 CFGSH_TMPL = config.vc
452 CFGH_TMPL = config_H.vc
454 XCOPY = xcopy /f /r /i /d
455 RCOPY = xcopy /f /r /i /e /d
462 # filenames given to xsubpp must have forward slashes (since it puts
463 # full pathnames in #line strings)
464 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
501 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
503 !IF "$(PERL_MALLOC)" == "define"
504 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
507 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
514 !IF "$(USE_PERLIO)" == "define"
515 WIN32_SRC = $(WIN32_SRC) .\win32io.c
518 !IF "$(CRYPT_SRC)" != ""
519 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
522 DLL_SRC = $(DYNALOADER).c
568 .\include\sys\socket.h \
571 CORE_H = $(CORE_NOCFG_H) .\config.h
573 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
574 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
575 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
576 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
577 $(MINIDIR)\miniperlmain$(o) \
578 $(MINIDIR)\perlio$(o)
579 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
580 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
581 DLL_OBJ = $(DLL_SRC:.c=.obj)
582 X2P_OBJ = $(X2P_SRC:.c=.obj)
584 PERLDLL_OBJ = $(CORE_OBJ)
585 PERLEXE_OBJ = perlmain$(o)
587 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
588 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
590 !IF "$(USE_SETARGV)" != ""
591 SETARGV_OBJ = setargv$(o)
594 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
595 SOCKET = $(EXTDIR)\Socket\Socket
596 FCNTL = $(EXTDIR)\Fcntl\Fcntl
597 OPCODE = $(EXTDIR)\Opcode\Opcode
598 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
600 POSIX = $(EXTDIR)\POSIX\POSIX
601 ATTRS = $(EXTDIR)\attrs\attrs
602 THREAD = $(EXTDIR)\Thread\Thread
605 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
606 ERRNO = $(EXTDIR)\Errno\Errno
607 PEEK = $(EXTDIR)\Devel\Peek\Peek
608 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
609 DPROF = $(EXTDIR)\Devel\DProf\DProf
610 GLOB = $(EXTDIR)\File\Glob\Glob
611 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
612 STORABLE = $(EXTDIR)\Storable\Storable
613 FILTER = $(EXTDIR)\Filter\Util\Call\Call
614 ENCODE = $(EXTDIR)\Encode\Encode
615 MD5 = $(EXTDIR)\Digest\MD5\MD5
616 PERLIOSCALAR = $(EXTDIR)\PerlIO\Scalar\Scalar
617 MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
618 TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
619 CWD = $(EXTDIR)\Cwd\Cwd
620 LISTUTIL = $(EXTDIR)\List\Util\Util
621 PERLIOVIA = $(EXTDIR)\PerlIO\Via\Via
622 XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
623 UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
625 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
626 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
627 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
628 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
629 IO_DLL = $(AUTODIR)\IO\IO.dll
630 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
631 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
632 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
633 B_DLL = $(AUTODIR)\B\B.dll
634 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
635 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
636 RE_DLL = $(AUTODIR)\re\re.dll
637 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
638 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
639 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
640 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
641 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
642 FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
643 ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
644 MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
645 PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
646 MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
647 TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
648 CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
649 LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
650 PERLIOVIA_DLL = $(AUTODIR)\PerlIO\Via\Via.dll
651 XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
652 UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
682 $(UNICODENORMALIZE).c
705 $(PERLIOSCALAR_DLL) \
712 $(UNICODENORMALIZE_DLL)
714 POD2HTML = $(PODDIR)\pod2html
715 POD2MAN = $(PODDIR)\pod2man
716 POD2LATEX = $(PODDIR)\pod2latex
717 POD2TEXT = $(PODDIR)\pod2text
720 "INST_DRV=$(INST_DRV)" \
721 "INST_TOP=$(INST_TOP)" \
722 "INST_VER=$(INST_VER)" \
723 "INST_ARCH=$(INST_ARCH)" \
724 "archname=$(ARCHNAME)" \
727 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
728 "cf_email=$(EMAIL)" \
729 "d_crypt=$(D_CRYPT)" \
730 "d_mymalloc=$(PERL_MALLOC)" \
732 "incpath=$(CCINCDIR:"=\")" \
733 "libperl=$(PERLIMPLIB:..\=)" \
734 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
736 "make=$(MAKE_BARE)" \
737 "use5005threads=$(USE_5005THREADS)" \
738 "useithreads=$(USE_ITHREADS)" \
739 "usethreads=$(USE_5005THREADS)" \
740 "usemultiplicity=$(USE_MULTI)" \
741 "useperlio=$(USE_PERLIO)" \
742 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
743 "optimize=$(OPTIMIZE:"=\")"
749 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
751 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
753 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
755 #------------------------------------------------------------
757 $(GLOBEXE) : perlglob$(o)
758 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
759 perlglob$(o) setargv$(o)
761 perlglob$(o) : perlglob.c
763 config.w32 : $(CFGSH_TMPL)
764 copy $(CFGSH_TMPL) config.w32
766 .\config.h : $(CFGH_TMPL)
768 copy $(CFGH_TMPL) config.h
770 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
771 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
773 # this target is for when changes to the main config.sh happen
774 # edit config.{b,v,g}c and make this target once for each supported
775 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
777 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
784 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
785 rename config.h $(CFGH_TMPL)
787 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
791 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
792 $(XCOPY) ..\*.h $(COREDIR)\*.*
793 $(XCOPY) *.h $(COREDIR)\*.*
794 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
795 $(RCOPY) include $(COREDIR)\*.*
796 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
797 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
799 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
800 $(LINK32) -subsystem:console -out:$@ @<<
801 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
805 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
807 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
808 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
810 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
811 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
813 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
814 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
815 !IF "$(USE_IMP_SYS)" == "define"
816 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
817 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
820 # 1. we don't want to rebuild miniperl.exe when config.h changes
821 # 2. we don't want to rebuild miniperl.exe with non-default config.h
822 $(MINI_OBJ) : $(CORE_NOCFG_H)
824 $(WIN32_OBJ) : $(CORE_H)
825 $(CORE_OBJ) : $(CORE_H)
826 $(DLL_OBJ) : $(CORE_H)
827 $(X2P_OBJ) : $(CORE_H)
829 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
830 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
831 CCTYPE=$(CCTYPE) > perldll.def
833 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
834 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
835 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
837 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
839 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
841 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
844 ..\x2p\a2p$(o) : ..\x2p\a2p.c
845 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
847 ..\x2p\hash$(o) : ..\x2p\hash.c
848 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
850 ..\x2p\str$(o) : ..\x2p\str.c
851 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
853 ..\x2p\util$(o) : ..\x2p\util.c
854 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
856 ..\x2p\walk$(o) : ..\x2p\walk.c
857 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
859 $(X2P) : $(MINIPERL) $(X2P_OBJ)
860 $(MINIPERL) ..\x2p\find2perl.PL
861 $(MINIPERL) ..\x2p\s2p.PL
862 $(LINK32) -subsystem:console -out:$@ @<<
863 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
866 perlmain.c : runperl.c
867 copy runperl.c perlmain.c
869 perlmain$(o) : perlmain.c
870 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
872 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
873 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
874 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
875 copy $(PERLEXE) $(WPERLEXE)
876 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
878 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
880 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
881 if not exist $(AUTODIR) mkdir $(AUTODIR)
883 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
884 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
886 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
887 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
889 $(XSUBPP) dl_win32.xs > $(*B).c
892 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
893 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
895 #----------------------------------------------------------------------------------
896 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
897 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
900 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
902 #----------------------------------------------------------------------------------
905 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
906 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
907 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
909 utils: $(PERLEXE) $(X2P)
911 $(MAKE) PERL=$(MINIPERL)
913 copy ..\README.aix .\perlaix.pod
914 copy ..\README.amiga .\perlamiga.pod
915 copy ..\README.apollo .\perlapollo.pod
916 copy ..\README.beos .\perlbeos.pod
917 copy ..\README.bs2000 .\perlbs2000.pod
918 copy ..\README.ce .\perlce.pod
919 copy ..\README.cygwin .\perlcygwin.pod
920 copy ..\README.dgux .\perldgux.pod
921 copy ..\README.dos .\perldos.pod
922 copy ..\README.epoc .\perlepoc.pod
923 copy ..\README.hurd .\perlhurd.pod
924 copy ..\README.hpux .\perlhpux.pod
925 copy ..\README.machten .\perlmachten.pod
926 copy ..\README.macos .\perlmacos.pod
927 copy ..\README.mint .\perlmint.pod
928 copy ..\README.mpeix .\perlmpeix.pod
929 copy ..\README.netware .\perlnetware.pod
930 copy ..\README.os2 .\perlos2.pod
931 copy ..\README.os390 .\perlos390.pod
932 copy ..\README.plan9 .\perlplan9.pod
933 copy ..\README.qnx .\perlqnx.pod
934 copy ..\README.solaris .\perlsolaris.pod
935 copy ..\README.tru64 .\perltru64.pod
936 copy ..\README.uts .\perluts.pod
937 copy ..\README.vmesa .\perlvmesa.pod
938 copy ..\vms\perlvms.pod .\perlvms.pod
939 copy ..\README.vos .\perlvos.pod
940 copy ..\README.win32 .\perlwin32.pod
941 $(MAKE) -f ..\win32\pod.mak converters
945 $(PERLEXE) $(PL2BAT) $(UTILS)
948 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
949 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
951 -del /f $(EXTENSION_DLL)
952 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
953 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
954 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
955 -del /f $(LIBDIR)\XSLoader.pm
956 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
957 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
958 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
959 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
960 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
961 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
962 -del /f $(LIBDIR)\File\Glob.pm
963 -del /f $(LIBDIR)\Storable.pm
964 -del /f $(LIBDIR)\Filter\Util\Call.pm
965 -del /f $(LIBDIR)\Digest\MD5.pm
966 -del /f $(LIBDIR)\PerlIO\Scalar.pm
967 -del /f $(LIBDIR)\PerlIO\Via.pm
968 -del /f $(LIBDIR)\MIME\Base64.pm
969 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
970 -del /f $(LIBDIR)\List\Util.pm
971 -del /f $(LIBDIR)\Scalar\Util.pm
972 -del /f $(LIBDIR)\Time\HiRes.pm
973 -del /f $(LIBDIR)\XS\Typemap.pm
974 -del /f $(LIBDIR)\Unicode\Normalize.pm
975 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
976 -rmdir /s $(LIBDIR)\IO
977 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
978 -rmdir /s $(LIBDIR)\Thread
979 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
980 -rmdir /s $(LIBDIR)\B
981 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
982 -rmdir /s $(LIBDIR)\Data
983 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
984 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
985 -rmdir /s $(LIBDIR)\Digest
986 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
987 -rmdir /s $(LIBDIR)\MIME
988 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
989 -rmdir /s $(LIBDIR)\List
990 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
991 -rmdir /s $(LIBDIR)\Scalar
992 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
993 -rmdir /s $(LIBDIR)\XS
995 -del /f *.html *.bat checkpods \
996 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
997 perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
998 perldos.pod perlepoc.pod perlhurd.pod \
999 perlhpux.pod perlmachten.pod \
1000 perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1001 perlos2.pod perlos390.pod perlplan9.pod perlqnx.pod \
1002 perlsolaris.pod perltru64.pod perluts.pod \
1003 perlvmesa.pod perlvms.pod perlvos.pod \
1004 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1005 podchecker podselect
1007 -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc perlivp dprofpp
1011 -del /f find2perl s2p
1014 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1018 -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
1020 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1021 -rmdir /s $(AUTODIR)
1022 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1023 -rmdir /s $(COREDIR)
1025 install : all installbare installhtml
1028 $(PERLEXE) ..\installperl
1029 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1030 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1031 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1034 $(RCOPY) html\*.* $(INST_HTML)\*.*
1036 inst_lib : $(CONFIGPM)
1037 copy splittree.pl ..
1038 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1039 $(RCOPY) ..\lib $(INST_LIB)\*.*
1041 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1042 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1043 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1047 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1050 test-prep : all utils
1051 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1052 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1053 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1057 $(PERLEXE) -I..\lib harness
1060 test-notty : test-prep
1061 set PERL_SKIP_TTY_TEST=1
1063 $(PERLEXE) -I..\lib harness
1066 test-wide : test-prep
1067 set HARNESS_PERL_SWITCHES=-C
1069 $(PERLEXE) -I..\lib harness
1072 test-wide-notty : test-prep
1073 set PERL_SKIP_TTY_TEST=1
1074 set HARNESS_PERL_SWITCHES=-C
1076 $(PERLEXE) -I..\lib harness
1079 clean : Extensions_clean
1080 -@$(DEL) miniperlmain$(o)
1081 -@$(DEL) $(MINIPERL)
1082 -@$(DEL) perlglob$(o)
1083 -@$(DEL) perlmain$(o)
1088 -@$(DEL) $(WPERLEXE)
1090 -@$(DEL) $(CORE_OBJ)
1091 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1092 -rmdir /s $(MINIDIR)
1093 -@$(DEL) $(WIN32_OBJ)
1096 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1097 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1098 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1102 # Handy way to run perlbug -ok without having to install and run the
1103 # installed perlbug. We don't re-run the tests here - we trust the user.
1104 # Please *don't* use this unless all tests pass.
1105 # If you want to report test failures, use "nmake nok" instead.
1107 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1110 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1113 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1116 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok