2 # Makefile to build perl on Windows NT using Microsoft NMAKE.
4 # Visual C++ 2.0 through 6.0 (and possibly newer versions)
5 # MS Platform SDK 64-bit compiler and tools **experimental**
7 # This is set up to build a perl.exe that runs off a shared library
8 # (perl59.dll). Also makes individual DLLs for the XS extensions.
12 ## Make sure you read README.win32 *before* you mess with anything here!
16 ## Build configuration. Edit the values below to suit your needs.
20 # Set these to wherever you want "nmake install" to put your
24 INST_TOP = $(INST_DRV)\perl
27 # Comment this out if you DON'T want your perl installation to be versioned.
28 # This means that the new installation will overwrite any files from the
29 # old installation at the same INST_TOP location. Leaving it enabled is
30 # the safest route, as perl adds the extra version directory to all the
31 # locations it installs files to. If you disable it, an alternative
32 # versioned installation can be obtained by setting INST_TOP above to a
33 # path that includes an arbitrary version string.
38 # Comment this out if you DON'T want your perl installation to have
39 # architecture specific components. This means that architecture-
40 # specific files will be installed along with the architecture-neutral
41 # files. Leaving it enabled is safer and more flexible, in case you
42 # want to build multiple flavors of perl and install them together in
43 # the same location. Commenting it out gives you a simpler
44 # installation that is easier to understand for beginners.
46 #INST_ARCH = \$(ARCHNAME)
49 # uncomment to enable multiple interpreters. This is need for fork()
50 # emulation and for thread support.
55 # Beginnings of interpreter cloning/threads; now reasonably complete.
56 # This should be enabled to get the fork() emulation. This needs
62 # uncomment to enable the implicit "host" layer for all system calls
63 # made by perl. This needs USE_MULTI above. This is also needed to
69 # Comment out next assign to disable perl's I/O subsystem and use compiler's
70 # stdio for IO - depending on your compiler vendor and run time library you may
71 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
72 # You will also be unable to take full advantage of perl5.8's support for multiple
73 # encodings and may see lower IO performance. You have been warned.
77 # uncomment one of the following lines if you are using either
78 # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
84 # uncomment next line if you want debug version of perl (big,slow)
85 # If not enabled, we automatically try to use maximum optimization
86 # with all compilers that are known to have a working optimizer.
91 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
92 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
93 # This currently requires VC 5.0 with Service Pack 3 or later.
94 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
95 # and follow the directions in the package to install.
97 # Not recommended if you have VC 6.x and you're not running Windows 9x.
102 # uncomment to enable linking with setargv.obj under the Visual C
103 # compiler. Setting this options enables perl to expand wildcards in
104 # arguments, but it may be harder to use alternate methods like
105 # File::DosGlob that are more powerful. This option is supported only with
108 #USE_SETARGV = define
111 # if you have the source for des_fcrypt(), uncomment this and make sure the
112 # file exists (see README.win32). File should be located in the same
113 # directory as this file.
115 #CRYPT_SRC = fcrypt.c
118 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
119 # library, uncomment this, and make sure the library exists (see README.win32)
120 # Specify the full pathname of the library.
122 #CRYPT_LIB = fcrypt.lib
125 # set this if you wish to use perl's malloc
126 # WARNING: Turning this on/off WILL break binary compatibility with extensions
127 # you may have compiled with/without it. Be prepared to recompile all
128 # extensions if you change the default. Currently, this cannot be enabled
129 # if you ask for USE_IMP_SYS above.
131 #PERL_MALLOC = define
134 # set the install locations of the compiler include/libraries
135 # Running VCVARS32.BAT is *required* when using Visual C.
136 # Some versions of Visual C don't define MSVCDIR in the environment,
137 # so you may have to set CCHOME explicitly (spaces in the path name should
142 CCINCDIR = $(CCHOME)\include
143 CCLIBDIR = $(CCHOME)\lib
146 # Additional compiler flags can be specified here.
150 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
151 # for old symbols by default, at the expense of extreme pollution. You most
152 # probably just want to build modules that won't compile with
153 # perl Makefile.PL POLLUTE=1
154 # instead of enabling this. Please report such modules to the respective
157 #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
160 # This should normally be disabled. Enabling it will disable the File::Glob
161 # implementation of CORE::glob.
163 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
166 # This should normally be disabled. Enabling it causes perl to read scripts
167 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
168 #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
171 # specify semicolon-separated list of extra directories that modules will
172 # look for libraries (spaces in path names need not be quoted)
177 # set this to your email address (perl will guess a value from
178 # from your loginname and your hostname, which may not be right)
183 ## Build configuration ends.
186 ##################### CHANGE THESE ONLY IF YOU MUST #####################
188 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
192 CRYPT_FLAG = -DHAVE_DES_FCRYPT
195 !IF "$(PERL_MALLOC)" == ""
199 !IF "$(USE_IMP_SYS)" == "define"
203 !IF "$(USE_MULTI)" == ""
207 !IF "$(USE_ITHREADS)" == ""
211 !IF "$(USE_IMP_SYS)" == ""
215 !IF "$(USE_PERLIO)" == ""
219 !IF "$(USE_PERLCRT)" == ""
223 !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
227 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
231 !IF "$(USE_MULTI)" != "undef"
232 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
235 !IF "$(USE_IMP_SYS)" != "undef"
236 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
239 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
240 PROCESSOR_ARCHITECTURE = x86
244 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
245 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
248 !IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
256 !IF "$(USE_MULTI)" == "define"
257 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
259 !IF "$(USE_PERLIO)" == "define"
260 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
262 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
266 !IF "$(USE_PERLIO)" == "define"
267 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
270 !IF "$(USE_ITHREADS)" == "define"
271 ARCHNAME = $(ARCHNAME)-thread
274 # Visual Studio 98 specific
275 !IF "$(CCTYPE)" == "MSVC60"
277 # VC 6.0 can load the socket dll on demand. Makes the test suite
278 # run in about 10% less time.
279 DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
282 ARCHDIR = ..\lib\$(ARCHNAME)
283 COREDIR = ..\lib\CORE
284 AUTODIR = ..\lib\auto
288 EXTUTILSDIR = $(LIBDIR)\ExtUtils
291 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
292 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
293 INST_LIB = $(INST_TOP)$(INST_VER)\lib
294 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
295 INST_COREDIR = $(INST_ARCHLIB)\CORE
296 INST_POD = $(INST_LIB)\pod
297 INST_HTML = $(INST_TOP)$(INST_VER)\html
300 # Programs to compile, build .lib files and link
305 LIB32 = $(LINK32) -lib
312 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
313 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
314 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
315 LOCDEFS = -DPERLDLL -DPERL_CORE
319 !IF "$(USE_PERLCRT)" != "define"
328 !IF "$(CFG)" == "Debug"
329 ! IF "$(CCTYPE)" == "MSVC20"
330 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
332 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
336 OPTIMIZE = -MD -DNDEBUG
338 ! IF "$(WIN64)" == "define"
339 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
340 OPTIMIZE = $(OPTIMIZE) -Ox -GL
341 LINK_DBG = $(LINK_DBG) -ltcg
343 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
344 OPTIMIZE = $(OPTIMIZE) -O1
345 #OPTIMIZE = $(OPTIMIZE) -O2
349 !IF "$(WIN64)" == "define"
350 DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
351 OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
354 !IF "$(USE_PERLCRT)" != "define"
355 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
358 LIBBASEFILES = $(CRYPT_LIB) \
359 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
360 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
361 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
364 # win64 doesn't have some libs
365 !IF "$(WIN64)" != "define"
366 LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
369 # we add LIBC here, since we may be using PerlCRT.dll
370 LIBFILES = $(LIBBASEFILES) $(LIBC)
372 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
373 $(PCHFLAGS) $(OPTIMIZE)
374 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
375 -libpath:"$(INST_COREDIR)" \
376 -machine:$(PROCESSOR_ARCHITECTURE)
380 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
382 #################### do not edit below this line #######################
383 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
391 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
394 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
400 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
401 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
409 # makedef.pl must be updated if this changes, and this should normally
410 # only change when there is an incompatible revision of the public API.
411 PERLIMPLIB = ..\perl59.lib
412 PERLDLL = ..\perl59.dll
414 MINIPERL = ..\miniperl.exe
416 PERLEXE = ..\perl.exe
417 WPERLEXE = ..\wperl.exe
418 GLOBEXE = ..\perlglob.exe
419 CONFIGPM = ..\lib\Config.pm
420 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
423 # Nominate a target which causes extensions to be re-built
424 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
425 # on and really only the interface - i.e. the .def file used to export symbols
427 PERLDEP = perldll.def
429 PL2BAT = bin\pl2bat.pl
430 GLOBBAT = bin\perlglob.bat
458 ..\lib\ExtUtils\xsubpp \
468 !IF "$(WIN64)" == "define"
469 CFGSH_TMPL = config.vc64
470 CFGH_TMPL = config_H.vc64
472 CFGSH_TMPL = config.vc
473 CFGH_TMPL = config_H.vc
476 XCOPY = xcopy /f /r /i /d
477 RCOPY = xcopy /f /r /i /e /d
484 # filenames given to xsubpp must have forward slashes (since it puts
485 # full pathnames in #line strings)
486 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
525 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
527 !IF "$(PERL_MALLOC)" == "define"
528 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
531 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
538 # We need this for miniperl build unless we override canned
539 # config.h #define building mini\*
540 #!IF "$(USE_PERLIO)" == "define"
541 WIN32_SRC = $(WIN32_SRC) .\win32io.c
544 !IF "$(CRYPT_SRC)" != ""
545 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
548 DLL_SRC = $(DYNALOADER).c
594 .\include\sys\socket.h \
597 CORE_H = $(CORE_NOCFG_H) .\config.h
599 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
600 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
601 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
602 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
603 $(MINIDIR)\miniperlmain$(o) \
604 $(MINIDIR)\perlio$(o)
605 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
606 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
607 DLL_OBJ = $(DLL_SRC:.c=.obj)
608 X2P_OBJ = $(X2P_SRC:.c=.obj)
610 PERLDLL_OBJ = $(CORE_OBJ)
611 PERLEXE_OBJ = perlmain$(o)
613 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
614 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
616 !IF "$(USE_SETARGV)" != ""
617 SETARGV_OBJ = setargv$(o)
620 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
621 SOCKET = $(EXTDIR)\Socket\Socket
622 FCNTL = $(EXTDIR)\Fcntl\Fcntl
623 OPCODE = $(EXTDIR)\Opcode\Opcode
624 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
626 POSIX = $(EXTDIR)\POSIX\POSIX
627 ATTRS = $(EXTDIR)\attrs\attrs
628 THREAD = $(EXTDIR)\Thread\Thread
631 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
632 ERRNO = $(EXTDIR)\Errno\Errno
633 PEEK = $(EXTDIR)\Devel\Peek\Peek
634 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
635 DPROF = $(EXTDIR)\Devel\DProf\DProf
636 GLOB = $(EXTDIR)\File\Glob\Glob
637 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
638 STORABLE = $(EXTDIR)\Storable\Storable
639 FILTER = $(EXTDIR)\Filter\Util\Call\Call
640 ENCODE = $(EXTDIR)\Encode\Encode
641 MD5 = $(EXTDIR)\Digest\MD5\MD5
642 PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
643 MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
644 TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
645 CWD = $(EXTDIR)\Cwd\Cwd
646 LISTUTIL = $(EXTDIR)\List\Util\Util
647 PERLIOVIA = $(EXTDIR)\PerlIO\via\via
648 XSAPITEST = $(EXTDIR)\XS\APItest\APItest
649 XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
650 UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
652 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
653 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
654 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
655 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
656 IO_DLL = $(AUTODIR)\IO\IO.dll
657 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
658 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
659 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
660 B_DLL = $(AUTODIR)\B\B.dll
661 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
662 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
663 RE_DLL = $(AUTODIR)\re\re.dll
664 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
665 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
666 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
667 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
668 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
669 FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
670 ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
671 MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
672 PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
673 MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
674 TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
675 CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
676 LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
677 PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
678 XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
679 XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
680 UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
711 $(UNICODENORMALIZE).c
734 $(PERLIOSCALAR_DLL) \
742 $(UNICODENORMALIZE_DLL)
744 POD2HTML = $(PODDIR)\pod2html
745 POD2MAN = $(PODDIR)\pod2man
746 POD2LATEX = $(PODDIR)\pod2latex
747 POD2TEXT = $(PODDIR)\pod2text
750 "INST_DRV=$(INST_DRV)" \
751 "INST_TOP=$(INST_TOP)" \
752 "INST_VER=$(INST_VER)" \
753 "INST_ARCH=$(INST_ARCH)" \
754 "archname=$(ARCHNAME)" \
757 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
758 "cf_email=$(EMAIL)" \
759 "d_crypt=$(D_CRYPT)" \
760 "d_mymalloc=$(PERL_MALLOC)" \
762 "incpath=$(CCINCDIR:"=\")" \
763 "libperl=$(PERLIMPLIB:..\=)" \
764 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
766 "make=$(MAKE_BARE)" \
767 "useithreads=$(USE_ITHREADS)" \
768 "usemultiplicity=$(USE_MULTI)" \
769 "useperlio=$(USE_PERLIO)" \
770 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
771 "optimize=$(OPTIMIZE:"=\")"
777 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
779 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
781 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
783 #------------------------------------------------------------
785 $(GLOBEXE) : perlglob$(o)
786 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
787 perlglob$(o) setargv$(o)
789 perlglob$(o) : perlglob.c
791 config.w32 : $(CFGSH_TMPL)
792 copy $(CFGSH_TMPL) config.w32
794 .\config.h : $(CFGH_TMPL)
796 copy $(CFGH_TMPL) config.h
798 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
799 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
801 # this target is for when changes to the main config.sh happen
802 # edit config.{b,v,g}c and make this target once for each supported
803 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
805 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
807 -del /f perl.exe perl*.dll
812 -perl config_h.PL "INST_VER=$(INST_VER)"
813 rename config.h $(CFGH_TMPL)
815 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
819 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
820 $(XCOPY) ..\*.h $(COREDIR)\*.*
821 $(XCOPY) *.h $(COREDIR)\*.*
822 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
823 $(RCOPY) include $(COREDIR)\*.*
824 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
825 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
827 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
828 $(LINK32) -subsystem:console -out:$@ @<<
829 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
833 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
835 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
836 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
838 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
839 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
841 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
842 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
843 !IF "$(USE_IMP_SYS)" == "define"
844 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
845 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
848 # 1. we don't want to rebuild miniperl.exe when config.h changes
849 # 2. we don't want to rebuild miniperl.exe with non-default config.h
850 $(MINI_OBJ) : $(CORE_NOCFG_H)
852 $(WIN32_OBJ) : $(CORE_H)
853 $(CORE_OBJ) : $(CORE_H)
854 $(DLL_OBJ) : $(CORE_H)
855 $(X2P_OBJ) : $(CORE_H)
857 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
858 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
859 CCTYPE=$(CCTYPE) > perldll.def
861 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
862 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
863 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
865 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
867 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
869 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
872 ..\x2p\a2p$(o) : ..\x2p\a2p.c
873 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
875 ..\x2p\hash$(o) : ..\x2p\hash.c
876 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
878 ..\x2p\str$(o) : ..\x2p\str.c
879 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
881 ..\x2p\util$(o) : ..\x2p\util.c
882 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
884 ..\x2p\walk$(o) : ..\x2p\walk.c
885 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
887 $(X2P) : $(MINIPERL) $(X2P_OBJ)
888 $(MINIPERL) ..\x2p\find2perl.PL
889 $(MINIPERL) ..\x2p\s2p.PL
890 $(LINK32) -subsystem:console -out:$@ @<<
891 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
894 perlmain.c : runperl.c
895 copy runperl.c perlmain.c
897 perlmain$(o) : perlmain.c
898 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
900 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
901 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
902 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
903 copy $(PERLEXE) $(WPERLEXE)
904 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
906 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
908 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
909 if not exist $(AUTODIR) mkdir $(AUTODIR)
911 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
912 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
914 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
915 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
917 $(XSUBPP) dl_win32.xs > $(*B).c
920 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
921 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
923 #----------------------------------------------------------------------------------
924 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
925 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
928 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
930 #----------------------------------------------------------------------------------
933 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
934 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
935 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
937 utils: $(PERLEXE) $(X2P)
939 $(MAKE) PERL=$(MINIPERL)
941 copy ..\README.aix .\perlaix.pod
942 copy ..\README.amiga .\perlamiga.pod
943 copy ..\README.apollo .\perlapollo.pod
944 copy ..\README.beos .\perlbeos.pod
945 copy ..\README.bs2000 .\perlbs2000.pod
946 copy ..\README.ce .\perlce.pod
947 copy ..\README.cygwin .\perlcygwin.pod
948 copy ..\README.dgux .\perldgux.pod
949 copy ..\README.dos .\perldos.pod
950 copy ..\README.epoc .\perlepoc.pod
951 copy ..\README.freebsd .\perlfreebsd.pod
952 copy ..\README.hurd .\perlhurd.pod
953 copy ..\README.hpux .\perlhpux.pod
954 copy ..\README.irix .\perlirix.pod
955 copy ..\README.machten .\perlmachten.pod
956 copy ..\README.macos .\perlmacos.pod
957 copy ..\README.mint .\perlmint.pod
958 copy ..\README.mpeix .\perlmpeix.pod
959 copy ..\README.netware .\perlnetware.pod
960 copy ..\README.os2 .\perlos2.pod
961 copy ..\README.os390 .\perlos390.pod
962 copy ..\README.os400 .\perlos400.pod
963 copy ..\README.plan9 .\perlplan9.pod
964 copy ..\README.qnx .\perlqnx.pod
965 copy ..\README.solaris .\perlsolaris.pod
966 copy ..\README.tru64 .\perltru64.pod
967 copy ..\README.uts .\perluts.pod
968 copy ..\README.vmesa .\perlvmesa.pod
969 copy ..\vms\perlvms.pod .\perlvms.pod
970 copy ..\README.vos .\perlvos.pod
971 copy ..\README.win32 .\perlwin32.pod
972 $(MAKE) -f ..\win32\pod.mak converters
976 $(PERLEXE) $(PL2BAT) $(UTILS)
979 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
980 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
982 -del /f $(EXTENSION_DLL)
983 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
984 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
985 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
986 -del /f $(LIBDIR)\XSLoader.pm
987 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
988 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
989 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
990 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
991 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
992 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
993 -del /f $(LIBDIR)\File\Glob.pm
994 -del /f $(LIBDIR)\Storable.pm
995 -del /f $(LIBDIR)\Filter\Util\Call.pm
996 -del /f $(LIBDIR)\Digest\MD5.pm
997 -del /f $(LIBDIR)\PerlIO\scalar.pm
998 -del /f $(LIBDIR)\PerlIO\via.pm
999 -del /f $(LIBDIR)\MIME\Base64.pm
1000 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1001 -del /f $(LIBDIR)\List\Util.pm
1002 -del /f $(LIBDIR)\Scalar\Util.pm
1003 -del /f $(LIBDIR)\Time\HiRes.pm
1004 -del /f $(LIBDIR)\XS\APItest.pm
1005 -del /f $(LIBDIR)\XS\Typemap.pm
1006 -del /f $(LIBDIR)\Unicode\Normalize.pm
1007 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1008 -rmdir /s $(LIBDIR)\IO
1009 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1010 -rmdir /s $(LIBDIR)\B
1011 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1012 -rmdir /s $(LIBDIR)\Data
1013 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1014 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1015 -rmdir /s $(LIBDIR)\Digest
1016 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1017 -rmdir /s $(LIBDIR)\MIME
1018 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1019 -rmdir /s $(LIBDIR)\List
1020 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1021 -rmdir /s $(LIBDIR)\Scalar
1022 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1023 -rmdir /s $(LIBDIR)\XS
1025 -del /f *.html *.bat checkpods \
1026 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1027 perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1028 perldos.pod perlepoc.pod perlfreebsd.pod perlhurd.pod \
1029 perlhpux.pod perlirix.pod perlmachten.pod \
1030 perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1031 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1032 perlqnx.pod perlsolaris.pod perltru64.pod perluts.pod \
1033 perlvmesa.pod perlvms.pod perlvos.pod \
1034 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1035 podchecker podselect
1037 -del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs perldoc perlivp \
1038 dprofpp perlcc libnetcfg enc2xs piconv
1042 -del /f find2perl s2p psed
1045 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1049 -del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1052 -del /s *.def Makefile Makefile.old
1054 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1055 -rmdir /s $(AUTODIR)
1056 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1057 -rmdir /s $(COREDIR)
1059 install : all installbare installhtml
1062 $(PERLEXE) ..\installperl
1063 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1064 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1065 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1068 $(RCOPY) html\*.* $(INST_HTML)\*.*
1070 inst_lib : $(CONFIGPM)
1071 copy splittree.pl ..
1072 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1073 $(RCOPY) ..\lib $(INST_LIB)\*.*
1075 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1076 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1077 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1081 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1084 test-prep : all utils
1085 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1086 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1087 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1091 $(PERLEXE) -I..\lib harness
1094 test-notty : test-prep
1095 set PERL_SKIP_TTY_TEST=1
1097 $(PERLEXE) -I..\lib harness
1100 test-wide : test-prep
1101 set HARNESS_PERL_SWITCHES=-C
1103 $(PERLEXE) -I..\lib harness
1106 test-wide-notty : test-prep
1107 set PERL_SKIP_TTY_TEST=1
1108 set HARNESS_PERL_SWITCHES=-C
1110 $(PERLEXE) -I..\lib harness
1114 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1115 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1116 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1118 $(PERLEXE) -I..\lib harness
1121 clean : Extensions_clean
1122 -@$(DEL) miniperlmain$(o)
1123 -@$(DEL) $(MINIPERL)
1124 -@$(DEL) perlglob$(o)
1125 -@$(DEL) perlmain$(o)
1130 -@$(DEL) $(WPERLEXE)
1132 -@$(DEL) $(CORE_OBJ)
1133 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1134 -rmdir /s $(MINIDIR)
1135 -@$(DEL) $(WIN32_OBJ)
1138 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1139 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1140 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1144 # Handy way to run perlbug -ok without having to install and run the
1145 # installed perlbug. We don't re-run the tests here - we trust the user.
1146 # Please *don't* use this unless all tests pass.
1147 # If you want to report test failures, use "nmake nok" instead.
1149 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1152 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1155 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1158 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok