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
58 #USE_ITHREADS = define
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.
69 # This is currently incompatible with USE_MULTI, USE_ITHREADS,
74 # WARNING! This option is deprecated and will eventually go away (enable
75 # USE_ITHREADS instead).
77 # uncomment to enable threads-capabilities. This is incompatible with
78 # USE_ITHREADS, and is only here for people who may have come to rely
79 # on the experimental Thread support that was in 5.005.
81 #USE_5005THREADS = define
84 # WARNING! This option is deprecated and will eventually go away (enable
87 # uncomment next line if you want to use the PERL_OBJECT build option.
88 # DO NOT ENABLE unless you have legacy code that relies on the C++
89 # CPerlObj class that was available in 5.005. This cannot be enabled
90 # if you ask for USE_5005THREADS above.
95 # uncomment one of the following lines if you are using either
96 # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
102 # uncomment next line if you want debug version of perl (big,slow)
107 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
108 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
109 # This currently requires VC 5.0 with Service Pack 3 or later.
110 # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
111 # and follow the directions in the package to install.
113 # Not recommended if you have VC 6.x and you're not running Windows 9x.
115 #USE_PERLCRT = define
118 # uncomment to enable linking with setargv.obj under the Visual C
119 # compiler. Setting this options enables perl to expand wildcards in
120 # arguments, but it may be harder to use alternate methods like
121 # File::DosGlob that are more powerful. This option is supported only with
124 #USE_SETARGV = define
127 # if you have the source for des_fcrypt(), uncomment this and make sure the
128 # file exists (see README.win32). File should be located in the same
129 # directory as this file.
131 #CRYPT_SRC = fcrypt.c
134 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
135 # library, uncomment this, and make sure the library exists (see README.win32)
136 # Specify the full pathname of the library.
138 #CRYPT_LIB = fcrypt.lib
141 # set this if you wish to use perl's malloc
142 # WARNING: Turning this on/off WILL break binary compatibility with extensions
143 # you may have compiled with/without it. Be prepared to recompile all
144 # extensions if you change the default. Currently, this cannot be enabled
145 # if you ask for USE_IMP_SYS above.
147 #PERL_MALLOC = define
150 # set the install locations of the compiler include/libraries
151 # Running VCVARS32.BAT is *required* when using Visual C.
152 # Some versions of Visual C don't define MSVCDIR in the environment,
153 # so you may have to set CCHOME explicitly (spaces in the path name should
158 CCINCDIR = $(CCHOME)\include
159 CCLIBDIR = $(CCHOME)\lib
162 # Additional compiler flags can be specified here.
166 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
167 # for old symbols by default, at the expense of extreme pollution. You most
168 # probably just want to build modules that won't compile with
169 # perl Makefile.PL POLLUTE=1
170 # instead of enabling this. Please report such modules to the respective
173 #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
176 # This should normally be disabled. Enabling it will disable the File::Glob
177 # implementation of CORE::glob.
179 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
182 # This should normally be disabled. Enabling it causes perl to read scripts
183 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
184 #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
187 # specify semicolon-separated list of extra directories that modules will
188 # look for libraries (spaces in path names need not be quoted)
193 # set this to your email address (perl will guess a value from
194 # from your loginname and your hostname, which may not be right)
199 ## Build configuration ends.
202 ##################### CHANGE THESE ONLY IF YOU MUST #####################
204 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
208 CRYPT_FLAG = -DHAVE_DES_FCRYPT
211 !IF "$(USE_OBJECT)" == "define"
213 USE_5005THREADS = undef
218 !IF "$(PERL_MALLOC)" == ""
222 !IF "$(USE_5005THREADS)" == ""
223 USE_5005THREADS = undef
226 !IF "$(USE_5005THREADS)" == "define"
230 !IF "$(USE_IMP_SYS)" == "define"
234 !IF "$(USE_MULTI)" == ""
238 !IF "$(USE_OBJECT)" == ""
242 !IF "$(USE_ITHREADS)" == ""
246 !IF "$(USE_IMP_SYS)" == ""
250 !IF "$(USE_PERLCRT)" == ""
254 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef"
258 !IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef"
260 USE_5005THREADS = undef
263 !IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
264 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
267 !IF "$(USE_IMP_SYS)" != "undef"
268 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
271 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
272 PROCESSOR_ARCHITECTURE = x86
275 !IF "$(USE_OBJECT)" == "define"
276 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
278 !IF "$(USE_5005THREADS)" == "define"
279 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
281 !IF "$(USE_MULTI)" == "define"
282 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
284 !IF "$(USE_PERLIO)" == "define"
285 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
287 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
308 # VC 6.0 seems capable of compiling perl correctly with optimizations
309 # enabled. Anything earlier fails tests.
315 ARCHDIR = ..\lib\$(ARCHNAME)
316 COREDIR = ..\lib\CORE
317 AUTODIR = ..\lib\auto
321 EXTUTILSDIR = $(LIBDIR)\ExtUtils
324 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
325 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
326 INST_LIB = $(INST_TOP)$(INST_VER)\lib
327 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
328 INST_COREDIR = $(INST_ARCHLIB)\CORE
329 INST_POD = $(INST_LIB)\pod
330 INST_HTML = $(INST_POD)\html
333 # Programs to compile, build .lib files and link
338 LIB32 = $(LINK32) -lib
345 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
346 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
347 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
348 LOCDEFS = -DPERLDLL -DPERL_CORE
352 !IF "$(USE_PERLCRT)" != "define"
361 !IF "$(CFG)" == "Debug"
362 ! IF "$(CCTYPE)" == "MSVC20"
363 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
365 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
367 LINK_DBG = -debug -pdb:none
369 ! IF "$(CFG)" == "Optimize"
370 # -O1 yields smaller code, which turns out to be faster than -O2
371 #OPTIMIZE = -O2 -MD -DNDEBUG
372 OPTIMIZE = -O1 -MD -DNDEBUG
374 OPTIMIZE = -Od -MD -DNDEBUG
379 !IF "$(USE_OBJECT)" == "define"
380 OPTIMIZE = $(OPTIMIZE) $(CXX_FLAG)
381 BUILDOPT = $(BUILDOPT) -DPERL_OBJECT
384 !IF "$(USE_PERLCRT)" != "define"
385 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
388 LIBBASEFILES = $(CRYPT_LIB) \
389 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
390 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
391 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
392 version.lib odbc32.lib odbccp32.lib
394 # we add LIBC here, since we may be using PerlCRT.dll
395 LIBFILES = $(LIBBASEFILES) $(LIBC)
397 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
398 $(PCHFLAGS) $(OPTIMIZE)
399 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
400 -libpath:"$(INST_COREDIR)" \
401 -machine:$(PROCESSOR_ARCHITECTURE)
405 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
407 #################### do not edit below this line #######################
408 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
416 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
419 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
425 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
426 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
434 # makedef.pl must be updated if this changes, and this should normally
435 # only change when there is an incompatible revision of the public API.
436 # XXX so why did we change it from perl56 to perl57?
437 PERLIMPLIB = ..\perl57.lib
438 PERLDLL = ..\perl57.dll
440 MINIPERL = ..\miniperl.exe
442 PERLEXE = ..\perl.exe
443 WPERLEXE = ..\wperl.exe
444 GLOBEXE = ..\perlglob.exe
445 CONFIGPM = ..\lib\Config.pm
446 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
449 PL2BAT = bin\pl2bat.pl
450 GLOBBAT = bin\perlglob.bat
480 CFGSH_TMPL = config.vc
481 CFGH_TMPL = config_H.vc
483 XCOPY = xcopy /f /r /i /d
484 RCOPY = xcopy /f /r /i /e /d
488 DEL = bin\mdelete.bat
491 # filenames given to xsubpp must have forward slashes (since it puts
492 # full pathnames in #line strings)
493 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
526 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
528 !IF "$(PERL_MALLOC)" == "define"
529 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
532 !IF "$(USE_OBJECT)" != "define"
533 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
541 !IF "$(CRYPT_SRC)" != ""
542 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
545 DLL_SRC = $(DYNALOADER).c
591 .\include\sys\socket.h \
594 CORE_H = $(CORE_NOCFG_H) .\config.h
596 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
597 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
598 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
599 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
600 $(MINIDIR)\miniperlmain$(o) \
601 $(MINIDIR)\perlio$(o)
602 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
603 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
604 DLL_OBJ = $(DLL_SRC:.c=.obj)
605 X2P_OBJ = $(X2P_SRC:.c=.obj)
607 PERLDLL_OBJ = $(CORE_OBJ)
608 PERLEXE_OBJ = perlmain$(o)
610 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
611 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
613 !IF "$(USE_SETARGV)" != ""
614 SETARGV_OBJ = setargv$(o)
617 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
618 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
619 Sys/Hostname Storable Filter/Util/Call Encode
620 STATIC_EXT = DynaLoader
623 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
624 SOCKET = $(EXTDIR)\Socket\Socket
625 FCNTL = $(EXTDIR)\Fcntl\Fcntl
626 OPCODE = $(EXTDIR)\Opcode\Opcode
627 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
629 POSIX = $(EXTDIR)\POSIX\POSIX
630 ATTRS = $(EXTDIR)\attrs\attrs
631 THREAD = $(EXTDIR)\Thread\Thread
634 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
635 ERRNO = $(EXTDIR)\Errno\Errno
636 PEEK = $(EXTDIR)\Devel\Peek\Peek
637 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
638 DPROF = $(EXTDIR)\Devel\DProf\DProf
639 GLOB = $(EXTDIR)\File\Glob\Glob
640 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
641 STORABLE = $(EXTDIR)\Storable\Storable
642 FILTER = $(EXTDIR)\Filter\Util\Call\Call
643 ENCODE = $(EXTDIR)\Encode\Encode
645 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
646 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
647 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
648 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
649 IO_DLL = $(AUTODIR)\IO\IO.dll
650 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
651 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
652 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
653 B_DLL = $(AUTODIR)\B\B.dll
654 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
655 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
656 RE_DLL = $(AUTODIR)\re\re.dll
657 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
658 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
659 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
660 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
661 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
662 FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
663 ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
665 ERRNO_PM = $(LIBDIR)\Errno.pm
712 POD2HTML = $(PODDIR)\pod2html
713 POD2MAN = $(PODDIR)\pod2man
714 POD2LATEX = $(PODDIR)\pod2latex
715 POD2TEXT = $(PODDIR)\pod2text
718 "INST_DRV=$(INST_DRV)" \
719 "INST_TOP=$(INST_TOP)" \
720 "INST_VER=$(INST_VER)" \
721 "INST_ARCH=$(INST_ARCH)" \
722 "archname=$(ARCHNAME)" \
725 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
726 "cf_email=$(EMAIL)" \
727 "d_crypt=$(D_CRYPT)" \
728 "d_mymalloc=$(PERL_MALLOC)" \
730 "incpath=$(CCINCDIR:"=\")" \
731 "libperl=$(PERLIMPLIB:..\=)" \
732 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
735 "static_ext=$(STATIC_EXT)" \
736 "dynamic_ext=$(DYNAMIC_EXT)" \
737 "nonxs_ext=$(NONXS_EXT)" \
738 "use5005threads=$(USE_5005THREADS)" \
739 "useithreads=$(USE_ITHREADS)" \
740 "usethreads=$(USE_5005THREADS)" \
741 "usemultiplicity=$(USE_MULTI)" \
742 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
743 "optimize=$(OPTIMIZE:"=\")"
749 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
750 $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
752 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
754 #------------------------------------------------------------
756 $(GLOBEXE) : perlglob$(o)
757 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
758 perlglob$(o) setargv$(o)
760 perlglob$(o) : perlglob.c
762 config.w32 : $(CFGSH_TMPL)
763 copy $(CFGSH_TMPL) config.w32
765 .\config.h : $(CFGH_TMPL)
767 copy $(CFGH_TMPL) config.h
769 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
770 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
772 # this target is for when changes to the main config.sh happen
773 # edit config.{b,v,g}c and make this target once for each supported
774 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
776 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
783 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
784 rename config.h $(CFGH_TMPL)
786 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
790 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
791 $(XCOPY) ..\*.h $(COREDIR)\*.*
792 $(XCOPY) *.h $(COREDIR)\*.*
793 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
794 $(RCOPY) include $(COREDIR)\*.*
795 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
796 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
798 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
799 $(LINK32) -subsystem:console -out:$@ @<<
800 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
804 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
806 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
807 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
809 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
810 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
812 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
813 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
814 !IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
815 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
816 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
819 # 1. we don't want to rebuild miniperl.exe when config.h changes
820 # 2. we don't want to rebuild miniperl.exe with non-default config.h
821 $(MINI_OBJ) : $(CORE_NOCFG_H)
823 $(WIN32_OBJ) : $(CORE_H)
824 $(CORE_OBJ) : $(CORE_H)
825 $(DLL_OBJ) : $(CORE_H)
826 $(X2P_OBJ) : $(CORE_H)
828 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
829 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
830 CCTYPE=$(CCTYPE) > perldll.def
832 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
833 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
834 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
836 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
838 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
840 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
843 ..\x2p\a2p$(o) : ..\x2p\a2p.c
844 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
846 ..\x2p\hash$(o) : ..\x2p\hash.c
847 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
849 ..\x2p\str$(o) : ..\x2p\str.c
850 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
852 ..\x2p\util$(o) : ..\x2p\util.c
853 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
855 ..\x2p\walk$(o) : ..\x2p\walk.c
856 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
858 $(X2P) : $(MINIPERL) $(X2P_OBJ)
859 $(MINIPERL) ..\x2p\find2perl.PL
860 $(MINIPERL) ..\x2p\s2p.PL
861 $(LINK32) -subsystem:console -out:$@ @<<
862 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
865 perlmain.c : runperl.c
866 copy runperl.c perlmain.c
868 perlmain$(o) : perlmain.c
869 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
871 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
872 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
873 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
874 copy $(PERLEXE) $(WPERLEXE)
875 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
877 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
879 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
880 if not exist $(AUTODIR) mkdir $(AUTODIR)
882 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
883 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
885 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
886 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
888 $(XSUBPP) dl_win32.xs > $(*B).c
891 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
892 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
894 $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
895 cd $(EXTDIR)\Data\$(*B)
896 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
900 $(DPROF_DLL): $(PERLEXE) $(DPROF).xs
901 cd $(EXTDIR)\Devel\$(*B)
902 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
906 $(GLOB_DLL): $(PERLEXE) $(GLOB).xs
907 cd $(EXTDIR)\File\$(*B)
908 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
912 $(PEEK_DLL): $(PERLEXE) $(PEEK).xs
913 cd $(EXTDIR)\Devel\$(*B)
914 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
918 $(RE_DLL): $(PERLEXE) $(RE).xs
920 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
924 $(B_DLL): $(PERLEXE) $(B).xs
926 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
930 $(THREAD_DLL): $(PERLEXE) $(THREAD).xs
932 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
936 $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
938 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
942 $(POSIX_DLL): $(PERLEXE) $(POSIX).xs
944 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
948 $(IO_DLL): $(PERLEXE) $(IO).xs
950 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
954 $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
956 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
960 $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
962 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
966 $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
968 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
972 $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
974 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
978 $(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs
979 cd $(EXTDIR)\Sys\$(*B)
980 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
984 $(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
986 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
990 $(ENCODE_DLL): $(PERLEXE) $(ENCODE).xs
992 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
996 $(STORABLE_DLL): $(PERLEXE) $(STORABLE).xs
998 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1002 $(FILTER_DLL): $(PERLEXE) $(FILTER).xs
1003 cd $(EXTDIR)\Filter\Util\Call
1004 ..\..\..\..\miniperl -I..\..\..\..\lib Makefile.PL INSTALLDIRS=perl
1006 cd ..\..\..\..\win32
1008 $(ENCODE_DLL): $(PERLEXE) $(ENCODE).xs
1010 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1014 $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1016 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1021 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1022 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
1023 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1025 utils: $(PERLEXE) $(X2P)
1027 $(MAKE) PERL=$(MINIPERL)
1029 copy ..\README.amiga .\perlamiga.pod
1030 copy ..\README.cygwin .\perlcygwin.pod
1031 copy ..\README.dos .\perldos.pod
1032 copy ..\README.hpux .\perlhpux.pod
1033 copy ..\README.machten .\perlmachten.pod
1034 copy ..\README.os2 .\perlos2.pod
1035 copy ..\vms\perlvms.pod .\perlvms.pod
1036 copy ..\README.win32 .\perlwin32.pod
1037 $(MAKE) -f ..\win32\pod.mak converters
1039 $(PERLEXE) lib_pm.PL
1041 $(PERLEXE) $(PL2BAT) $(UTILS)
1044 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1045 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1047 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1048 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1049 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1050 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1051 -del /f $(LIBDIR)\XSLoader.pm
1052 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1053 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1054 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1055 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1056 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1057 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1058 -del /f $(LIBDIR)\File\Glob.pm
1059 -del /f $(LIBDIR)\Storable.pm
1060 -del /f $(LIBDIR)\Filter\Util\Call\Call.pm
1061 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1062 -rmdir /s $(LIBDIR)\IO
1063 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1064 -rmdir /s $(LIBDIR)\Thread
1065 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1066 -rmdir /s $(LIBDIR)\B
1067 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1068 -rmdir /s $(LIBDIR)\Data
1069 -if exist $(LIBDIR)\Filter\Util\Call rmdir /s /q $(LIBDIR)\Filter\Util\Call
1070 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1071 -del /f $(PODDIR)\*.html
1072 -del /f $(PODDIR)\*.bat
1074 -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp
1078 -del /f find2perl s2p
1081 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1085 -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
1087 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1088 -rmdir /s $(AUTODIR)
1089 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1090 -rmdir /s $(COREDIR)
1092 install : all installbare installhtml
1095 $(PERLEXE) ..\installperl
1096 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1097 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1098 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1101 $(RCOPY) html\*.* $(INST_HTML)\*.*
1103 inst_lib : $(CONFIGPM)
1104 copy splittree.pl ..
1105 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1106 $(RCOPY) ..\lib $(INST_LIB)\*.*
1108 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1109 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1110 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1114 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1117 test-prep : all utils
1118 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1119 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1120 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1124 $(PERLEXE) -I..\lib harness
1127 test-notty : test-prep
1128 set PERL_SKIP_TTY_TEST=1
1130 $(PERLEXE) -I..\lib harness
1133 test-wide : test-prep
1134 set HARNESS_PERL_SWITCHES=-C
1136 $(PERLEXE) -I..\lib harness
1139 test-wide-notty : test-prep
1140 set PERL_SKIP_TTY_TEST=1
1141 set HARNESS_PERL_SWITCHES=-C
1143 $(PERLEXE) -I..\lib harness
1147 -@$(DEL) miniperlmain$(o)
1148 -@$(DEL) $(MINIPERL)
1149 -@$(DEL) perlglob$(o)
1150 -@$(DEL) perlmain$(o)
1152 -@$(DEL) /f config.h
1155 -@$(DEL) $(WPERLEXE)
1157 -@$(DEL) $(CORE_OBJ)
1158 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1159 -rmdir /s $(MINIDIR)
1160 -@$(DEL) $(WIN32_OBJ)
1163 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1164 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1165 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1169 # Handy way to run perlbug -ok without having to install and run the
1170 # installed perlbug. We don't re-run the tests here - we trust the user.
1171 # Please *don't* use this unless all tests pass.
1172 # If you want to report test failures, use "nmake nok" instead.
1174 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1177 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1180 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1183 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok