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 ## Build configuration. Edit the values below to suit your needs.
17 # Set these to wherever you want "nmake install" to put your
21 INST_TOP *= $(INST_DRV)\perl
24 # Comment this out if you DON'T want your perl installation to be versioned.
25 # This means that the new installation will overwrite any files from the
26 # old installation at the same INST_TOP location. Leaving it enabled is
27 # the safest route, as perl adds the extra version directory to all the
28 # locations it installs files to. If you disable it, an alternative
29 # versioned installation can be obtained by setting INST_TOP above to a
30 # path that includes an arbitrary version string.
35 # uncomment to enable threads-capabilities
37 #USE_THREADS *= define
40 # uncomment to enable multiple interpreters
53 # uncomment next line if you want to use the perl object
54 # Currently, this cannot be enabled if you ask for threads above, or
55 # if you are using GCC or EGCS.
57 #OBJECT *= -DPERL_OBJECT
60 # uncomment next line if you want debug version of perl (big,slow)
65 # uncomment next option if you want to use the VC++ compiler optimization.
66 # This option is only relevant for the Microsoft compiler; we automatically
67 # use maximum optimization with the other compilers (unless you specify a
69 # Warning: This is known to produce incorrect code for compiler versions
70 # earlier than VC++ 98 (Visual Studio 6.0). VC++ 98 generates code that
71 # successfully passes the Perl regression test suite. It hasn't yet been
72 # widely tested with real applications though.
77 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
78 # Highly recommended. It has patches that fix known bugs in MSVCRT.DLL.
79 # This currently requires VC 5.0 with Service Pack 3.
80 # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
81 # and follow the directions in the package to install.
83 #USE_PERLCRT *= define
86 # uncomment to enable linking with setargv.obj under the Visual C
87 # compiler. Setting this options enables perl to expand wildcards in
88 # arguments, but it may be harder to use alternate methods like
89 # File::DosGlob that are more powerful. This option is supported only with
92 #USE_SETARGV *= define
95 # if you have the source for des_fcrypt(), uncomment this and make sure the
96 # file exists (see README.win32). File should be located in the same
97 # directory as this file.
99 #CRYPT_SRC *= fcrypt.c
102 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
103 # library, uncomment this, and make sure the library exists (see README.win32)
104 # Specify the full pathname of the library.
106 #CRYPT_LIB *= fcrypt.lib
109 # set this if you wish to use perl's malloc
110 # WARNING: Turning this on/off WILL break binary compatibility with extensions
111 # you may have compiled with/without it. Be prepared to recompile all
112 # extensions if you change the default. Currently, this cannot be enabled
113 # if you ask for PERL_OBJECT above.
115 #PERL_MALLOC *= define
118 # set the install locations of the compiler include/libraries
119 # Some versions of Visual C don't define MSVCDIR in the environment,
120 # so you may have to set CCHOME explicitly.
123 #CCHOME *= $(MSVCDIR)
124 #CCHOME *= D:\packages\mingw32
125 CCINCDIR *= $(CCHOME)\include
126 CCLIBDIR *= $(CCHOME)\lib
129 # specify space-separated list of extra directories to look for libraries
134 # set this to point to cmd.exe (only needed if you use some
135 # alternate shell that doesn't grok cmd.exe style commands)
137 #SHELL *= g:\winnt\system32\cmd.exe
140 # set this to your email address (perl will guess a value from
141 # from your loginname and your hostname, which may not be right)
146 ## Build configuration ends.
149 ##################### CHANGE THESE ONLY IF YOU MUST #####################
151 .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
155 CRYPT_FLAG = -DHAVE_DES_FCRYPT
158 .IF "$(OBJECT)" != ""
169 #BUILDOPT *= -DPERL_GLOBAL_STRUCT
170 # -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
172 .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
174 PROCESSOR_ARCHITECTURE *= x86
176 .IF "$(OBJECT)" != ""
177 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
178 .ELIF "$(USE_THREADS)" == "define"
179 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
181 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
184 ARCHDIR = ..\lib\$(ARCHNAME)
185 COREDIR = ..\lib\CORE
186 AUTODIR = ..\lib\auto
189 # Programs to compile, build .lib files and link
194 .IF "$(CCTYPE)" == "BORLAND"
205 INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I$(CCINCDIR)
206 #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
207 DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
208 LOCDEFS = -DPERLDLL -DPERL_CORE
213 LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib
215 .IF "$(CFG)" == "Debug"
216 OPTIMIZE = -v $(RUNTIME) -DDEBUGGING
219 OPTIMIZE = -O2 $(RUNTIME)
223 CFLAGS = -w -g0 -a4 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
224 $(PCHFLAGS) $(OPTIMIZE)
225 LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
230 .ELIF "$(CCTYPE)" == "GCC"
244 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
245 DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
246 LOCDEFS = -DPERLDLL -DPERL_CORE
251 LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 \
252 -lmingw32 -lgcc -lmoldname $(LIBC) -lkernel32
254 .IF "$(CFG)" == "Debug"
255 OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING
258 OPTIMIZE = -g -O2 $(RUNTIME)
262 CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
263 LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
272 LIB32 = $(LINK32) -lib
279 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
280 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
281 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(BUILDOPT) $(CRYPT_FLAG)
282 LOCDEFS = -DPERLDLL -DPERL_CORE
286 .IF "$(USE_PERLCRT)" == ""
287 .IF "$(CFG)" == "Debug"
288 PERLCRTLIBC = msvcrtd.lib
290 PERLCRTLIBC = msvcrt.lib
293 .IF "$(CFG)" == "Debug"
294 PERLCRTLIBC = PerlCRTD.lib
296 PERLCRTLIBC = PerlCRT.lib
300 .IF "$(RUNTIME)" == "-MD"
301 LIBC = $(PERLCRTLIBC)
306 .IF "$(CFG)" == "Debug"
307 .IF "$(CCTYPE)" == "MSVC20"
308 OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
310 OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
312 LINK_DBG = -debug -pdb:none
314 .IF "$(CFG)" == "Optimize"
315 OPTIMIZE = -O2 $(RUNTIME) -DNDEBUG
317 OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
322 LIBBASEFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
323 winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
324 oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
325 version.lib odbc32.lib odbccp32.lib
327 # we add LIBC here, since we may be using PerlCRT.dll
328 LIBFILES = $(LIBBASEFILES) $(LIBC)
330 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
331 $(PCHFLAGS) $(OPTIMIZE)
332 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
339 .IF "$(OBJECT)" != ""
340 OPTIMIZE += $(CXX_FLAG)
343 CFLAGS_O = $(CFLAGS) $(OBJECT)
345 #################### do not edit below this line #######################
346 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
358 .SUFFIXES : .c $(o) .dll $(a) .exe
361 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
367 .IF "$(CCTYPE)" == "BORLAND"
368 $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
369 $(IMPLIB) $(*B).lib $@
370 .ELIF "$(CCTYPE)" == "GCC"
371 $(LINK32) -o $@ $(LINK_FLAGS) $< $(LIBFILES)
372 $(IMPLIB) -def $(*B).def $(*B).a $@
374 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
375 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
379 INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME)
380 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
381 INST_LIB = $(INST_TOP)$(INST_VER)\lib
382 INST_POD = $(INST_LIB)\pod
383 INST_HTML = $(INST_POD)\html
387 EXTUTILSDIR = $(LIBDIR)\extutils
391 MINIPERL = ..\miniperl.exe
393 PERLEXE = ..\perl.exe
394 GLOBEXE = ..\perlglob.exe
395 CONFIGPM = ..\lib\Config.pm
396 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
399 PL2BAT = bin\pl2bat.pl
400 GLOBBAT = bin\perlglob.bat
424 .IF "$(CCTYPE)" == "BORLAND"
426 CFGSH_TMPL = config.bc
427 CFGH_TMPL = config_H.bc
429 .ELIF "$(CCTYPE)" == "GCC"
431 CFGSH_TMPL = config.gc
432 CFGH_TMPL = config_H.gc
433 .IF "$(OBJECT)" == "-DPERL_OBJECT"
434 PERLIMPLIB = ..\libperlcore$(a)
436 PERLIMPLIB = ..\libperl$(a)
441 CFGSH_TMPL = config.vc
442 CFGH_TMPL = config_H.vc
443 .IF "$(USE_PERLCRT)" == ""
444 PERL95EXE = ..\perl95.exe
449 .IF "$(OBJECT)" == "-DPERL_OBJECT"
450 PERLIMPLIB *= ..\perlcore$(a)
451 PERLDLL = ..\perlcore.dll
452 CAPILIB = $(COREDIR)\perlCAPI$(a)
454 PERLIMPLIB *= ..\perl$(a)
455 PERLDLL = ..\perl.dll
459 XCOPY = xcopy /f /r /i /d
460 RCOPY = xcopy /f /r /i /e /d
464 # filenames given to xsubpp must have forward slashes (since it puts
465 # full pathnames in #line strings)
466 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
498 .IF "$(PERL_MALLOC)" == "define"
499 EXTRACORE_SRC += ..\malloc.c
502 .IF "$(OBJECT)" == ""
503 EXTRACORE_SRC += ..\perlio.c
510 .IF "$(USE_THREADS)" == "define"
511 WIN32_SRC += .\win32thread.c
514 .IF "$(CRYPT_SRC)" != ""
515 WIN32_SRC += .\$(CRYPT_SRC)
523 .IF "$(CRYPT_SRC)" != ""
524 PERL95_SRC += .\$(CRYPT_SRC)
527 DLL_SRC = $(DYNALOADER).c
530 .IF "$(OBJECT)" == ""
579 .\include\sys\socket.h \
582 CORE_H = $(CORE_NOCFG_H) .\config.h
584 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
585 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
586 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
587 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
588 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
589 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
590 PERL95_OBJ = $(PERL95_SRC:db:+$(o))
591 DLL_OBJ = $(DLL_SRC:db:+$(o))
592 X2P_OBJ = $(X2P_SRC:db:+$(o))
594 PERLDLL_OBJ = $(CORE_OBJ)
595 PERLEXE_OBJ = perlmain$(o)
597 .IF "$(OBJECT)" == ""
598 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
600 PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
601 PERL95_OBJ += DynaLoadmt$(o)
604 .IF "$(USE_SETARGV)" != ""
605 SETARGV_OBJ = setargv$(o)
608 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
610 STATIC_EXT = DynaLoader
613 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
614 SOCKET = $(EXTDIR)\Socket\Socket
615 FCNTL = $(EXTDIR)\Fcntl\Fcntl
616 OPCODE = $(EXTDIR)\Opcode\Opcode
617 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
619 POSIX = $(EXTDIR)\POSIX\POSIX
620 ATTRS = $(EXTDIR)\attrs\attrs
621 THREAD = $(EXTDIR)\Thread\Thread
624 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
625 ERRNO = $(EXTDIR)\Errno\Errno
627 SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
628 FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
629 OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
630 SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
631 IO_DLL = $(AUTODIR)\IO\IO.dll
632 POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
633 ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
634 THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
635 B_DLL = $(AUTODIR)\B\B.dll
636 DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
637 RE_DLL = $(AUTODIR)\re\re.dll
639 ERRNO_PM = $(LIBDIR)\Errno.pm
668 # re.dll doesn't build with PERL_OBJECT yet
669 .IF "$(OBJECT)" == ""
675 POD2HTML = $(PODDIR)\pod2html
676 POD2MAN = $(PODDIR)\pod2man
677 POD2LATEX = $(PODDIR)\pod2latex
678 POD2TEXT = $(PODDIR)\pod2text
681 "INST_DRV=$(INST_DRV)" \
682 "INST_TOP=$(INST_TOP)" \
683 "INST_VER=$(INST_VER)" \
684 "archname=$(ARCHNAME)" \
686 "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \
687 "cf_email=$(EMAIL)" \
688 "d_crypt=$(D_CRYPT)" \
689 "d_mymalloc=$(PERL_MALLOC)" \
690 "libs=$(LIBFILES:f)" \
691 "incpath=$(CCINCDIR)" \
692 "libperl=$(PERLIMPLIB:f)" \
693 "libpth=$(strip $(CCLIBDIR) $(EXTRALIBDIRS) $(LIBFILES:d))" \
696 "_o=$(o)" "obj_ext=$(o)" \
697 "_a=$(a)" "lib_ext=$(a)" \
698 "static_ext=$(STATIC_EXT)" \
699 "dynamic_ext=$(DYNAMIC_EXT)" \
700 "nonxs_ext=$(NONXS_EXT)" \
701 "usethreads=$(USE_THREADS)" \
702 "usemultiplicity=$(USE_MULTI)" \
703 "LINK_FLAGS=$(LINK_FLAGS)" \
704 "optimize=$(OPTIMIZE)"
710 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
711 $(CAPILIB) $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
713 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
715 #------------------------------------------------------------
717 $(GLOBEXE) : perlglob$(o)
718 .IF "$(CCTYPE)" == "BORLAND"
719 $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c
720 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
721 $(CCLIBDIR)\32BIT\wildargs$(o),$@,,import32.lib cw32mt.lib,
722 .ELIF "$(CCTYPE)" == "GCC"
723 $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
725 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
726 perlglob$(o) setargv$(o)
729 perlglob$(o) : perlglob.c
731 config.w32 : $(CFGSH_TMPL)
732 copy $(CFGSH_TMPL) config.w32
734 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
736 copy $(CFGH_TMPL) config.h
738 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
739 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
741 # this target is for when changes to the main config.sh happen
742 # edit config.{b,v,g}c and make this target once for each supported
743 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
745 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
746 -cd .. && del /f perl.exe
747 cd .. && perl configpm
750 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
751 rename config.h $(CFGH_TMPL)
753 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
754 cd .. && miniperl configpm
755 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
756 $(XCOPY) ..\*.h $(COREDIR)\*.*
757 $(XCOPY) *.h $(COREDIR)\*.*
758 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
759 $(RCOPY) include $(COREDIR)\*.*
760 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
761 || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
763 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
764 .IF "$(CCTYPE)" == "BORLAND"
765 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
766 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
767 .ELIF "$(CCTYPE)" == "GCC"
768 $(LINK32) -v -o $@ $(LINK_FLAGS) \
769 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
771 $(LINK32) -subsystem:console -out:$@ \
772 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
776 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
778 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
779 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
781 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
782 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
784 # 1. we don't want to rebuild miniperl.exe when config.h changes
785 # 2. we don't want to rebuild miniperl.exe with non-default config.h
786 $(MINI_OBJ) : $(CORE_NOCFG_H)
788 $(WIN32_OBJ) : $(CORE_H)
789 $(CORE_OBJ) : $(CORE_H)
790 $(DLL_OBJ) : $(CORE_H)
791 $(PERL95_OBJ) : $(CORE_H)
792 $(X2P_OBJ) : $(CORE_H)
794 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
795 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
796 CCTYPE=$(CCTYPE) > perldll.def
798 $(PERLDLL): perldll.def $(PERLDLL_OBJ)
799 .IF "$(CCTYPE)" == "BORLAND"
800 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
801 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
806 .ELIF "$(CCTYPE)" == "GCC"
807 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
808 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
809 dlltool --output-lib $(PERLIMPLIB) \
812 --base-file perl.base \
813 --output-exp perl.exp
814 $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
815 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
818 $(LINK32) -dll -def:perldll.def -out:$@ \
819 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\))
821 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
823 perl.def : $(MINIPERL) makeperldef.pl
824 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
826 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
827 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
829 ..\x2p\a2p$(o) : ..\x2p\a2p.c
830 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
832 ..\x2p\hash$(o) : ..\x2p\hash.c
833 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
835 ..\x2p\str$(o) : ..\x2p\str.c
836 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
838 ..\x2p\util$(o) : ..\x2p\util.c
839 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
841 ..\x2p\walk$(o) : ..\x2p\walk.c
842 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
844 $(X2P) : $(MINIPERL) $(X2P_OBJ)
845 $(MINIPERL) ..\x2p\find2perl.PL
846 $(MINIPERL) ..\x2p\s2p.PL
847 .IF "$(CCTYPE)" == "BORLAND"
848 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
849 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
850 .ELIF "$(CCTYPE)" == "GCC"
851 $(LINK32) -v -o $@ $(LINK_FLAGS) \
852 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
854 $(LINK32) -subsystem:console -out:$@ \
855 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
858 perlmain.c : runperl.c
859 copy runperl.c perlmain.c
861 perlmain$(o) : perlmain.c
862 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
864 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
865 .IF "$(CCTYPE)" == "BORLAND"
866 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
867 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
869 $(PERLIMPLIB) $(LIBFILES)\n)
870 .ELIF "$(CCTYPE)" == "GCC"
871 $(LINK32) -o $@ $(LINK_FLAGS) \
872 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
874 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
875 $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB)
878 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
880 .IF "$(CCTYPE)" != "BORLAND"
881 .IF "$(CCTYPE)" != "GCC"
882 .IF "$(USE_PERLCRT)" == ""
885 copy runperl.c perl95.c
887 perl95$(o) : perl95.c
888 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
890 win32sckmt$(o) : win32sck.c
891 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
892 $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
894 win32mt$(o) : win32.c
895 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
896 $(OBJOUT_FLAG)win32mt$(o) win32.c
898 DynaLoadmt$(o) : $(DYNALOADER).c
899 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
900 $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
902 $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
903 $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
904 $(LIBBASEFILES) $(PERL95_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) \
911 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
912 if not exist $(AUTODIR) mkdir $(AUTODIR)
913 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
914 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
915 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
916 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
918 .IF "$(OBJECT)" == "-DPERL_OBJECT"
920 perlCAPI.cpp : $(MINIPERL)
921 $(MINIPERL) GenCAPI.pl $(COREDIR)
923 perlCAPI$(o) : perlCAPI.cpp
924 .IF "$(CCTYPE)" == "BORLAND"
925 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
926 .ELIF "$(CCTYPE)" == "GCC"
927 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
929 $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
930 $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
933 $(CAPILIB) : perlCAPI.cpp perlCAPI$(o)
934 .IF "$(CCTYPE)" == "BORLAND"
935 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +perlCAPI$(o)
937 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) perlCAPI$(o)
942 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
943 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
945 $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
946 cd $(EXTDIR)\Data\$(*B) && \
947 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
948 cd $(EXTDIR)\Data\$(*B) && $(MAKE)
950 $(RE_DLL): $(PERLEXE) $(RE).xs
951 cd $(EXTDIR)\$(*B) && \
952 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
953 cd $(EXTDIR)\$(*B) && $(MAKE)
955 $(B_DLL): $(PERLEXE) $(B).xs
956 cd $(EXTDIR)\$(*B) && \
957 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
958 cd $(EXTDIR)\$(*B) && $(MAKE)
960 $(THREAD_DLL): $(PERLEXE) $(THREAD).xs
961 cd $(EXTDIR)\$(*B) && \
962 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
963 cd $(EXTDIR)\$(*B) && $(MAKE)
965 $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
966 cd $(EXTDIR)\$(*B) && \
967 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
968 cd $(EXTDIR)\$(*B) && $(MAKE)
970 $(POSIX_DLL): $(PERLEXE) $(POSIX).xs
971 cd $(EXTDIR)\$(*B) && \
972 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
973 cd $(EXTDIR)\$(*B) && $(MAKE)
975 $(IO_DLL): $(PERLEXE) $(IO).xs
976 cd $(EXTDIR)\$(*B) && \
977 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
978 cd $(EXTDIR)\$(*B) && $(MAKE)
980 $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
981 cd $(EXTDIR)\$(*B) && \
982 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
983 cd $(EXTDIR)\$(*B) && $(MAKE)
985 $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
986 cd $(EXTDIR)\$(*B) && \
987 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
988 cd $(EXTDIR)\$(*B) && $(MAKE)
990 $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
991 cd $(EXTDIR)\$(*B) && \
992 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
993 cd $(EXTDIR)\$(*B) && $(MAKE)
995 $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
996 cd $(EXTDIR)\$(*B) && \
997 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
998 cd $(EXTDIR)\$(*B) && $(MAKE)
1000 $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1001 cd $(EXTDIR)\$(*B) && \
1002 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1003 cd $(EXTDIR)\$(*B) && $(MAKE)
1006 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1007 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1008 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1010 utils: $(PERLEXE) $(X2P)
1011 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1012 copy ..\README.win32 ..\pod\perlwin32.pod
1013 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1014 $(PERLEXE) $(PL2BAT) $(UTILS)
1017 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
1018 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
1020 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1021 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1022 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1023 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1024 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1025 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1026 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1027 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1028 -del /f $(LIBDIR)\Data\Dumper.pm
1029 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1030 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1031 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1032 -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
1033 -del /f $(PODDIR)\*.html
1034 -del /f $(PODDIR)\*.bat
1035 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct *.bat
1036 -cd ..\x2p && del /f find2perl s2p *.bat
1037 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1039 .IF "$(PERL95EXE)" != ""
1043 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.bs Makefile *$(o) pm_to_blib
1044 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1045 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1047 install : all installbare installhtml
1050 $(PERLEXE) ..\installperl
1051 .IF "$(PERL95EXE)" != ""
1052 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
1054 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1055 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1058 $(RCOPY) html\*.* $(INST_HTML)\*.*
1060 inst_lib : $(CONFIGPM)
1061 copy splittree.pl ..
1062 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1063 $(RCOPY) ..\lib $(INST_LIB)\*.*
1065 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1066 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1067 .IF "$(CCTYPE)" == "BORLAND"
1068 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1070 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1075 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1077 test-prep : all utils
1078 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1079 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1080 .IF "$(CCTYPE)" == "BORLAND"
1081 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1083 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1087 cd ..\t && $(PERLEXE) -I..\lib harness
1089 test-notty : test-prep
1090 set PERL_SKIP_TTY_TEST=1 && \
1091 cd ..\t && $(PERLEXE) -I.\lib harness
1094 -@erase miniperlmain$(o)
1096 -@erase perlglob$(o)
1097 -@erase perlmain$(o)
1098 -@erase perlCAPI.cpp
1105 -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
1106 -@erase $(WIN32_OBJ)
1109 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp
1110 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1111 -@erase ..\x2p\*.exe ..\x2p\*.bat