2 # Makefile to build perl on Windows NT using Microsoft NMAKE.
4 # This is set up to build a perl.exe that runs off a shared library
5 # (perl56.dll). Also makes individual DLLs for the XS extensions.
9 ## Make sure you read README.win32 *before* you mess with anything here!
13 ## Build configuration. Edit the values below to suit your needs.
17 # Set these to wherever you want "nmake install" to put your
21 INST_TOP = $(INST_DRV)\perl
24 # Comment this out if you DON'T want your perl installation to be versioned.
25 # This means that the new installation will overwrite any files from the
26 # old installation at the same INST_TOP location. Leaving it enabled is
27 # the safest route, as perl adds the extra version directory to all the
28 # locations it installs files to. If you disable it, an alternative
29 # versioned installation can be obtained by setting INST_TOP above to a
30 # path that includes an arbitrary version string.
35 # Comment this out if you DON'T want your perl installation to have
36 # architecture specific components. This means that architecture-
37 # specific files will be installed along with the architecture-neutral
38 # files. Leaving it enabled is safer and more flexible, in case you
39 # want to build multiple flavors of perl and install them together in
40 # the same location. Commenting it out gives you a simpler
41 # installation that is easier to understand for beginners.
43 INST_ARCH = \$(ARCHNAME)
46 # uncomment to enable multiple interpreters. This is need for fork()
52 # Beginnings of interpreter cloning/threads; still very incomplete.
53 # This should be enabled to get the fork() emulation. This needs
56 #USE_ITHREADS = define
59 # uncomment to enable the implicit "host" layer for all system calls
60 # made by perl. This needs USE_MULTI above. This is also needed to
66 # uncomment to enable the experimental PerlIO I/O subsystem.
67 # This is currently incompatible with USE_MULTI, USE_ITHREADS,
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 # WARNING! This option is deprecated and will eventually go away (enable
85 # uncomment next line if you want to use the PERL_OBJECT build option.
86 # DO NOT ENABLE unless you have legacy code that relies on the C++
87 # CPerlObj class that was available in 5.005. This cannot be enabled
88 # if you ask for USE_5005THREADS above.
93 # uncomment one of the following lines if you are using either
94 # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
100 # uncomment next line if you want debug version of perl (big,slow)
105 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
106 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
107 # This currently requires VC 5.0 with Service Pack 3 or later.
108 # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
109 # and follow the directions in the package to install.
111 # Not recommended if you have VC 6.x and you're not running Windows 9x.
113 #USE_PERLCRT = define
116 # uncomment to enable linking with setargv.obj under the Visual C
117 # compiler. Setting this options enables perl to expand wildcards in
118 # arguments, but it may be harder to use alternate methods like
119 # File::DosGlob that are more powerful. This option is supported only with
122 #USE_SETARGV = define
125 # if you have the source for des_fcrypt(), uncomment this and make sure the
126 # file exists (see README.win32). File should be located in the same
127 # directory as this file.
129 #CRYPT_SRC = fcrypt.c
132 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
133 # library, uncomment this, and make sure the library exists (see README.win32)
134 # Specify the full pathname of the library.
136 #CRYPT_LIB = fcrypt.lib
139 # set this if you wish to use perl's malloc
140 # WARNING: Turning this on/off WILL break binary compatibility with extensions
141 # you may have compiled with/without it. Be prepared to recompile all
142 # extensions if you change the default. Currently, this cannot be enabled
143 # if you ask for USE_IMP_SYS above.
145 #PERL_MALLOC = 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_OBJECT)" == "define"
211 USE_5005THREADS = undef
216 !IF "$(PERL_MALLOC)" == ""
220 !IF "$(USE_5005THREADS)" == ""
221 USE_5005THREADS = undef
224 !IF "$(USE_5005THREADS)" == "define"
228 !IF "$(USE_IMP_SYS)" == "define"
232 !IF "$(USE_MULTI)" == ""
236 !IF "$(USE_OBJECT)" == ""
240 !IF "$(USE_ITHREADS)" == ""
244 !IF "$(USE_IMP_SYS)" == ""
248 !IF "$(USE_PERLCRT)" == ""
252 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef"
256 !IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef"
258 USE_5005THREADS = undef
261 !IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
262 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
265 !IF "$(USE_IMP_SYS)" != "undef"
266 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
269 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
270 PROCESSOR_ARCHITECTURE = x86
273 !IF "$(USE_OBJECT)" == "define"
274 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
276 !IF "$(USE_5005THREADS)" == "define"
277 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
279 !IF "$(USE_MULTI)" == "define"
280 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
282 !IF "$(USE_PERLIO)" == "define"
283 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
285 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
291 !IF "$(USE_PERLIO)" == "define"
292 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
295 !IF "$(USE_ITHREADS)" == "define"
296 ARCHNAME = $(ARCHNAME)-thread
299 # Visual Studio 98 specific
300 !IF "$(CCTYPE)" == "MSVC60"
302 # VC 6.0 can load the socket dll on demand. Makes the test suite
303 # run in about 10% less time.
304 DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
306 # VC 6.0 seems capable of compiling perl correctly with optimizations
307 # enabled. Anything earlier fails tests.
313 ARCHDIR = ..\lib\$(ARCHNAME)
314 COREDIR = ..\lib\CORE
315 AUTODIR = ..\lib\auto
319 EXTUTILSDIR = $(LIBDIR)\ExtUtils
322 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
323 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
324 INST_LIB = $(INST_TOP)$(INST_VER)\lib
325 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
326 INST_COREDIR = $(INST_ARCHLIB)\CORE
327 INST_POD = $(INST_LIB)\pod
328 INST_HTML = $(INST_POD)\html
331 # Programs to compile, build .lib files and link
336 LIB32 = $(LINK32) -lib
343 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
344 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
345 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
346 LOCDEFS = -DPERLDLL -DPERL_CORE
350 !IF "$(USE_PERLCRT)" != "define"
359 !IF "$(CFG)" == "Debug"
360 ! IF "$(CCTYPE)" == "MSVC20"
361 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
363 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
365 LINK_DBG = -debug -pdb:none
367 ! IF "$(CFG)" == "Optimize"
368 # -O1 yields smaller code, which turns out to be faster than -O2
369 #OPTIMIZE = -O2 -MD -DNDEBUG
370 OPTIMIZE = -O1 -MD -DNDEBUG
372 OPTIMIZE = -Od -MD -DNDEBUG
377 !IF "$(USE_OBJECT)" == "define"
378 OPTIMIZE = $(OPTIMIZE) $(CXX_FLAG)
379 BUILDOPT = $(BUILDOPT) -DPERL_OBJECT
382 !IF "$(USE_PERLCRT)" != "define"
383 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
386 LIBBASEFILES = $(CRYPT_LIB) \
387 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
388 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
389 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
390 version.lib odbc32.lib odbccp32.lib
392 # we add LIBC here, since we may be using PerlCRT.dll
393 LIBFILES = $(LIBBASEFILES) $(LIBC)
395 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
396 $(PCHFLAGS) $(OPTIMIZE)
397 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
398 -libpath:"$(INST_COREDIR)" \
399 -machine:$(PROCESSOR_ARCHITECTURE)
403 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
405 #################### do not edit below this line #######################
406 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
414 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
417 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
423 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
424 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
431 PERLIMPLIB = ..\perl56.lib
432 PERLDLL = ..\perl56.dll
434 MINIPERL = ..\miniperl.exe
436 PERLEXE = ..\perl.exe
437 WPERLEXE = ..\wperl.exe
438 GLOBEXE = ..\perlglob.exe
439 CONFIGPM = ..\lib\Config.pm
440 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
443 PL2BAT = bin\pl2bat.pl
444 GLOBBAT = bin\perlglob.bat
474 CFGSH_TMPL = config.vc
475 CFGH_TMPL = config_H.vc
477 XCOPY = xcopy /f /r /i /d
478 RCOPY = xcopy /f /r /i /e /d
482 DEL = bin\mdelete.bat
485 # filenames given to xsubpp must have forward slashes (since it puts
486 # full pathnames in #line strings)
487 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
520 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
522 !IF "$(PERL_MALLOC)" == "define"
523 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
526 !IF "$(USE_OBJECT)" != "define"
527 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
535 !IF "$(CRYPT_SRC)" != ""
536 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
539 DLL_SRC = $(DYNALOADER).c
585 .\include\sys\socket.h \
588 CORE_H = $(CORE_NOCFG_H) .\config.h
590 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
591 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
592 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
593 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
594 $(MINIDIR)\miniperlmain$(o) \
595 $(MINIDIR)\perlio$(o)
596 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
597 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
598 DLL_OBJ = $(DLL_SRC:.c=.obj)
599 X2P_OBJ = $(X2P_SRC:.c=.obj)
601 PERLDLL_OBJ = $(CORE_OBJ)
602 PERLEXE_OBJ = perlmain$(o)
604 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
605 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
607 !IF "$(USE_SETARGV)" != ""
608 SETARGV_OBJ = setargv$(o)
611 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
612 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
613 Sys/Hostname Storable
614 STATIC_EXT = DynaLoader
617 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
618 SOCKET = $(EXTDIR)\Socket\Socket
619 FCNTL = $(EXTDIR)\Fcntl\Fcntl
620 OPCODE = $(EXTDIR)\Opcode\Opcode
621 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
623 POSIX = $(EXTDIR)\POSIX\POSIX
624 ATTRS = $(EXTDIR)\attrs\attrs
625 THREAD = $(EXTDIR)\Thread\Thread
628 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
629 ERRNO = $(EXTDIR)\Errno\Errno
630 PEEK = $(EXTDIR)\Devel\Peek\Peek
631 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
632 DPROF = $(EXTDIR)\Devel\DProf\DProf
633 GLOB = $(EXTDIR)\File\Glob\Glob
634 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
635 STORABLE = $(EXTDIR)\Storable\Storable
637 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
638 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
639 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
640 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
641 IO_DLL = $(AUTODIR)\IO\IO.dll
642 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
643 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
644 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
645 B_DLL = $(AUTODIR)\B\B.dll
646 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
647 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
648 RE_DLL = $(AUTODIR)\re\re.dll
649 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
650 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
651 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
652 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
653 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
655 ERRNO_PM = $(LIBDIR)\Errno.pm
698 POD2HTML = $(PODDIR)\pod2html
699 POD2MAN = $(PODDIR)\pod2man
700 POD2LATEX = $(PODDIR)\pod2latex
701 POD2TEXT = $(PODDIR)\pod2text
704 "INST_DRV=$(INST_DRV)" \
705 "INST_TOP=$(INST_TOP)" \
706 "INST_VER=$(INST_VER)" \
707 "INST_ARCH=$(INST_ARCH)" \
708 "archname=$(ARCHNAME)" \
711 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
712 "cf_email=$(EMAIL)" \
713 "d_crypt=$(D_CRYPT)" \
714 "d_mymalloc=$(PERL_MALLOC)" \
716 "incpath=$(CCINCDIR:"=\")" \
717 "libperl=$(PERLIMPLIB:..\=)" \
718 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
721 "static_ext=$(STATIC_EXT)" \
722 "dynamic_ext=$(DYNAMIC_EXT)" \
723 "nonxs_ext=$(NONXS_EXT)" \
724 "use5005threads=$(USE_5005THREADS)" \
725 "useithreads=$(USE_ITHREADS)" \
726 "usethreads=$(USE_5005THREADS)" \
727 "usemultiplicity=$(USE_MULTI)" \
728 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
729 "optimize=$(OPTIMIZE:"=\")"
735 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
736 $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
738 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
740 #------------------------------------------------------------
742 $(GLOBEXE) : perlglob$(o)
743 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
744 perlglob$(o) setargv$(o)
746 perlglob$(o) : perlglob.c
748 config.w32 : $(CFGSH_TMPL)
749 copy $(CFGSH_TMPL) config.w32
751 .\config.h : $(CFGH_TMPL)
753 copy $(CFGH_TMPL) config.h
755 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
756 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
758 # this target is for when changes to the main config.sh happen
759 # edit config.{b,v,g}c and make this target once for each supported
760 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
762 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
769 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
770 rename config.h $(CFGH_TMPL)
772 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
776 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
777 $(XCOPY) ..\*.h $(COREDIR)\*.*
778 $(XCOPY) *.h $(COREDIR)\*.*
779 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
780 $(RCOPY) include $(COREDIR)\*.*
781 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
782 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
784 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
785 $(LINK32) -subsystem:console -out:$@ @<<
786 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
790 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
792 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
793 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
795 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
796 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
798 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
799 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
800 !IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
801 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
802 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
805 # 1. we don't want to rebuild miniperl.exe when config.h changes
806 # 2. we don't want to rebuild miniperl.exe with non-default config.h
807 $(MINI_OBJ) : $(CORE_NOCFG_H)
809 $(WIN32_OBJ) : $(CORE_H)
810 $(CORE_OBJ) : $(CORE_H)
811 $(DLL_OBJ) : $(CORE_H)
812 $(X2P_OBJ) : $(CORE_H)
814 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
815 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
816 CCTYPE=$(CCTYPE) > perldll.def
818 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
819 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
820 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
822 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
824 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
826 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
829 ..\x2p\a2p$(o) : ..\x2p\a2p.c
830 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
832 ..\x2p\hash$(o) : ..\x2p\hash.c
833 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
835 ..\x2p\str$(o) : ..\x2p\str.c
836 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
838 ..\x2p\util$(o) : ..\x2p\util.c
839 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
841 ..\x2p\walk$(o) : ..\x2p\walk.c
842 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
844 $(X2P) : $(MINIPERL) $(X2P_OBJ)
845 $(MINIPERL) ..\x2p\find2perl.PL
846 $(MINIPERL) ..\x2p\s2p.PL
847 $(LINK32) -subsystem:console -out:$@ @<<
848 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
851 perlmain.c : runperl.c
852 copy runperl.c perlmain.c
854 perlmain$(o) : perlmain.c
855 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
857 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
858 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
859 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
860 copy $(PERLEXE) $(WPERLEXE)
861 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
863 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
865 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
866 if not exist $(AUTODIR) mkdir $(AUTODIR)
868 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
869 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
871 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
872 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
874 $(XSUBPP) dl_win32.xs > $(*B).c
877 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
878 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
880 $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
881 cd $(EXTDIR)\Data\$(*B)
882 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
886 $(DPROF_DLL): $(PERLEXE) $(DPROF).xs
887 cd $(EXTDIR)\Devel\$(*B)
888 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
892 $(GLOB_DLL): $(PERLEXE) $(GLOB).xs
893 cd $(EXTDIR)\File\$(*B)
894 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
898 $(PEEK_DLL): $(PERLEXE) $(PEEK).xs
899 cd $(EXTDIR)\Devel\$(*B)
900 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
904 $(RE_DLL): $(PERLEXE) $(RE).xs
906 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
910 $(B_DLL): $(PERLEXE) $(B).xs
912 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
916 $(THREAD_DLL): $(PERLEXE) $(THREAD).xs
918 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
922 $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
924 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
928 $(POSIX_DLL): $(PERLEXE) $(POSIX).xs
930 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
934 $(IO_DLL): $(PERLEXE) $(IO).xs
936 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
940 $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
942 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
946 $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
948 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
952 $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
954 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
958 $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
960 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
964 $(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs
965 cd $(EXTDIR)\Sys\$(*B)
966 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
970 $(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
972 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
976 $(STORABLE_DLL): $(PERLEXE) $(STORABLE).xs
978 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
982 $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
984 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
989 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
990 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
991 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
993 utils: $(PERLEXE) $(X2P)
995 $(MAKE) PERL=$(MINIPERL)
997 copy ..\README.amiga .\perlamiga.pod
998 copy ..\README.cygwin .\perlcygwin.pod
999 copy ..\README.dos .\perldos.pod
1000 copy ..\README.hpux .\perlhpux.pod
1001 copy ..\README.machten .\perlmachten.pod
1002 copy ..\README.os2 .\perlos2.pod
1003 copy ..\vms\perlvms.pod .\perlvms.pod
1004 copy ..\README.win32 .\perlwin32.pod
1005 $(MAKE) -f ..\win32\pod.mak converters
1007 $(PERLEXE) lib_pm.PL
1009 $(PERLEXE) $(PL2BAT) $(UTILS)
1012 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1013 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1015 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1016 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1017 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1018 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1019 -del /f $(LIBDIR)\XSLoader.pm
1020 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1021 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1022 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1023 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1024 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1025 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1026 -del /f $(LIBDIR)\File\Glob.pm
1027 -del /f $(LIBDIR)\Storable.pm
1028 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1029 -rmdir /s $(LIBDIR)\IO
1030 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1031 -rmdir /s $(LIBDIR)\Thread
1032 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1033 -rmdir /s $(LIBDIR)\B
1034 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1035 -rmdir /s $(LIBDIR)\Data
1036 -del /f $(PODDIR)\*.html
1037 -del /f $(PODDIR)\*.bat
1039 -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp
1043 -del /f find2perl s2p
1046 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1050 -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
1052 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1053 -rmdir /s $(AUTODIR)
1054 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1055 -rmdir /s $(COREDIR)
1057 install : all installbare installhtml
1060 $(PERLEXE) ..\installperl
1061 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1062 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1063 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1066 $(RCOPY) html\*.* $(INST_HTML)\*.*
1068 inst_lib : $(CONFIGPM)
1069 copy splittree.pl ..
1070 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1071 $(RCOPY) ..\lib $(INST_LIB)\*.*
1073 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1074 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1075 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1079 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1082 test-prep : all utils
1083 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1084 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1085 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1089 $(PERLEXE) -I..\lib harness
1092 test-notty : test-prep
1093 set PERL_SKIP_TTY_TEST=1
1095 $(PERLEXE) -I..\lib harness
1098 test-wide : test-prep
1099 set HARNESS_PERL_SWITCHES=-C
1101 $(PERLEXE) -I..\lib harness
1104 test-wide-notty : test-prep
1105 set PERL_SKIP_TTY_TEST=1
1106 set HARNESS_PERL_SWITCHES=-C
1108 $(PERLEXE) -I..\lib harness
1112 -@$(DEL) miniperlmain$(o)
1113 -@$(DEL) $(MINIPERL)
1114 -@$(DEL) perlglob$(o)
1115 -@$(DEL) perlmain$(o)
1117 -@$(DEL) /f config.h
1120 -@$(DEL) $(WPERLEXE)
1122 -@$(DEL) $(CORE_OBJ)
1123 -if exist $(MINIDIR) deltree /y $(MINIDIR)
1124 -@$(DEL) $(WIN32_OBJ)
1127 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1128 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1129 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1133 # Handy way to run perlbug -ok without having to install and run the
1134 # installed perlbug. We don't re-run the tests here - we trust the user.
1135 # Please *don't* use this unless all tests pass.
1136 # If you want to report test failures, use "nmake nok" instead.
1138 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1141 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1144 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1147 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok