2 # Makefile to build perl on Windows NT using DMAKE.
4 # Visual C++ 2.0 thro 5.0
6 # Mingw32 with gcc-2.8.1 or egcs-1.0.2 **experimental**
8 # This is set up to build a perl.exe that runs off a shared library
9 # (perl.dll). Also makes individual DLLs for the XS extensions.
13 ## Make sure you read README.win32 *before* you mess with anything here!
17 ## Build configuration. Edit the values below to suit your needs.
21 # Set these to wherever you want "nmake install" to put your
25 INST_TOP *= $(INST_DRV)\perl
28 # Comment this out if you DON'T want your perl installation to be versioned.
29 # This means that the new installation will overwrite any files from the
30 # old installation at the same INST_TOP location. Leaving it enabled is
31 # the safest route, as perl adds the extra version directory to all the
32 # locations it installs files to. If you disable it, an alternative
33 # versioned installation can be obtained by setting INST_TOP above to a
34 # path that includes an arbitrary version string.
39 # uncomment to enable threads-capabilities
41 #USE_THREADS *= define
44 # uncomment to enable multiple interpreters
57 # uncomment next line if you want to use the perl object
58 # Currently, this cannot be enabled if you ask for threads above, or
59 # if you are using GCC or EGCS.
61 #OBJECT *= -DPERL_OBJECT
64 # uncomment next line if you want debug version of perl (big,slow)
69 # uncomment next option if you want to use the VC++ compiler optimization.
70 # This option is only relevant for the Microsoft compiler; we automatically
71 # use maximum optimization with the other compilers (unless you specify a
73 # Warning: This is known to produce incorrect code for compiler versions
74 # earlier than VC++ 98 (Visual Studio 6.0). VC++ 98 generates code that
75 # successfully passes the Perl regression test suite. It hasn't yet been
76 # widely tested with real applications though.
81 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
82 # Highly recommended. It has patches that fix known bugs in MSVCRT.DLL.
83 # This currently requires VC 5.0 with Service Pack 3.
84 # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
85 # and follow the directions in the package to install.
87 #USE_PERLCRT *= define
90 # uncomment to enable linking with setargv.obj under the Visual C
91 # compiler. Setting this options enables perl to expand wildcards in
92 # arguments, but it may be harder to use alternate methods like
93 # File::DosGlob that are more powerful. This option is supported only with
96 #USE_SETARGV *= define
99 # if you have the source for des_fcrypt(), uncomment this and make sure the
100 # file exists (see README.win32). File should be located in the same
101 # directory as this file.
103 #CRYPT_SRC *= fcrypt.c
106 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
107 # library, uncomment this, and make sure the library exists (see README.win32)
108 # Specify the full pathname of the library.
110 #CRYPT_LIB *= fcrypt.lib
113 # set this if you wish to use perl's malloc
114 # WARNING: Turning this on/off WILL break binary compatibility with extensions
115 # you may have compiled with/without it. Be prepared to recompile all
116 # extensions if you change the default. Currently, this cannot be enabled
117 # if you ask for PERL_OBJECT above.
119 #PERL_MALLOC *= define
122 # set the install locations of the compiler include/libraries
123 # Running VCVARS32.BAT is *required* when using Visual C.
124 # Some versions of Visual C don't define MSVCDIR in the environment,
125 # so you may have to set CCHOME explicitly (spaces in the path name should
129 #CCHOME *= $(MSVCDIR)
130 #CCHOME *= D:\packages\mingw32
131 CCINCDIR *= $(CCHOME)\include
132 CCLIBDIR *= $(CCHOME)\lib
135 # additional compiler flags can be specified here.
137 # Adding -DPERL_POLLUTE enables support for old symbols, at the expense of
138 # extreme pollution. You most probably want this if you're compiling modules
139 # from CPAN, or other such serious uses of this experimental perl release.
140 # We don't enable this by default because we want the modules to get fixed
141 # instead of clinging to shortcuts like this one.
143 #BUILDOPT *= -DPERL_POLLUTE
146 # specify semicolon-separated list of extra directories that modules will
147 # look for libraries (spaces in path names need not be quoted)
152 # set this to point to cmd.exe (only needed if you use some
153 # alternate shell that doesn't grok cmd.exe style commands)
155 #SHELL *= g:\winnt\system32\cmd.exe
158 # set this to your email address (perl will guess a value from
159 # from your loginname and your hostname, which may not be right)
164 ## Build configuration ends.
167 ##################### CHANGE THESE ONLY IF YOU MUST #####################
169 .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
173 CRYPT_FLAG = -DHAVE_DES_FCRYPT
176 .IF "$(OBJECT)" != ""
187 .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
189 PROCESSOR_ARCHITECTURE *= x86
191 .IF "$(OBJECT)" != ""
192 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
193 .ELIF "$(USE_THREADS)" == "define"
194 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
196 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
199 ARCHDIR = ..\lib\$(ARCHNAME)
200 COREDIR = ..\lib\CORE
201 AUTODIR = ..\lib\auto
204 # Programs to compile, build .lib files and link
209 .IF "$(CCTYPE)" == "BORLAND"
220 INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
221 #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
222 DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
223 LOCDEFS = -DPERLDLL -DPERL_CORE
228 LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib
230 .IF "$(CFG)" == "Debug"
231 OPTIMIZE = -v $(RUNTIME) -DDEBUGGING
234 OPTIMIZE = -O2 $(RUNTIME)
238 CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
239 $(PCHFLAGS) $(OPTIMIZE)
240 LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
245 .ELIF "$(CCTYPE)" == "GCC"
259 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
260 DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
261 LOCDEFS = -DPERLDLL -DPERL_CORE
266 LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 \
267 -lmingw32 -lgcc -lmoldname $(LIBC) -lkernel32
269 .IF "$(CFG)" == "Debug"
270 OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING
273 OPTIMIZE = -g -O2 $(RUNTIME)
277 CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
278 LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
287 LIB32 = $(LINK32) -lib
294 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
295 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
296 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(BUILDOPT) $(CRYPT_FLAG)
297 LOCDEFS = -DPERLDLL -DPERL_CORE
301 .IF "$(USE_PERLCRT)" == ""
302 .IF "$(CFG)" == "Debug"
303 PERLCRTLIBC = msvcrtd.lib
305 PERLCRTLIBC = msvcrt.lib
308 .IF "$(CFG)" == "Debug"
309 PERLCRTLIBC = PerlCRTD.lib
311 PERLCRTLIBC = PerlCRT.lib
315 .IF "$(RUNTIME)" == "-MD"
316 LIBC = $(PERLCRTLIBC)
321 .IF "$(CFG)" == "Debug"
322 .IF "$(CCTYPE)" == "MSVC20"
323 OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
325 OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
327 LINK_DBG = -debug -pdb:none
329 .IF "$(CFG)" == "Optimize"
330 OPTIMIZE = -O2 $(RUNTIME) -DNDEBUG
332 OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
337 LIBBASEFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
338 winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
339 oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
340 version.lib odbc32.lib odbccp32.lib
342 # we add LIBC here, since we may be using PerlCRT.dll
343 LIBFILES = $(LIBBASEFILES) $(LIBC)
345 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
346 $(PCHFLAGS) $(OPTIMIZE)
347 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
354 .IF "$(OBJECT)" != ""
355 OPTIMIZE += $(CXX_FLAG)
358 CFLAGS_O = $(CFLAGS) $(OBJECT)
360 #################### do not edit below this line #######################
361 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
373 .SUFFIXES : .c $(o) .dll $(a) .exe
376 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
382 .IF "$(CCTYPE)" == "BORLAND"
383 $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
384 $(IMPLIB) $(*B).lib $@
385 .ELIF "$(CCTYPE)" == "GCC"
386 $(LINK32) -o $@ $(LINK_FLAGS) $< $(LIBFILES)
387 $(IMPLIB) -def $(*B).def $(*B).a $@
389 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
390 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
394 INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME)
395 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
396 INST_LIB = $(INST_TOP)$(INST_VER)\lib
397 INST_POD = $(INST_LIB)\pod
398 INST_HTML = $(INST_POD)\html
402 EXTUTILSDIR = $(LIBDIR)\extutils
406 MINIPERL = ..\miniperl.exe
408 PERLEXE = ..\perl.exe
409 GLOBEXE = ..\perlglob.exe
410 CONFIGPM = ..\lib\Config.pm
411 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
414 PL2BAT = bin\pl2bat.pl
415 GLOBBAT = bin\perlglob.bat
442 .IF "$(CCTYPE)" == "BORLAND"
444 CFGSH_TMPL = config.bc
445 CFGH_TMPL = config_H.bc
447 .ELIF "$(CCTYPE)" == "GCC"
449 CFGSH_TMPL = config.gc
450 CFGH_TMPL = config_H.gc
451 .IF "$(OBJECT)" == "-DPERL_OBJECT"
452 PERLIMPLIB = ..\libperlcore$(a)
454 PERLIMPLIB = ..\libperl$(a)
459 CFGSH_TMPL = config.vc
460 CFGH_TMPL = config_H.vc
461 .IF "$(USE_PERLCRT)" == ""
462 PERL95EXE = ..\perl95.exe
467 .IF "$(OBJECT)" == "-DPERL_OBJECT"
468 PERLIMPLIB *= ..\perlcore$(a)
469 PERLDLL = ..\perlcore.dll
470 CAPILIB = $(COREDIR)\perlCAPI$(a)
472 PERLIMPLIB *= ..\perl$(a)
473 PERLDLL = ..\perl.dll
477 XCOPY = xcopy /f /r /i /d
478 RCOPY = xcopy /f /r /i /e /d
482 # filenames given to xsubpp must have forward slashes (since it puts
483 # full pathnames in #line strings)
484 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
516 .IF "$(PERL_MALLOC)" == "define"
517 EXTRACORE_SRC += ..\malloc.c
520 .IF "$(OBJECT)" == ""
521 EXTRACORE_SRC += ..\perlio.c
528 .IF "$(USE_THREADS)" == "define"
529 WIN32_SRC += .\win32thread.c
532 .IF "$(CRYPT_SRC)" != ""
533 WIN32_SRC += .\$(CRYPT_SRC)
541 .IF "$(CRYPT_SRC)" != ""
542 PERL95_SRC += .\$(CRYPT_SRC)
545 DLL_SRC = $(DYNALOADER).c
548 .IF "$(OBJECT)" == ""
597 .\include\sys\socket.h \
600 CORE_H = $(CORE_NOCFG_H) .\config.h
602 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
603 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
604 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
605 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
606 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
607 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
608 PERL95_OBJ = $(PERL95_SRC:db:+$(o))
609 DLL_OBJ = $(DLL_SRC:db:+$(o))
610 X2P_OBJ = $(X2P_SRC:db:+$(o))
612 PERLDLL_OBJ = $(CORE_OBJ)
613 PERLEXE_OBJ = perlmain$(o)
615 .IF "$(OBJECT)" == ""
616 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
618 PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
619 PERL95_OBJ += DynaLoadmt$(o)
622 .IF "$(USE_SETARGV)" != ""
623 SETARGV_OBJ = setargv$(o)
626 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
627 Data/Dumper Devel/Peek
628 STATIC_EXT = DynaLoader
631 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
632 SOCKET = $(EXTDIR)\Socket\Socket
633 FCNTL = $(EXTDIR)\Fcntl\Fcntl
634 OPCODE = $(EXTDIR)\Opcode\Opcode
635 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
637 POSIX = $(EXTDIR)\POSIX\POSIX
638 ATTRS = $(EXTDIR)\attrs\attrs
639 THREAD = $(EXTDIR)\Thread\Thread
642 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
643 ERRNO = $(EXTDIR)\Errno\Errno
644 PEEK = $(EXTDIR)\Devel\Peek\Peek
646 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
647 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
648 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
649 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
650 IO_DLL = $(AUTODIR)\IO\IO.dll
651 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
652 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
653 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
654 B_DLL = $(AUTODIR)\B\B.dll
655 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
656 PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
657 RE_DLL = $(AUTODIR)\re\re.dll
659 ERRNO_PM = $(LIBDIR)\Errno.pm
690 # re.dll doesn't build with PERL_OBJECT yet
691 .IF "$(OBJECT)" == ""
697 POD2HTML = $(PODDIR)\pod2html
698 POD2MAN = $(PODDIR)\pod2man
699 POD2LATEX = $(PODDIR)\pod2latex
700 POD2TEXT = $(PODDIR)\pod2text
703 "INST_DRV=$(INST_DRV)" \
704 "INST_TOP=$(INST_TOP)" \
705 "INST_VER=$(INST_VER)" \
706 "archname=$(ARCHNAME)" \
708 "ccflags=$(OPTIMIZE:s/"/\"/) $(DEFINES) $(OBJECT)" \
709 "cf_email=$(EMAIL)" \
710 "d_crypt=$(D_CRYPT)" \
711 "d_mymalloc=$(PERL_MALLOC)" \
712 "libs=$(LIBFILES:f)" \
713 "incpath=$(CCINCDIR:s/"/\"/)" \
714 "libperl=$(PERLIMPLIB:f)" \
715 "libpth=$(CCLIBDIR:s/"/\"/);$(EXTRALIBDIRS:s/"/\"/)" \
718 "_o=$(o)" "obj_ext=$(o)" \
719 "_a=$(a)" "lib_ext=$(a)" \
720 "static_ext=$(STATIC_EXT)" \
721 "dynamic_ext=$(DYNAMIC_EXT)" \
722 "nonxs_ext=$(NONXS_EXT)" \
723 "usethreads=$(USE_THREADS)" \
724 "usemultiplicity=$(USE_MULTI)" \
725 "LINK_FLAGS=$(LINK_FLAGS:s/"/\"/)" \
726 "optimize=$(OPTIMIZE:s/"/\"/)"
732 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
733 $(CAPILIB) $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
735 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
737 #------------------------------------------------------------
739 $(GLOBEXE) : perlglob$(o)
740 .IF "$(CCTYPE)" == "BORLAND"
741 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
742 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
743 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
744 .ELIF "$(CCTYPE)" == "GCC"
745 $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
747 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
748 perlglob$(o) setargv$(o)
751 perlglob$(o) : perlglob.c
753 config.w32 : $(CFGSH_TMPL)
754 copy $(CFGSH_TMPL) config.w32
756 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
758 copy $(CFGH_TMPL) config.h
760 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
761 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
763 # this target is for when changes to the main config.sh happen
764 # edit config.{b,v,g}c and make this target once for each supported
765 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
767 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
768 -cd .. && del /f perl.exe
769 cd .. && perl configpm
772 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
773 rename config.h $(CFGH_TMPL)
775 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
776 cd .. && miniperl configpm
777 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
778 $(XCOPY) ..\*.h $(COREDIR)\*.*
779 $(XCOPY) *.h $(COREDIR)\*.*
780 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
781 $(RCOPY) include $(COREDIR)\*.*
782 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
783 || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
785 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
786 .IF "$(CCTYPE)" == "BORLAND"
787 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
788 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
789 .ELIF "$(CCTYPE)" == "GCC"
790 $(LINK32) -v -o $@ $(LINK_FLAGS) \
791 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
793 $(LINK32) -subsystem:console -out:$@ \
794 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
798 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
800 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
801 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
803 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
804 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
806 # 1. we don't want to rebuild miniperl.exe when config.h changes
807 # 2. we don't want to rebuild miniperl.exe with non-default config.h
808 $(MINI_OBJ) : $(CORE_NOCFG_H)
810 $(WIN32_OBJ) : $(CORE_H)
811 $(CORE_OBJ) : $(CORE_H)
812 $(DLL_OBJ) : $(CORE_H)
813 $(PERL95_OBJ) : $(CORE_H)
814 $(X2P_OBJ) : $(CORE_H)
816 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym makedef.pl
817 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
818 CCTYPE=$(CCTYPE) > perldll.def
820 $(PERLDLL): perldll.def $(PERLDLL_OBJ)
821 .IF "$(CCTYPE)" == "BORLAND"
822 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
823 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
828 .ELIF "$(CCTYPE)" == "GCC"
829 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
830 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
831 dlltool --output-lib $(PERLIMPLIB) \
834 --base-file perl.base \
835 --output-exp perl.exp
836 $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
837 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
840 $(LINK32) -dll -def:perldll.def -out:$@ \
841 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\))
843 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
845 perl.def : $(MINIPERL) makeperldef.pl
846 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
848 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
849 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
851 ..\x2p\a2p$(o) : ..\x2p\a2p.c
852 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
854 ..\x2p\hash$(o) : ..\x2p\hash.c
855 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
857 ..\x2p\str$(o) : ..\x2p\str.c
858 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
860 ..\x2p\util$(o) : ..\x2p\util.c
861 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
863 ..\x2p\walk$(o) : ..\x2p\walk.c
864 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
866 $(X2P) : $(MINIPERL) $(X2P_OBJ)
867 $(MINIPERL) ..\x2p\find2perl.PL
868 $(MINIPERL) ..\x2p\s2p.PL
869 .IF "$(CCTYPE)" == "BORLAND"
870 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
871 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
872 .ELIF "$(CCTYPE)" == "GCC"
873 $(LINK32) -v -o $@ $(LINK_FLAGS) \
874 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
876 $(LINK32) -subsystem:console -out:$@ \
877 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
880 perlmain.c : runperl.c
881 copy runperl.c perlmain.c
883 perlmain$(o) : perlmain.c
884 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
886 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
887 .IF "$(CCTYPE)" == "BORLAND"
888 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
889 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
891 $(PERLIMPLIB) $(LIBFILES)\n)
892 .ELIF "$(CCTYPE)" == "GCC"
893 $(LINK32) -o $@ $(LINK_FLAGS) \
894 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
896 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
897 $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB)
900 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
902 .IF "$(CCTYPE)" != "BORLAND"
903 .IF "$(CCTYPE)" != "GCC"
904 .IF "$(USE_PERLCRT)" == ""
907 copy runperl.c perl95.c
909 perl95$(o) : perl95.c
910 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
912 win32sckmt$(o) : win32sck.c
913 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
914 $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
916 win32mt$(o) : win32.c
917 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
918 $(OBJOUT_FLAG)win32mt$(o) win32.c
920 DynaLoadmt$(o) : $(DYNALOADER).c
921 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
922 $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
924 $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
925 $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
926 $(LIBBASEFILES) $(PERL95_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) \
933 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
934 if not exist $(AUTODIR) mkdir $(AUTODIR)
935 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
936 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
937 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
938 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
940 .IF "$(OBJECT)" == "-DPERL_OBJECT"
942 perlCAPI.cpp : $(MINIPERL)
943 $(MINIPERL) GenCAPI.pl $(COREDIR)
945 perlCAPI$(o) : perlCAPI.cpp
946 .IF "$(CCTYPE)" == "BORLAND"
947 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
948 .ELIF "$(CCTYPE)" == "GCC"
949 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
951 $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
952 $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
955 $(CAPILIB) : perlCAPI.cpp perlCAPI$(o)
956 .IF "$(CCTYPE)" == "BORLAND"
957 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +perlCAPI$(o)
959 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) perlCAPI$(o)
964 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
965 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
967 $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
968 cd $(EXTDIR)\Data\$(*B) && \
969 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
970 cd $(EXTDIR)\Data\$(*B) && $(MAKE)
972 $(PEEK_DLL): $(PERLEXE) $(PEEK).xs
973 cd $(EXTDIR)\Devel\$(*B) && \
974 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
975 cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
977 $(RE_DLL): $(PERLEXE) $(RE).xs
978 cd $(EXTDIR)\$(*B) && \
979 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
980 cd $(EXTDIR)\$(*B) && $(MAKE)
982 $(B_DLL): $(PERLEXE) $(B).xs
983 cd $(EXTDIR)\$(*B) && \
984 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
985 cd $(EXTDIR)\$(*B) && $(MAKE)
987 $(THREAD_DLL): $(PERLEXE) $(THREAD).xs
988 cd $(EXTDIR)\$(*B) && \
989 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
990 cd $(EXTDIR)\$(*B) && $(MAKE)
992 $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
993 cd $(EXTDIR)\$(*B) && \
994 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
995 cd $(EXTDIR)\$(*B) && $(MAKE)
997 $(POSIX_DLL): $(PERLEXE) $(POSIX).xs
998 cd $(EXTDIR)\$(*B) && \
999 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1000 cd $(EXTDIR)\$(*B) && $(MAKE)
1002 $(IO_DLL): $(PERLEXE) $(IO).xs
1003 cd $(EXTDIR)\$(*B) && \
1004 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1005 cd $(EXTDIR)\$(*B) && $(MAKE)
1007 $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
1008 cd $(EXTDIR)\$(*B) && \
1009 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1010 cd $(EXTDIR)\$(*B) && $(MAKE)
1012 $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
1013 cd $(EXTDIR)\$(*B) && \
1014 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1015 cd $(EXTDIR)\$(*B) && $(MAKE)
1017 $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
1018 cd $(EXTDIR)\$(*B) && \
1019 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1020 cd $(EXTDIR)\$(*B) && $(MAKE)
1022 $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
1023 cd $(EXTDIR)\$(*B) && \
1024 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1025 cd $(EXTDIR)\$(*B) && $(MAKE)
1027 $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1028 cd $(EXTDIR)\$(*B) && \
1029 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1030 cd $(EXTDIR)\$(*B) && $(MAKE)
1033 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1034 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1035 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1037 utils: $(PERLEXE) $(X2P)
1038 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1039 copy ..\README.win32 ..\pod\perlwin32.pod
1040 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1041 $(PERLEXE) $(PL2BAT) $(UTILS)
1044 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
1045 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
1047 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1048 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1049 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1050 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1051 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1052 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1053 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1054 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1055 -del /f $(LIBDIR)\Data\Dumper.pm
1056 -del /f $(LIBDIR)\Devel\Peek.pm
1057 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1058 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1059 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1060 -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
1061 -del /f $(PODDIR)\*.html
1062 -del /f $(PODDIR)\*.bat
1063 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
1065 -cd ..\x2p && del /f find2perl s2p *.bat
1066 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1068 .IF "$(PERL95EXE)" != ""
1072 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
1074 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1075 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1077 install : all installbare installhtml
1080 $(PERLEXE) ..\installperl
1081 .IF "$(PERL95EXE)" != ""
1082 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
1084 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1085 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1088 $(RCOPY) html\*.* $(INST_HTML)\*.*
1090 inst_lib : $(CONFIGPM)
1091 copy splittree.pl ..
1092 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1093 $(RCOPY) ..\lib $(INST_LIB)\*.*
1095 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1096 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1097 .IF "$(CCTYPE)" == "BORLAND"
1098 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1100 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1105 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1107 test-prep : all utils
1108 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1109 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1110 .IF "$(CCTYPE)" == "BORLAND"
1111 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1113 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1117 cd ..\t && $(PERLEXE) -I..\lib harness
1119 test-notty : test-prep
1120 set PERL_SKIP_TTY_TEST=1 && \
1121 cd ..\t && $(PERLEXE) -I.\lib harness
1124 -@erase miniperlmain$(o)
1126 -@erase perlglob$(o)
1127 -@erase perlmain$(o)
1128 -@erase perlCAPI.cpp
1135 -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
1136 -@erase $(WIN32_OBJ)
1139 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp
1140 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1141 -@erase ..\x2p\*.exe ..\x2p\*.bat