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 # (perl58.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()
55 # Beginnings of interpreter cloning/threads; still very incomplete.
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 # uncomment to enable the experimental PerlIO I/O subsystem.
73 # WARNING! This option is deprecated and will eventually go away (enable
74 # USE_ITHREADS instead).
76 # uncomment to enable threads-capabilities. This is incompatible with
77 # USE_ITHREADS, and is only here for people who may have come to rely
78 # on the experimental Thread support that was in 5.005.
80 #USE_5005THREADS = 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)
95 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
96 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
97 # This currently requires VC 5.0 with Service Pack 3 or later.
98 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
99 # and follow the directions in the package to install.
101 # Not recommended if you have VC 6.x and you're not running Windows 9x.
103 #USE_PERLCRT = define
106 # uncomment to enable linking with setargv.obj under the Visual C
107 # compiler. Setting this options enables perl to expand wildcards in
108 # arguments, but it may be harder to use alternate methods like
109 # File::DosGlob that are more powerful. This option is supported only with
112 #USE_SETARGV = define
115 # if you have the source for des_fcrypt(), uncomment this and make sure the
116 # file exists (see README.win32). File should be located in the same
117 # directory as this file.
119 #CRYPT_SRC = fcrypt.c
122 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
123 # library, uncomment this, and make sure the library exists (see README.win32)
124 # Specify the full pathname of the library.
126 #CRYPT_LIB = fcrypt.lib
129 # set this if you wish to use perl's malloc
130 # WARNING: Turning this on/off WILL break binary compatibility with extensions
131 # you may have compiled with/without it. Be prepared to recompile all
132 # extensions if you change the default. Currently, this cannot be enabled
133 # if you ask for USE_IMP_SYS above.
135 #PERL_MALLOC = define
138 # set the install locations of the compiler include/libraries
139 # Running VCVARS32.BAT is *required* when using Visual C.
140 # Some versions of Visual C don't define MSVCDIR in the environment,
141 # so you may have to set CCHOME explicitly (spaces in the path name should
146 CCINCDIR = $(CCHOME)\include
147 CCLIBDIR = $(CCHOME)\lib
150 # Additional compiler flags can be specified here.
154 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
155 # for old symbols by default, at the expense of extreme pollution. You most
156 # probably just want to build modules that won't compile with
157 # perl Makefile.PL POLLUTE=1
158 # instead of enabling this. Please report such modules to the respective
161 #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
164 # This should normally be disabled. Enabling it will disable the File::Glob
165 # implementation of CORE::glob.
167 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
170 # This should normally be disabled. Enabling it causes perl to read scripts
171 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
172 #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
175 # specify semicolon-separated list of extra directories that modules will
176 # look for libraries (spaces in path names need not be quoted)
181 # set this to your email address (perl will guess a value from
182 # from your loginname and your hostname, which may not be right)
187 ## Build configuration ends.
190 ##################### CHANGE THESE ONLY IF YOU MUST #####################
192 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
196 CRYPT_FLAG = -DHAVE_DES_FCRYPT
199 !IF "$(PERL_MALLOC)" == ""
203 !IF "$(USE_5005THREADS)" == ""
204 USE_5005THREADS = undef
207 !IF "$(USE_5005THREADS)" == "define"
211 !IF "$(USE_IMP_SYS)" == "define"
215 !IF "$(USE_MULTI)" == ""
219 !IF "$(USE_ITHREADS)" == ""
223 !IF "$(USE_IMP_SYS)" == ""
227 !IF "$(USE_PERLIO)" == ""
231 !IF "$(USE_PERLCRT)" == ""
235 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
239 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
241 USE_5005THREADS = undef
244 !IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
245 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
248 !IF "$(USE_IMP_SYS)" != "undef"
249 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
252 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
253 PROCESSOR_ARCHITECTURE = x86
257 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
258 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
261 !IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
269 !IF "$(USE_5005THREADS)" == "define"
270 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
272 !IF "$(USE_MULTI)" == "define"
273 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
275 !IF "$(USE_PERLIO)" == "define"
276 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
278 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
283 !IF "$(USE_PERLIO)" == "define"
284 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
287 !IF "$(USE_ITHREADS)" == "define"
288 ARCHNAME = $(ARCHNAME)-thread
291 # Visual Studio 98 specific
292 !IF "$(CCTYPE)" == "MSVC60"
294 # VC 6.0 can load the socket dll on demand. Makes the test suite
295 # run in about 10% less time.
296 DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
299 ARCHDIR = ..\lib\$(ARCHNAME)
300 COREDIR = ..\lib\CORE
301 AUTODIR = ..\lib\auto
305 EXTUTILSDIR = $(LIBDIR)\ExtUtils
308 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
309 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
310 INST_LIB = $(INST_TOP)$(INST_VER)\lib
311 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
312 INST_COREDIR = $(INST_ARCHLIB)\CORE
313 INST_POD = $(INST_LIB)\pod
314 INST_HTML = $(INST_TOP)$(INST_VER)\html
317 # Programs to compile, build .lib files and link
322 LIB32 = $(LINK32) -lib
329 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
330 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
331 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
332 LOCDEFS = -DPERLDLL -DPERL_CORE
336 !IF "$(USE_PERLCRT)" != "define"
345 !IF "$(CFG)" == "Debug"
346 ! IF "$(CCTYPE)" == "MSVC20"
347 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
349 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
353 OPTIMIZE = -MD -DNDEBUG
355 ! IF "$(WIN64)" == "define"
356 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
357 OPTIMIZE = $(OPTIMIZE) -Ox -GL
358 LINK_DBG = $(LINK_DBG) -ltcg
360 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
361 OPTIMIZE = $(OPTIMIZE) -O1
362 #OPTIMIZE = $(OPTIMIZE) -O2
366 !IF "$(WIN64)" == "define"
367 DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
368 OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
371 !IF "$(USE_PERLCRT)" != "define"
372 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
375 LIBBASEFILES = $(CRYPT_LIB) \
376 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
377 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
378 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
381 # win64 doesn't have some libs
382 !IF "$(WIN64)" != "define"
383 LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
386 # we add LIBC here, since we may be using PerlCRT.dll
387 LIBFILES = $(LIBBASEFILES) $(LIBC)
389 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
390 $(PCHFLAGS) $(OPTIMIZE)
391 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
392 -libpath:"$(INST_COREDIR)" \
393 -machine:$(PROCESSOR_ARCHITECTURE)
397 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
399 #################### do not edit below this line #######################
400 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
408 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
411 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
417 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
418 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
426 # makedef.pl must be updated if this changes, and this should normally
427 # only change when there is an incompatible revision of the public API.
428 PERLIMPLIB = ..\perl58.lib
429 PERLDLL = ..\perl58.dll
431 MINIPERL = ..\miniperl.exe
433 PERLEXE = ..\perl.exe
434 WPERLEXE = ..\wperl.exe
435 GLOBEXE = ..\perlglob.exe
436 CONFIGPM = ..\lib\Config.pm
437 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
440 # Nominate a target which causes extensions to be re-built
441 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
442 # on and really only the interface - i.e. the .def file used to export symbols
444 PERLDEP = perldll.def
446 PL2BAT = bin\pl2bat.pl
447 GLOBBAT = bin\perlglob.bat
471 ..\lib\ExtUtils\xsubpp \
481 !IF "$(WIN64)" == "define"
482 CFGSH_TMPL = config.vc64
483 CFGH_TMPL = config_H.vc64
485 CFGSH_TMPL = config.vc
486 CFGH_TMPL = config_H.vc
489 XCOPY = xcopy /f /r /i /d
490 RCOPY = xcopy /f /r /i /e /d
497 # filenames given to xsubpp must have forward slashes (since it puts
498 # full pathnames in #line strings)
499 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
537 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
539 !IF "$(PERL_MALLOC)" == "define"
540 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
543 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
550 !IF "$(USE_PERLIO)" == "define"
551 WIN32_SRC = $(WIN32_SRC) .\win32io.c
554 !IF "$(CRYPT_SRC)" != ""
555 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
558 DLL_SRC = $(DYNALOADER).c
604 .\include\sys\socket.h \
607 CORE_H = $(CORE_NOCFG_H) .\config.h
609 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
610 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
611 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
612 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
613 $(MINIDIR)\miniperlmain$(o) \
614 $(MINIDIR)\perlio$(o)
615 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
616 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
617 DLL_OBJ = $(DLL_SRC:.c=.obj)
618 X2P_OBJ = $(X2P_SRC:.c=.obj)
620 PERLDLL_OBJ = $(CORE_OBJ)
621 PERLEXE_OBJ = perlmain$(o)
623 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
624 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
626 !IF "$(USE_SETARGV)" != ""
627 SETARGV_OBJ = setargv$(o)
630 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
631 SOCKET = $(EXTDIR)\Socket\Socket
632 FCNTL = $(EXTDIR)\Fcntl\Fcntl
633 OPCODE = $(EXTDIR)\Opcode\Opcode
634 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
636 POSIX = $(EXTDIR)\POSIX\POSIX
637 ATTRS = $(EXTDIR)\attrs\attrs
638 THREAD = $(EXTDIR)\Thread\Thread
641 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
642 ERRNO = $(EXTDIR)\Errno\Errno
643 PEEK = $(EXTDIR)\Devel\Peek\Peek
644 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
645 DPROF = $(EXTDIR)\Devel\DProf\DProf
646 GLOB = $(EXTDIR)\File\Glob\Glob
647 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
648 STORABLE = $(EXTDIR)\Storable\Storable
649 FILTER = $(EXTDIR)\Filter\Util\Call\Call
650 ENCODE = $(EXTDIR)\Encode\Encode
651 MD5 = $(EXTDIR)\Digest\MD5\MD5
652 PERLIOSCALAR = $(EXTDIR)\PerlIO\Scalar\Scalar
653 MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
654 TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
655 CWD = $(EXTDIR)\Cwd\Cwd
656 LISTUTIL = $(EXTDIR)\List\Util\Util
657 PERLIOVIA = $(EXTDIR)\PerlIO\Via\Via
658 XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
659 UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
661 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
662 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
663 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
664 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
665 IO_DLL = $(AUTODIR)\IO\IO.dll
666 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
667 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
668 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
669 B_DLL = $(AUTODIR)\B\B.dll
670 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
671 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
672 RE_DLL = $(AUTODIR)\re\re.dll
673 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
674 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
675 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
676 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
677 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
678 FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
679 ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
680 MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
681 PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
682 MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
683 TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
684 CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
685 LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
686 PERLIOVIA_DLL = $(AUTODIR)\PerlIO\Via\Via.dll
687 XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
688 UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
718 $(UNICODENORMALIZE).c
741 $(PERLIOSCALAR_DLL) \
748 $(UNICODENORMALIZE_DLL)
750 POD2HTML = $(PODDIR)\pod2html
751 POD2MAN = $(PODDIR)\pod2man
752 POD2LATEX = $(PODDIR)\pod2latex
753 POD2TEXT = $(PODDIR)\pod2text
756 "INST_DRV=$(INST_DRV)" \
757 "INST_TOP=$(INST_TOP)" \
758 "INST_VER=$(INST_VER)" \
759 "INST_ARCH=$(INST_ARCH)" \
760 "archname=$(ARCHNAME)" \
763 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
764 "cf_email=$(EMAIL)" \
765 "d_crypt=$(D_CRYPT)" \
766 "d_mymalloc=$(PERL_MALLOC)" \
768 "incpath=$(CCINCDIR:"=\")" \
769 "libperl=$(PERLIMPLIB:..\=)" \
770 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
772 "make=$(MAKE_BARE)" \
773 "use5005threads=$(USE_5005THREADS)" \
774 "useithreads=$(USE_ITHREADS)" \
775 "usethreads=$(USE_5005THREADS)" \
776 "usemultiplicity=$(USE_MULTI)" \
777 "useperlio=$(USE_PERLIO)" \
778 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
779 "optimize=$(OPTIMIZE:"=\")"
785 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
787 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
789 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
791 #------------------------------------------------------------
793 $(GLOBEXE) : perlglob$(o)
794 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
795 perlglob$(o) setargv$(o)
797 perlglob$(o) : perlglob.c
799 config.w32 : $(CFGSH_TMPL)
800 copy $(CFGSH_TMPL) config.w32
802 .\config.h : $(CFGH_TMPL)
804 copy $(CFGH_TMPL) config.h
806 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
807 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
809 # this target is for when changes to the main config.sh happen
810 # edit config.{b,v,g}c and make this target once for each supported
811 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
813 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
820 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
821 rename config.h $(CFGH_TMPL)
823 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
827 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
828 $(XCOPY) ..\*.h $(COREDIR)\*.*
829 $(XCOPY) *.h $(COREDIR)\*.*
830 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
831 $(RCOPY) include $(COREDIR)\*.*
832 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
833 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
835 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
836 $(LINK32) -subsystem:console -out:$@ @<<
837 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
841 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
843 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
844 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
846 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
847 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
849 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
850 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
851 !IF "$(USE_IMP_SYS)" == "define"
852 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
853 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
856 # 1. we don't want to rebuild miniperl.exe when config.h changes
857 # 2. we don't want to rebuild miniperl.exe with non-default config.h
858 $(MINI_OBJ) : $(CORE_NOCFG_H)
860 $(WIN32_OBJ) : $(CORE_H)
861 $(CORE_OBJ) : $(CORE_H)
862 $(DLL_OBJ) : $(CORE_H)
863 $(X2P_OBJ) : $(CORE_H)
865 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
866 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
867 CCTYPE=$(CCTYPE) > perldll.def
869 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
870 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
871 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
873 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
875 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
877 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
880 ..\x2p\a2p$(o) : ..\x2p\a2p.c
881 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
883 ..\x2p\hash$(o) : ..\x2p\hash.c
884 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
886 ..\x2p\str$(o) : ..\x2p\str.c
887 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
889 ..\x2p\util$(o) : ..\x2p\util.c
890 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
892 ..\x2p\walk$(o) : ..\x2p\walk.c
893 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
895 $(X2P) : $(MINIPERL) $(X2P_OBJ)
896 $(MINIPERL) ..\x2p\find2perl.PL
897 $(MINIPERL) ..\x2p\s2p.PL
898 $(LINK32) -subsystem:console -out:$@ @<<
899 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
902 perlmain.c : runperl.c
903 copy runperl.c perlmain.c
905 perlmain$(o) : perlmain.c
906 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
908 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
909 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
910 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
911 copy $(PERLEXE) $(WPERLEXE)
912 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
914 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
916 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
917 if not exist $(AUTODIR) mkdir $(AUTODIR)
919 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
920 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
922 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
923 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
925 $(XSUBPP) dl_win32.xs > $(*B).c
928 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
929 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
931 #----------------------------------------------------------------------------------
932 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
933 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
936 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
938 #----------------------------------------------------------------------------------
941 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
942 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
943 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
945 utils: $(PERLEXE) $(X2P)
947 $(MAKE) PERL=$(MINIPERL)
949 copy ..\README.aix .\perlaix.pod
950 copy ..\README.amiga .\perlamiga.pod
951 copy ..\README.apollo .\perlapollo.pod
952 copy ..\README.beos .\perlbeos.pod
953 copy ..\README.bs2000 .\perlbs2000.pod
954 copy ..\README.ce .\perlce.pod
955 copy ..\README.cygwin .\perlcygwin.pod
956 copy ..\README.dgux .\perldgux.pod
957 copy ..\README.dos .\perldos.pod
958 copy ..\README.epoc .\perlepoc.pod
959 copy ..\README.hurd .\perlhurd.pod
960 copy ..\README.hpux .\perlhpux.pod
961 copy ..\README.machten .\perlmachten.pod
962 copy ..\README.macos .\perlmacos.pod
963 copy ..\README.mint .\perlmint.pod
964 copy ..\README.mpeix .\perlmpeix.pod
965 copy ..\README.netware .\perlnetware.pod
966 copy ..\README.os2 .\perlos2.pod
967 copy ..\README.os390 .\perlos390.pod
968 copy ..\README.plan9 .\perlplan9.pod
969 copy ..\README.qnx .\perlqnx.pod
970 copy ..\README.solaris .\perlsolaris.pod
971 copy ..\README.tru64 .\perltru64.pod
972 copy ..\README.uts .\perluts.pod
973 copy ..\README.vmesa .\perlvmesa.pod
974 copy ..\vms\perlvms.pod .\perlvms.pod
975 copy ..\README.vos .\perlvos.pod
976 copy ..\README.win32 .\perlwin32.pod
977 $(MAKE) -f ..\win32\pod.mak converters
981 $(PERLEXE) $(PL2BAT) $(UTILS)
984 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
985 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
987 -del /f $(EXTENSION_DLL)
988 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
989 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
990 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
991 -del /f $(LIBDIR)\XSLoader.pm
992 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
993 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
994 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
995 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
996 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
997 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
998 -del /f $(LIBDIR)\File\Glob.pm
999 -del /f $(LIBDIR)\Storable.pm
1000 -del /f $(LIBDIR)\Filter\Util\Call.pm
1001 -del /f $(LIBDIR)\Digest\MD5.pm
1002 -del /f $(LIBDIR)\PerlIO\Scalar.pm
1003 -del /f $(LIBDIR)\PerlIO\Via.pm
1004 -del /f $(LIBDIR)\MIME\Base64.pm
1005 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1006 -del /f $(LIBDIR)\List\Util.pm
1007 -del /f $(LIBDIR)\Scalar\Util.pm
1008 -del /f $(LIBDIR)\Time\HiRes.pm
1009 -del /f $(LIBDIR)\XS\Typemap.pm
1010 -del /f $(LIBDIR)\Unicode\Normalize.pm
1011 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1012 -rmdir /s $(LIBDIR)\IO
1013 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1014 -rmdir /s $(LIBDIR)\Thread
1015 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1016 -rmdir /s $(LIBDIR)\B
1017 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1018 -rmdir /s $(LIBDIR)\Data
1019 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1020 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1021 -rmdir /s $(LIBDIR)\Digest
1022 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1023 -rmdir /s $(LIBDIR)\MIME
1024 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1025 -rmdir /s $(LIBDIR)\List
1026 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1027 -rmdir /s $(LIBDIR)\Scalar
1028 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1029 -rmdir /s $(LIBDIR)\XS
1031 -del /f *.html *.bat checkpods \
1032 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1033 perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1034 perldos.pod perlepoc.pod perlhurd.pod \
1035 perlhpux.pod perlmachten.pod \
1036 perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1037 perlos2.pod perlos390.pod perlplan9.pod perlqnx.pod \
1038 perlsolaris.pod perltru64.pod perluts.pod \
1039 perlvmesa.pod perlvms.pod perlvos.pod \
1040 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1041 podchecker podselect
1043 -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc perlivp dprofpp
1047 -del /f find2perl s2p
1050 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1054 -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
1056 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1057 -rmdir /s $(AUTODIR)
1058 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1059 -rmdir /s $(COREDIR)
1061 install : all installbare installhtml
1064 $(PERLEXE) ..\installperl
1065 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1066 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1067 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1070 $(RCOPY) html\*.* $(INST_HTML)\*.*
1072 inst_lib : $(CONFIGPM)
1073 copy splittree.pl ..
1074 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1075 $(RCOPY) ..\lib $(INST_LIB)\*.*
1077 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1078 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1079 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1083 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1086 test-prep : all utils
1087 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1088 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1089 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1093 $(PERLEXE) -I..\lib harness
1096 test-notty : test-prep
1097 set PERL_SKIP_TTY_TEST=1
1099 $(PERLEXE) -I..\lib harness
1102 test-wide : test-prep
1103 set HARNESS_PERL_SWITCHES=-C
1105 $(PERLEXE) -I..\lib harness
1108 test-wide-notty : test-prep
1109 set PERL_SKIP_TTY_TEST=1
1110 set HARNESS_PERL_SWITCHES=-C
1112 $(PERLEXE) -I..\lib harness
1116 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1117 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1118 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1120 $(PERLEXE) -I..\lib harness
1123 clean : Extensions_clean
1124 -@$(DEL) miniperlmain$(o)
1125 -@$(DEL) $(MINIPERL)
1126 -@$(DEL) perlglob$(o)
1127 -@$(DEL) perlmain$(o)
1132 -@$(DEL) $(WPERLEXE)
1134 -@$(DEL) $(CORE_OBJ)
1135 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1136 -rmdir /s $(MINIDIR)
1137 -@$(DEL) $(WIN32_OBJ)
1140 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1141 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1142 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1146 # Handy way to run perlbug -ok without having to install and run the
1147 # installed perlbug. We don't re-run the tests here - we trust the user.
1148 # Please *don't* use this unless all tests pass.
1149 # If you want to report test failures, use "nmake nok" instead.
1151 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1154 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1157 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1160 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok