2 # Makefile to build perl on Windows NT 64 Bit using Microsoft NMAKE.
4 # Building for Itanium requires the latest SDK, a (currently unsupported)
5 # native Microsoft IA64 Compiler (13.00.9367.7 for IA-64 or higher), and
6 # of course an Itanium box running Windows XP.
8 # 1) Edit INST_TOP and INST_DRV in this Makefile if necessary.
9 # 2) nmake -f Makefile.win64
10 # 3) nmake -f Makefile.win64 test
11 # => Currently lib/posix.t 2 and op/64bitint.t 23, 53-55 will fail
12 # 4) nmake -f Makefile.win64 install
14 # This Configuration eanbles 64 Bit porting warning (/Wp64). Watch out for C4700
15 # warnings when porting addon modules to WIN64, most of them will result in runtime
16 # crashes. Remember that most data types remain unchanged on WIN64. Especially long
17 # is still 32 Bit. Native 64 Bit datatypes are for example __int64 or size_t. If
18 # you really need to add WIN64 specific code use ifdef _WIN64.
20 # randolf.werner@sap.com
23 ## Make sure you read README.win32 *before* you mess with anything here!
25 ## If you want a configuration that is the same as ActivePerl (see
26 ## www.ActiveState.com) make sure you set at least BUILD_FLAVOR below!
30 ## Build configuration. Edit the values below to suit your needs.
34 # Set these to wherever you want "nmake install" to put your newly
35 # built perl. Setting it to a path with spaces is NOT recommended.
38 INST_TOP = $(INST_DRV)\perl64
41 # uncomment one of the following lines if you are using either
42 # Visual C++ 2.x, or Visual C++ 5.x (aka Visual Studio 97) _without_
43 # service pack 3 applied.
45 # If you have 5.x SP3 or later, or 6.x, no change is required.
48 #CCTYPE = MSVC_PRE_50SP3
51 # set the install locations of the compiler include/libraries. Running
52 # VCVARS32.BAT is *required* when using Visual C. Some versions of
53 # Visual C earlier than 5.x SP3 don't define MSVCDIR in the environment.
54 # If such is the case you may have to set CCHOME explicitly. Spaces in
55 # the path name should not be quoted.
57 # If you have run VCVARS32.BAT and have VC 5.x SP3 or later, the defaults
62 CCINCDIR = $(CCHOME)\include
63 CCLIBDIR = $(CCHOME)\lib
66 # if you have the source for des_fcrypt(), uncomment CRYPT_SRC and make sure
67 # the file exists (see README.win32). File should be located in the same
68 # directory as this makefile.
70 # If you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
71 # library, uncomment CRYPT_LIB, and make sure the library exists (see
72 # README.win32). Specify the full pathname of the library.
74 # If you don't enable one of these, the crypt() builtin will fail to work.
75 # (Generally not critical.)
78 #CRYPT_LIB = fcrypt.lib
81 # uncomment this option if you want to bulk-enable all the options that
82 # ActiveState uses to build their ActivePerl distribution. If you set this,
83 # there should be no need to set any of the other options that follow.
85 # If you don't enable this, the defaults below will get you the most
86 # efficient perl configuration possible that will also be compatible
87 # with the build defaults used on Unix platforms. On the other hand,
88 # the ActivePerl configuration will get you fork() emulation at the
89 # cost of some added bloat.
91 #BUILD_FLAVOR = ActivePerl
94 # uncomment next line if you want debug version of perl (big and 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 # Comment this out if you DON'T want your perl installation to be versioned.
102 # This means that the new installation will overwrite any files from the
103 # old installation at the same INST_TOP location. Leaving it enabled is
104 # the safest route, as perl adds the extra version directory to all the
105 # locations it installs files to. If you disable it, an alternative
106 # versioned installation can be obtained by setting INST_TOP above to a
107 # path that includes an arbitrary version string.
112 # Comment this out if you DON'T want your perl installation to have
113 # architecture specific components. This means that architecture-
114 # specific files will be installed along with the architecture-neutral
115 # files. Leaving it enabled is safer and more flexible, in case you
116 # want to build multiple flavors of perl and install them together in
117 # the same location. Commenting it out gives you a simpler
118 # installation that is easier to understand for beginners.
120 INST_ARCH = \$(ARCHNAME)
123 # uncomment to enable multiple interpreters. This is need for fork()
129 # Beginnings of interpreter cloning/threads; still very incomplete.
130 # This should be enabled to get the fork() emulation. This needs
133 #USE_ITHREADS = define
136 # uncomment to enable the implicit "host" layer for all system calls
137 # made by perl. This needs USE_MULTI above. This is also needed to
140 #USE_IMP_SYS = define
143 # WARNING! This option is deprecated and will eventually go away (enable
144 # USE_ITHREADS instead).
146 # uncomment to enable threads-capabilities. This is incompatible with
147 # USE_ITHREADS, and is only here for people who may have come to rely
148 # on the experimental Thread support that was in 5.005.
150 #USE_5005THREADS= define
153 # WARNING! This option is deprecated and will eventually go away (enable
154 # USE_MULTI instead).
156 # uncomment next line if you want to use the PERL_OBJECT build option.
157 # DO NOT ENABLE unless you have legacy code that relies on the C++
158 # CPerlObj class that was available in 5.005. This cannot be enabled
159 # if you ask for USE_5005THREADS or USE_MULTI above.
164 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
165 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
166 # This currently requires VC 5.0 with Service Pack 3 or later.
167 # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
168 # and follow the directions in the package to install.
170 # Not recommended if you have VC 6.x and you're not running Windows 9x.
172 #USE_PERLCRT = define
175 # uncomment to enable linking with setargv.obj under the Visual C
176 # compiler. Setting this option enables perl to expand wildcards in
177 # arguments, but it may be harder to use alternate methods like
178 # File::DosGlob that are more powerful, or use perl inside shells
179 # that do the expansion for you. This option is supported only
182 #USE_SETARGV = define
185 # set this if you wish to use perl's malloc
186 # WARNING: Turning this on/off WILL break binary compatibility with extensions
187 # you may have compiled with/without it. Be prepared to recompile all
188 # extensions if you change the default. Currently, this cannot be enabled
189 # if you ask for USE_IMP_SYS above.
191 #PERL_MALLOC = define
194 # Additional compiler flags can be specified here.
198 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
199 # for old symbols by default, at the expense of extreme pollution. You most
200 # probably just want to build modules that won't compile with
201 # perl Makefile.PL POLLUTE=1
202 # instead of enabling this. Please report such modules to the respective
205 #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
208 # This should normally be disabled. Enabling it will disable the File::Glob
209 # implementation of CORE::glob.
211 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
214 # This should normally be disabled. Enabling it causes perl to read scripts
215 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
216 #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
219 # specify semicolon-separated list of extra directories that modules will
220 # look for libraries (spaces in path names need not be quoted)
225 # set this to your email address (perl will guess a value from
226 # from your loginname and your hostname, which may not be right)
231 ## Build configuration ends.
234 ##################### CHANGE THESE ONLY IF YOU MUST #####################
236 !IF "$(BUILD_FLAVOR)" == "ActivePerl"
240 USE_ITHREADS = define
242 USE_5005THREADS = undef
249 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
253 CRYPT_FLAG = -DHAVE_DES_FCRYPT
256 !IF "$(USE_OBJECT)" == "define"
258 USE_5005THREADS = undef
263 !IF "$(PERL_MALLOC)" == ""
267 !IF "$(USE_5005THREADS)" == ""
268 USE_5005THREADS = undef
271 !IF "$(USE_5005THREADS)" == "define"
275 !IF "$(USE_IMP_SYS)" == "define"
279 !IF "$(CCTYPE)" == ""
283 !IF "$(USE_MULTI)" == ""
287 !IF "$(USE_OBJECT)" == ""
291 !IF "$(USE_ITHREADS)" == ""
295 !IF "$(USE_IMP_SYS)" == ""
299 !IF "$(USE_PERLCRT)" == ""
303 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef"
307 !IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef"
309 USE_5005THREADS = undef
312 !IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
313 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
316 !IF "$(USE_IMP_SYS)" != "undef"
317 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
320 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
321 PROCESSOR_ARCHITECTURE = x86
324 !IF "$(USE_OBJECT)" == "define"
325 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
327 !IF "$(USE_5005THREADS)" == "define"
328 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
330 !IF "$(USE_MULTI)" == "define"
331 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
333 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
338 !IF "$(USE_ITHREADS)" == "define"
339 ARCHNAME = $(ARCHNAME)-thread
342 # Visual Studio 98 specific
343 !IF "$(CCTYPE)" == "MSVC60"
344 # VC 6.0 can load the socket dll on demand. Makes the test suite
345 # run in about 10% less time.
346 DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
350 ARCHDIR = ..\lib\$(ARCHNAME)
351 COREDIR = ..\lib\CORE
352 AUTODIR = ..\lib\auto
356 EXTUTILSDIR = $(LIBDIR)\ExtUtils
359 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
360 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
361 INST_LIB = $(INST_TOP)$(INST_VER)\lib
362 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
363 INST_COREDIR = $(INST_ARCHLIB)\CORE
364 INST_POD = $(INST_LIB)\pod
365 INST_HTML = $(INST_TOP)$(INST_VER)\html
368 # Programs to compile, build .lib files and link
373 LIB32 = $(LINK32) -lib
380 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
381 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
382 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
383 LOCDEFS = -DPERLDLL -DPERL_CORE
387 !IF "$(USE_PERLCRT)" != "define"
396 !IF "$(CFG)" == "Debug"
397 ! IF "$(CCTYPE)" == "MSVC20"
398 OPTIMIZE = -DCONSERVATIVE -Wp64 -Od -Op -MD -Z7 -DDEBUGGING
400 OPTIMIZE = -DCONSERVATIVE -Wp64 -Od -Op -MD -Zi -DDEBUGGING
404 # -O1 yields smaller code, which turns out to be faster than -O2
405 OPTIMIZE = -DCONSERVATIVE -Wp64 -O2 -Op -MD -Zi -DNDEBUG
406 # VC 6.0 seems capable of compiling perl correctly with optimizations
407 # enabled. Anything earlier fails tests.
408 ! IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC_PRE_50SP3"
409 OPTIMIZE = -DCONSERVATIVE -Wp64 -O2 -Op -MD -Zi -DNDEBUG
415 !IF "$(USE_OBJECT)" == "define"
416 OPTIMIZE = $(OPTIMIZE) $(CXX_FLAG)
417 BUILDOPT = $(BUILDOPT) -DPERL_OBJECT
420 !IF "$(USE_PERLCRT)" != "define"
421 BUILDOPT = $(BUILDOPT)
424 LIBBASEFILES = $(CRYPT_LIB) \
425 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
426 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
427 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
428 version.lib odbc32.lib odbccp32.lib
430 # we add LIBC here, since we may be using PerlCRT.dll
431 LIBFILES = $(LIBBASEFILES) $(LIBC)
433 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
434 $(PCHFLAGS) $(OPTIMIZE)
435 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
436 -libpath:"$(INST_COREDIR)" \
437 -machine:$(PROCESSOR_ARCHITECTURE)
441 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
443 #################### do not edit below this line #######################
444 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
452 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
455 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
461 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
462 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
469 PERLIMPLIB = ..\perl56.lib
470 PERLDLL = ..\perl56.dll
472 MINIPERL = ..\miniperl.exe
474 PERLEXE = ..\perl.exe
475 WPERLEXE = ..\wperl.exe
476 GLOBEXE = ..\perlglob.exe
477 CONFIGPM = ..\lib\Config.pm
478 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
481 PL2BAT = bin\pl2bat.pl
482 GLOBBAT = bin\perlglob.bat
512 CFGSH_TMPL = config.win64
513 CFGH_TMPL = config_H.win64
515 XCOPY = xcopy /f /r /i /d
516 RCOPY = xcopy /f /r /i /e /d
521 # filenames given to xsubpp must have forward slashes (since it puts
522 # full pathnames in #line strings)
523 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
556 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
558 !IF "$(PERL_MALLOC)" == "define"
559 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
562 !IF "$(USE_OBJECT)" != "define"
563 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
571 !IF "$(CRYPT_SRC)" != ""
572 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
575 DLL_SRC = $(DYNALOADER).c
621 .\include\sys\socket.h \
624 CORE_H = $(CORE_NOCFG_H) .\config.h
626 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
627 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
628 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
629 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
630 $(MINIDIR)\miniperlmain$(o) \
631 $(MINIDIR)\perlio$(o)
632 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
633 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
634 DLL_OBJ = $(DLL_SRC:.c=.obj)
635 X2P_OBJ = $(X2P_SRC:.c=.obj)
637 PERLDLL_OBJ = $(CORE_OBJ)
638 PERLEXE_OBJ = perlmain$(o)
640 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
641 #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
643 !IF "$(USE_SETARGV)" != ""
644 SETARGV_OBJ = setargv$(o)
647 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
648 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
650 STATIC_EXT = DynaLoader
653 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
654 SOCKET = $(EXTDIR)\Socket\Socket
655 FCNTL = $(EXTDIR)\Fcntl\Fcntl
656 OPCODE = $(EXTDIR)\Opcode\Opcode
657 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
659 POSIX = $(EXTDIR)\POSIX\POSIX
660 ATTRS = $(EXTDIR)\attrs\attrs
661 THREAD = $(EXTDIR)\Thread\Thread
664 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
665 ERRNO = $(EXTDIR)\Errno\Errno
666 PEEK = $(EXTDIR)\Devel\Peek\Peek
667 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
668 DPROF = $(EXTDIR)\Devel\DProf\DProf
669 GLOB = $(EXTDIR)\File\Glob\Glob
670 HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
672 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
673 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
674 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
675 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
676 IO_DLL = $(AUTODIR)\IO\IO.dll
677 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
678 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
679 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
680 B_DLL = $(AUTODIR)\B\B.dll
681 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
682 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
683 RE_DLL = $(AUTODIR)\re\re.dll
684 BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
685 DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
686 GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
687 HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
689 ERRNO_PM = $(LIBDIR)\Errno.pm
730 POD2HTML = $(PODDIR)\pod2html
731 POD2MAN = $(PODDIR)\pod2man
732 POD2LATEX = $(PODDIR)\pod2latex
733 POD2TEXT = $(PODDIR)\pod2text
736 "INST_DRV=$(INST_DRV)" \
737 "INST_TOP=$(INST_TOP)" \
738 "INST_VER=$(INST_VER)" \
739 "INST_ARCH=$(INST_ARCH)" \
740 "archname=$(ARCHNAME)" \
742 "ccflags=-nologo $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
743 "cf_email=$(EMAIL)" \
744 "d_crypt=$(D_CRYPT)" \
745 "d_mymalloc=$(PERL_MALLOC)" \
747 "incpath=$(CCINCDIR:"=\")" \
748 "libperl=$(PERLIMPLIB:..\=)" \
749 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
752 "static_ext=$(STATIC_EXT)" \
753 "dynamic_ext=$(DYNAMIC_EXT)" \
754 "nonxs_ext=$(NONXS_EXT)" \
755 "use5005threads=$(USE_5005THREADS)" \
756 "useithreads=$(USE_ITHREADS)" \
757 "usethreads=$(USE_5005THREADS)" \
758 "usemultiplicity=$(USE_MULTI)" \
759 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
760 "optimize=$(OPTIMIZE:"=\")"
766 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
767 $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
769 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
771 #------------------------------------------------------------
773 $(GLOBEXE) : perlglob$(o)
774 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
775 perlglob$(o) setargv$(o)
777 perlglob$(o) : perlglob.c
779 config.w32 : $(CFGSH_TMPL)
780 copy $(CFGSH_TMPL) config.w32
782 .\config.h : $(CFGH_TMPL)
784 copy $(CFGH_TMPL) config.h
786 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
787 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
789 # this target is for when changes to the main config.sh happen
790 # edit config.{b,v,g}c and make this target once for each supported
791 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
793 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
800 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
801 rename config.h $(CFGH_TMPL)
803 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
804 cd .. && miniperl configpm
805 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
806 $(XCOPY) ..\*.h $(COREDIR)\*.*
807 $(XCOPY) *.h $(COREDIR)\*.*
808 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
809 $(RCOPY) include $(COREDIR)\*.*
810 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
811 || $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
813 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
814 $(LINK32) -subsystem:console -out:$@ @<<
815 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
819 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
821 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
822 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
824 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
825 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
827 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
828 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
829 !IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
830 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
831 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
834 # 1. we don't want to rebuild miniperl.exe when config.h changes
835 # 2. we don't want to rebuild miniperl.exe with non-default config.h
836 $(MINI_OBJ) : $(CORE_NOCFG_H)
838 $(WIN32_OBJ) : $(CORE_H)
839 $(CORE_OBJ) : $(CORE_H)
840 $(DLL_OBJ) : $(CORE_H)
841 $(X2P_OBJ) : $(CORE_H)
843 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
844 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
845 CCTYPE=$(CCTYPE) > perldll.def
847 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
848 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
849 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
851 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
853 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
854 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
856 ..\x2p\a2p$(o) : ..\x2p\a2p.c
857 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
859 ..\x2p\hash$(o) : ..\x2p\hash.c
860 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
862 ..\x2p\str$(o) : ..\x2p\str.c
863 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
865 ..\x2p\util$(o) : ..\x2p\util.c
866 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
868 ..\x2p\walk$(o) : ..\x2p\walk.c
869 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
871 $(X2P) : $(MINIPERL) $(X2P_OBJ)
872 $(MINIPERL) ..\x2p\find2perl.PL
873 $(MINIPERL) ..\x2p\s2p.PL
874 $(LINK32) -subsystem:console -out:$@ @<<
875 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
878 perlmain.c : runperl.c
879 copy runperl.c perlmain.c
881 perlmain$(o) : perlmain.c
882 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
884 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
885 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
886 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
887 copy $(PERLEXE) $(WPERLEXE)
888 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
890 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
892 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
893 if not exist $(AUTODIR) mkdir $(AUTODIR)
895 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
896 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
898 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
899 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
901 $(XSUBPP) dl_win32.xs > $(*B).c
904 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
905 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
907 $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
908 cd $(EXTDIR)\Data\$(*B)
909 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
913 $(DPROF_DLL): $(PERLEXE) $(DPROF).xs
914 cd $(EXTDIR)\Devel\$(*B)
915 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
919 $(GLOB_DLL): $(PERLEXE) $(GLOB).xs
920 cd $(EXTDIR)\File\$(*B)
921 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
925 $(PEEK_DLL): $(PERLEXE) $(PEEK).xs
926 cd $(EXTDIR)\Devel\$(*B)
927 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
931 $(RE_DLL): $(PERLEXE) $(RE).xs
933 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
937 $(B_DLL): $(PERLEXE) $(B).xs
939 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
943 $(THREAD_DLL): $(PERLEXE) $(THREAD).xs
945 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
949 $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
951 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
955 $(POSIX_DLL): $(PERLEXE) $(POSIX).xs
957 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
961 $(IO_DLL): $(PERLEXE) $(IO).xs
963 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
967 $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
969 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
973 $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
975 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
979 $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
981 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
985 $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
987 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
991 $(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs
992 cd $(EXTDIR)\Sys\$(*B)
993 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
997 $(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
999 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1003 $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1005 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1010 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1011 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
1012 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1014 utils: $(PERLEXE) $(X2P)
1016 $(MAKE) PERL=$(MINIPERL)
1018 copy ..\README.aix .\perlaix.pod
1019 copy ..\README.amiga .\perlamiga.pod
1020 copy ..\README.bs2000 .\perlbs2000.pod
1021 copy ..\README.cygwin .\perlcygwin.pod
1022 copy ..\README.dos .\perldos.pod
1023 copy ..\README.epoc .\perlepoc.pod
1024 copy ..\README.hpux .\perlhpux.pod
1025 copy ..\README.mpeix .\perlmpeix.pod
1026 copy ..\README.os2 .\perlos2.pod
1027 copy ..\README.os390 .\perlos390.pod
1028 copy ..\README.solaris .\perlsolaris.pod
1029 copy ..\README.vmesa .\perlvmesa.pod
1030 copy ..\vms\perlvms.pod .\perlvms.pod
1031 copy ..\README.vos .\perlvos.pod
1032 copy ..\README.win32 .\perlwin32.pod
1033 $(MAKE) -f ..\win32\pod.mak converters
1035 $(PERLEXE) $(PL2BAT) $(UTILS)
1038 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1039 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1041 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1042 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1043 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs $(EXTDIR)\DynaLoader\DynaLoader.pm
1044 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1045 -del /f $(LIBDIR)\XSLoader.pm $(EXTDIR)\DynaLoader\XSLoader.pm
1046 -del /f $(LIBDIR)\Devel\.exists $(LIBDIR)\File\.exists $(LIBDIR)\Sys\.exists
1047 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1048 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1049 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1050 -del /f $(LIBDIR)\B.pm $(EXTDIR)\B\defsubs.h $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1051 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1052 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1053 -del /f $(LIBDIR)\File\Glob.pm
1054 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1055 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1056 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1057 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
1059 -del /f *.html *.bat checkpods \
1060 perlaix.pod perlamiga.pod perlbs2000.pod perlcygwin.pod \
1061 perldos.pod perlepoc.pod perlhpux.pod perlmachten.pod \
1062 perlmacos.pod perlmpeix.pod perlos2.pod perlos390.pod \
1063 perlsolaris.pod perlvmesa.pod perlvms.pod perlvos.pod \
1064 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1065 podchecker podselect
1067 -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp \
1068 *.bat perlcc pstruct
1071 -del /f find2perl s2p
1074 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1078 -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
1080 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1081 -if exist $(COREDIR) rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1083 install : all installbare installhtml
1086 $(PERLEXE) ..\installperl
1087 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1088 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1089 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1092 $(RCOPY) html\*.* $(INST_HTML)\*.*
1094 inst_lib : $(CONFIGPM)
1095 copy splittree.pl ..
1096 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1097 $(RCOPY) ..\lib $(INST_LIB)\*.*
1099 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1100 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1101 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1105 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1108 test-prep : all utils
1109 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1110 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1111 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1115 $(PERLEXE) -I..\lib harness
1118 test-notty : test-prep
1119 set PERL_SKIP_TTY_TEST=1
1121 $(PERLEXE) -I..\lib harness
1124 test-wide : test-prep
1125 set HARNESS_PERL_SWITCHES=-C
1127 $(PERLEXE) -I..\lib harness
1130 test-wide-notty : test-prep
1131 set PERL_SKIP_TTY_TEST=1
1132 set HARNESS_PERL_SWITCHES=-C
1134 $(PERLEXE) -I..\lib harness
1138 -@erase miniperlmain$(o)
1140 -@erase perlglob$(o)
1141 -@erase perlmain$(o)
1149 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
1150 -@erase $(WIN32_OBJ)
1153 -@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1154 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1155 -@erase ..\x2p\*.exe ..\x2p\*.bat
1159 # Handy way to run perlbug -ok without having to install and run the
1160 # installed perlbug. We don't re-run the tests here - we trust the user.
1161 # Please *don't* use this unless all tests pass.
1162 # If you want to report test failures, use "nmake nok" instead.
1164 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1167 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1170 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1173 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok