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()
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 # WARNING! This option is deprecated and will eventually go away (enable
78 # USE_ITHREADS instead).
80 # uncomment to enable threads-capabilities. This is incompatible with
81 # USE_ITHREADS, and is only here for people who may have come to rely
82 # on the experimental Thread support that was in 5.005.
84 #USE_5005THREADS = define
87 # uncomment one of the following lines if you are using either
88 # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
94 # uncomment next line if you want debug version of perl (big,slow)
95 # If not enabled, we automatically try to use maximum optimization
96 # with all compilers that are known to have a working optimizer.
101 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
102 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
103 # This currently requires VC 5.0 with Service Pack 3 or later.
104 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
105 # and follow the directions in the package to install.
107 # Not recommended if you have VC 6.x and you're not running Windows 9x.
109 #USE_PERLCRT = define
112 # uncomment to enable linking with setargv.obj under the Visual C
113 # compiler. Setting this options enables perl to expand wildcards in
114 # arguments, but it may be harder to use alternate methods like
115 # File::DosGlob that are more powerful. This option is supported only with
118 #USE_SETARGV = define
121 # if you have the source for des_fcrypt(), uncomment this and make sure the
122 # file exists (see README.win32). File should be located in the same
123 # directory as this file.
125 #CRYPT_SRC = fcrypt.c
128 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
129 # library, uncomment this, and make sure the library exists (see README.win32)
130 # Specify the full pathname of the library.
132 #CRYPT_LIB = fcrypt.lib
135 # set this if you wish to use perl's malloc
136 # WARNING: Turning this on/off WILL break binary compatibility with extensions
137 # you may have compiled with/without it. Be prepared to recompile all
138 # extensions if you change the default. Currently, this cannot be enabled
139 # if you ask for USE_IMP_SYS above.
141 #PERL_MALLOC = define
144 # set the install locations of the compiler include/libraries
145 # Running VCVARS32.BAT is *required* when using Visual C.
146 # Some versions of Visual C don't define MSVCDIR in the environment,
147 # so you may have to set CCHOME explicitly (spaces in the path name should
152 CCINCDIR = $(CCHOME)\include
153 CCLIBDIR = $(CCHOME)\lib
156 # Additional compiler flags can be specified here.
160 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
161 # for old symbols by default, at the expense of extreme pollution. You most
162 # probably just want to build modules that won't compile with
163 # perl Makefile.PL POLLUTE=1
164 # instead of enabling this. Please report such modules to the respective
167 #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
170 # This should normally be disabled. Enabling it will disable the File::Glob
171 # implementation of CORE::glob.
173 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
176 # This should normally be disabled. Enabling it causes perl to read scripts
177 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
178 #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
181 # specify semicolon-separated list of extra directories that modules will
182 # look for libraries (spaces in path names need not be quoted)
187 # set this to your email address (perl will guess a value from
188 # from your loginname and your hostname, which may not be right)
193 ## Build configuration ends.
196 ##################### CHANGE THESE ONLY IF YOU MUST #####################
198 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
202 CRYPT_FLAG = -DHAVE_DES_FCRYPT
205 !IF "$(PERL_MALLOC)" == ""
209 !IF "$(USE_5005THREADS)" == ""
210 USE_5005THREADS = undef
213 !IF "$(USE_5005THREADS)" == "define"
217 !IF "$(USE_IMP_SYS)" == "define"
221 !IF "$(USE_MULTI)" == ""
225 !IF "$(USE_ITHREADS)" == ""
229 !IF "$(USE_IMP_SYS)" == ""
233 !IF "$(USE_PERLIO)" == ""
237 !IF "$(USE_PERLCRT)" == ""
241 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
245 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
247 USE_5005THREADS = undef
250 !IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
251 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
254 !IF "$(USE_IMP_SYS)" != "undef"
255 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
258 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
259 PROCESSOR_ARCHITECTURE = x86
263 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
264 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
267 !IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
275 !IF "$(USE_5005THREADS)" == "define"
276 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
278 !IF "$(USE_MULTI)" == "define"
279 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
281 !IF "$(USE_PERLIO)" == "define"
282 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
284 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
289 !IF "$(USE_PERLIO)" == "define"
290 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
293 !IF "$(USE_ITHREADS)" == "define"
294 ARCHNAME = $(ARCHNAME)-thread
297 # Visual Studio 98 specific
298 !IF "$(CCTYPE)" == "MSVC60"
300 # VC 6.0 can load the socket dll on demand. Makes the test suite
301 # run in about 10% less time.
302 DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
305 ARCHDIR = ..\lib\$(ARCHNAME)
306 COREDIR = ..\lib\CORE
307 AUTODIR = ..\lib\auto
311 EXTUTILSDIR = $(LIBDIR)\ExtUtils
314 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
315 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
316 INST_LIB = $(INST_TOP)$(INST_VER)\lib
317 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
318 INST_COREDIR = $(INST_ARCHLIB)\CORE
319 INST_POD = $(INST_LIB)\pod
320 INST_HTML = $(INST_TOP)$(INST_VER)\html
323 # Programs to compile, build .lib files and link
328 LIB32 = $(LINK32) -lib
335 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
336 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
337 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
338 LOCDEFS = -DPERLDLL -DPERL_CORE
342 !IF "$(USE_PERLCRT)" != "define"
351 !IF "$(CFG)" == "Debug"
352 ! IF "$(CCTYPE)" == "MSVC20"
353 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
355 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
359 OPTIMIZE = -MD -DNDEBUG
361 ! IF "$(WIN64)" == "define"
362 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
363 OPTIMIZE = $(OPTIMIZE) -Ox -GL
364 LINK_DBG = $(LINK_DBG) -ltcg
366 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
367 OPTIMIZE = $(OPTIMIZE) -O1
368 #OPTIMIZE = $(OPTIMIZE) -O2
372 !IF "$(WIN64)" == "define"
373 DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
374 OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
377 !IF "$(USE_PERLCRT)" != "define"
378 BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
381 LIBBASEFILES = $(CRYPT_LIB) \
382 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
383 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
384 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
387 # win64 doesn't have some libs
388 !IF "$(WIN64)" != "define"
389 LIBBASEFILES = $(LIBBASEFILES) 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)
432 # makedef.pl must be updated if this changes, and this should normally
433 # only change when there is an incompatible revision of the public API.
434 PERLIMPLIB = ..\perl58.lib
435 PERLDLL = ..\perl58.dll
437 MINIPERL = ..\miniperl.exe
439 PERLEXE = ..\perl.exe
440 WPERLEXE = ..\wperl.exe
441 GLOBEXE = ..\perlglob.exe
442 CONFIGPM = ..\lib\Config.pm
443 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
446 # Nominate a target which causes extensions to be re-built
447 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
448 # on and really only the interface - i.e. the .def file used to export symbols
450 PERLDEP = perldll.def
452 PL2BAT = bin\pl2bat.pl
453 GLOBBAT = bin\perlglob.bat
481 ..\lib\ExtUtils\xsubpp \
491 !IF "$(WIN64)" == "define"
492 CFGSH_TMPL = config.vc64
493 CFGH_TMPL = config_H.vc64
495 CFGSH_TMPL = config.vc
496 CFGH_TMPL = config_H.vc
499 XCOPY = xcopy /f /r /i /d
500 RCOPY = xcopy /f /r /i /e /d
507 # filenames given to xsubpp must have forward slashes (since it puts
508 # full pathnames in #line strings)
509 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
547 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
549 !IF "$(PERL_MALLOC)" == "define"
550 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
553 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
560 # We need this for miniperl build unless we override canned
561 # config.h #define building mini\*
562 #!IF "$(USE_PERLIO)" == "define"
563 WIN32_SRC = $(WIN32_SRC) .\win32io.c
566 !IF "$(CRYPT_SRC)" != ""
567 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
570 DLL_SRC = $(DYNALOADER).c
616 .\include\sys\socket.h \
619 CORE_H = $(CORE_NOCFG_H) .\config.h
621 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
622 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
623 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
624 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
625 $(MINIDIR)\miniperlmain$(o) \
626 $(MINIDIR)\perlio$(o)
627 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
628 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
629 DLL_OBJ = $(DLL_SRC:.c=.obj)
630 X2P_OBJ = $(X2P_SRC:.c=.obj)
632 PERLDLL_OBJ = $(CORE_OBJ)
633 PERLEXE_OBJ = perlmain$(o)
635 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
636 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
638 !IF "$(USE_SETARGV)" != ""
639 SETARGV_OBJ = setargv$(o)
642 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
643 SOCKET = $(EXTDIR)\Socket\Socket
644 FCNTL = $(EXTDIR)\Fcntl\Fcntl
645 OPCODE = $(EXTDIR)\Opcode\Opcode
646 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
648 POSIX = $(EXTDIR)\POSIX\POSIX
649 ATTRS = $(EXTDIR)\attrs\attrs
650 THREAD = $(EXTDIR)\Thread\Thread
653 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
654 ERRNO = $(EXTDIR)\Errno\Errno
655 PEEK = $(EXTDIR)\Devel\Peek\Peek
656 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
657 DPROF = $(EXTDIR)\Devel\DProf\DProf
658 GLOB = $(EXTDIR)\File\Glob\Glob
659 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
660 STORABLE = $(EXTDIR)\Storable\Storable
661 FILTER = $(EXTDIR)\Filter\Util\Call\Call
662 ENCODE = $(EXTDIR)\Encode\Encode
663 MD5 = $(EXTDIR)\Digest\MD5\MD5
664 PERLIOSCALAR = $(EXTDIR)\PerlIO\Scalar\Scalar
665 MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
666 TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
667 CWD = $(EXTDIR)\Cwd\Cwd
668 LISTUTIL = $(EXTDIR)\List\Util\Util
669 PERLIOVIA = $(EXTDIR)\PerlIO\Via\Via
670 XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
671 UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
673 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
674 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
675 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
676 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
677 IO_DLL = $(AUTODIR)\IO\IO.dll
678 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
679 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
680 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
681 B_DLL = $(AUTODIR)\B\B.dll
682 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
683 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
684 RE_DLL = $(AUTODIR)\re\re.dll
685 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
686 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
687 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
688 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
689 STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
690 FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
691 ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
692 MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
693 PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
694 MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
695 TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
696 CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
697 LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
698 PERLIOVIA_DLL = $(AUTODIR)\PerlIO\Via\Via.dll
699 XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
700 UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
730 $(UNICODENORMALIZE).c
753 $(PERLIOSCALAR_DLL) \
760 $(UNICODENORMALIZE_DLL)
762 POD2HTML = $(PODDIR)\pod2html
763 POD2MAN = $(PODDIR)\pod2man
764 POD2LATEX = $(PODDIR)\pod2latex
765 POD2TEXT = $(PODDIR)\pod2text
768 "INST_DRV=$(INST_DRV)" \
769 "INST_TOP=$(INST_TOP)" \
770 "INST_VER=$(INST_VER)" \
771 "INST_ARCH=$(INST_ARCH)" \
772 "archname=$(ARCHNAME)" \
775 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
776 "cf_email=$(EMAIL)" \
777 "d_crypt=$(D_CRYPT)" \
778 "d_mymalloc=$(PERL_MALLOC)" \
780 "incpath=$(CCINCDIR:"=\")" \
781 "libperl=$(PERLIMPLIB:..\=)" \
782 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
784 "make=$(MAKE_BARE)" \
785 "use5005threads=$(USE_5005THREADS)" \
786 "useithreads=$(USE_ITHREADS)" \
787 "usethreads=$(USE_5005THREADS)" \
788 "usemultiplicity=$(USE_MULTI)" \
789 "useperlio=$(USE_PERLIO)" \
790 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
791 "optimize=$(OPTIMIZE:"=\")"
797 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
799 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
801 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
803 #------------------------------------------------------------
805 $(GLOBEXE) : perlglob$(o)
806 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
807 perlglob$(o) setargv$(o)
809 perlglob$(o) : perlglob.c
811 config.w32 : $(CFGSH_TMPL)
812 copy $(CFGSH_TMPL) config.w32
814 .\config.h : $(CFGH_TMPL)
816 copy $(CFGH_TMPL) config.h
818 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
819 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
821 # this target is for when changes to the main config.sh happen
822 # edit config.{b,v,g}c and make this target once for each supported
823 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
825 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
827 -del /f perl.exe perl*.dll
832 -perl config_h.PL "INST_VER=$(INST_VER)"
833 rename config.h $(CFGH_TMPL)
835 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
839 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
840 $(XCOPY) ..\*.h $(COREDIR)\*.*
841 $(XCOPY) *.h $(COREDIR)\*.*
842 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
843 $(RCOPY) include $(COREDIR)\*.*
844 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
845 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
847 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
848 $(LINK32) -subsystem:console -out:$@ @<<
849 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
853 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
855 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
856 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
858 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
859 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
861 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
862 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
863 !IF "$(USE_IMP_SYS)" == "define"
864 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
865 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
868 # 1. we don't want to rebuild miniperl.exe when config.h changes
869 # 2. we don't want to rebuild miniperl.exe with non-default config.h
870 $(MINI_OBJ) : $(CORE_NOCFG_H)
872 $(WIN32_OBJ) : $(CORE_H)
873 $(CORE_OBJ) : $(CORE_H)
874 $(DLL_OBJ) : $(CORE_H)
875 $(X2P_OBJ) : $(CORE_H)
877 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
878 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
879 CCTYPE=$(CCTYPE) > perldll.def
881 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
882 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
883 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
885 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
887 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
889 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
892 ..\x2p\a2p$(o) : ..\x2p\a2p.c
893 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
895 ..\x2p\hash$(o) : ..\x2p\hash.c
896 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
898 ..\x2p\str$(o) : ..\x2p\str.c
899 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
901 ..\x2p\util$(o) : ..\x2p\util.c
902 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
904 ..\x2p\walk$(o) : ..\x2p\walk.c
905 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
907 $(X2P) : $(MINIPERL) $(X2P_OBJ)
908 $(MINIPERL) ..\x2p\find2perl.PL
909 $(MINIPERL) ..\x2p\s2p.PL
910 $(LINK32) -subsystem:console -out:$@ @<<
911 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
914 perlmain.c : runperl.c
915 copy runperl.c perlmain.c
917 perlmain$(o) : perlmain.c
918 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
920 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
921 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
922 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
923 copy $(PERLEXE) $(WPERLEXE)
924 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
926 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
928 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
929 if not exist $(AUTODIR) mkdir $(AUTODIR)
931 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
932 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
934 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
935 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
937 $(XSUBPP) dl_win32.xs > $(*B).c
940 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
941 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
943 #----------------------------------------------------------------------------------
944 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
945 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
948 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
950 #----------------------------------------------------------------------------------
953 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
954 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
955 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
957 utils: $(PERLEXE) $(X2P)
959 $(MAKE) PERL=$(MINIPERL)
961 copy ..\README.aix .\perlaix.pod
962 copy ..\README.amiga .\perlamiga.pod
963 copy ..\README.apollo .\perlapollo.pod
964 copy ..\README.beos .\perlbeos.pod
965 copy ..\README.bs2000 .\perlbs2000.pod
966 copy ..\README.ce .\perlce.pod
967 copy ..\README.cygwin .\perlcygwin.pod
968 copy ..\README.dgux .\perldgux.pod
969 copy ..\README.dos .\perldos.pod
970 copy ..\README.epoc .\perlepoc.pod
971 copy ..\README.hurd .\perlhurd.pod
972 copy ..\README.hpux .\perlhpux.pod
973 copy ..\README.machten .\perlmachten.pod
974 copy ..\README.macos .\perlmacos.pod
975 copy ..\README.mint .\perlmint.pod
976 copy ..\README.mpeix .\perlmpeix.pod
977 copy ..\README.netware .\perlnetware.pod
978 copy ..\README.os2 .\perlos2.pod
979 copy ..\README.os390 .\perlos390.pod
980 copy ..\README.plan9 .\perlplan9.pod
981 copy ..\README.qnx .\perlqnx.pod
982 copy ..\README.solaris .\perlsolaris.pod
983 copy ..\README.tru64 .\perltru64.pod
984 copy ..\README.uts .\perluts.pod
985 copy ..\README.vmesa .\perlvmesa.pod
986 copy ..\vms\perlvms.pod .\perlvms.pod
987 copy ..\README.vos .\perlvos.pod
988 copy ..\README.win32 .\perlwin32.pod
989 $(MAKE) -f ..\win32\pod.mak converters
993 $(PERLEXE) $(PL2BAT) $(UTILS)
996 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
997 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
999 -del /f $(EXTENSION_DLL)
1000 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1001 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1002 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1003 -del /f $(LIBDIR)\XSLoader.pm
1004 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1005 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1006 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1007 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1008 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1009 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1010 -del /f $(LIBDIR)\File\Glob.pm
1011 -del /f $(LIBDIR)\Storable.pm
1012 -del /f $(LIBDIR)\Filter\Util\Call.pm
1013 -del /f $(LIBDIR)\Digest\MD5.pm
1014 -del /f $(LIBDIR)\PerlIO\Scalar.pm
1015 -del /f $(LIBDIR)\PerlIO\Via.pm
1016 -del /f $(LIBDIR)\MIME\Base64.pm
1017 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1018 -del /f $(LIBDIR)\List\Util.pm
1019 -del /f $(LIBDIR)\Scalar\Util.pm
1020 -del /f $(LIBDIR)\Time\HiRes.pm
1021 -del /f $(LIBDIR)\XS\Typemap.pm
1022 -del /f $(LIBDIR)\Unicode\Normalize.pm
1023 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1024 -rmdir /s $(LIBDIR)\IO
1025 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1026 -rmdir /s $(LIBDIR)\B
1027 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1028 -rmdir /s $(LIBDIR)\Data
1029 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1030 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1031 -rmdir /s $(LIBDIR)\Digest
1032 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1033 -rmdir /s $(LIBDIR)\MIME
1034 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1035 -rmdir /s $(LIBDIR)\List
1036 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1037 -rmdir /s $(LIBDIR)\Scalar
1038 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1039 -rmdir /s $(LIBDIR)\XS
1041 -del /f *.html *.bat checkpods \
1042 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1043 perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1044 perldos.pod perlepoc.pod perlhurd.pod \
1045 perlhpux.pod perlmachten.pod \
1046 perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1047 perlos2.pod perlos390.pod perlplan9.pod perlqnx.pod \
1048 perlsolaris.pod perltru64.pod perluts.pod \
1049 perlvmesa.pod perlvms.pod perlvos.pod \
1050 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1051 podchecker podselect
1053 -del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs perldoc perlivp \
1054 dprofpp perlcc libnetcfg enc2xs piconv
1058 -del /f find2perl s2p psed
1061 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1065 -del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1068 -del /s *.def Makefile Makefile.old
1070 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1071 -rmdir /s $(AUTODIR)
1072 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1073 -rmdir /s $(COREDIR)
1075 install : all installbare installhtml
1078 $(PERLEXE) ..\installperl
1079 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1080 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1081 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1084 $(RCOPY) html\*.* $(INST_HTML)\*.*
1086 inst_lib : $(CONFIGPM)
1087 copy splittree.pl ..
1088 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1089 $(RCOPY) ..\lib $(INST_LIB)\*.*
1091 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1092 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1093 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1097 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1100 test-prep : all utils
1101 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1102 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1103 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1107 $(PERLEXE) -I..\lib harness
1110 test-notty : test-prep
1111 set PERL_SKIP_TTY_TEST=1
1113 $(PERLEXE) -I..\lib harness
1116 test-wide : test-prep
1117 set HARNESS_PERL_SWITCHES=-C
1119 $(PERLEXE) -I..\lib harness
1122 test-wide-notty : test-prep
1123 set PERL_SKIP_TTY_TEST=1
1124 set HARNESS_PERL_SWITCHES=-C
1126 $(PERLEXE) -I..\lib harness
1130 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1131 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1132 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1134 $(PERLEXE) -I..\lib harness
1137 clean : Extensions_clean
1138 -@$(DEL) miniperlmain$(o)
1139 -@$(DEL) $(MINIPERL)
1140 -@$(DEL) perlglob$(o)
1141 -@$(DEL) perlmain$(o)
1146 -@$(DEL) $(WPERLEXE)
1148 -@$(DEL) $(CORE_OBJ)
1149 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1150 -rmdir /s $(MINIDIR)
1151 -@$(DEL) $(WIN32_OBJ)
1154 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1155 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1156 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1160 # Handy way to run perlbug -ok without having to install and run the
1161 # installed perlbug. We don't re-run the tests here - we trust the user.
1162 # Please *don't* use this unless all tests pass.
1163 # If you want to report test failures, use "nmake nok" instead.
1165 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1168 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1171 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1174 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok