2 # Makefile to build perl on Windows NT using DMAKE.
4 # Visual C++ 2.0 thro 6.0
6 # Mingw32 with gcc-2.95.2 or better **experimental**
8 # This is set up to build a perl.exe that runs off a shared library
9 # (perl57.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 "dmake 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 # Comment this out if you DON'T want your perl installation to have
40 # architecture specific components. This means that architecture-
41 # specific files will be installed along with the architecture-neutral
42 # files. Leaving it enabled is safer and more flexible, in case you
43 # want to build multiple flavors of perl and install them together in
44 # the same location. Commenting it out gives you a simpler
45 # installation that is easier to understand for beginners.
47 INST_ARCH *= \$(ARCHNAME)
50 # uncomment to enable multiple interpreters. This is need for fork()
56 # Beginnings of interpreter cloning/threads; still very incomplete.
57 # This should be enabled to get the fork() emulation. This needs
60 USE_ITHREADS *= define
63 # uncomment to enable the implicit "host" layer for all system calls
64 # made by perl. This needs USE_MULTI above. This is also needed to
70 # uncomment to enable the experimental PerlIO I/O subsystem.
74 # WARNING! This option is deprecated and will eventually go away (enable
75 # USE_ITHREADS instead).
77 # uncomment to enable threads-capabilities. This is incompatible with
78 # USE_ITHREADS, and is only here for people who may have come to rely
79 # on the experimental Thread support that was in 5.005.
81 #USE_5005THREADS *= define
84 # uncomment exactly one of the following
88 # Visual C++ > 2.x and < 6.x
92 # Borland 5.02 or later
94 # mingw32+gcc-2.95.2 or better
98 # uncomment this if your Borland compiler is older than v5.4.
101 # uncomment this if you want to use Borland's VCL as your CRT
105 # uncomment this if you are compiling under Windows 95/98 and command.com
106 # (not needed if you're running under 4DOS/NT 6.01 or later)
110 # uncomment next line if you want debug version of perl (big,slow)
111 # If not enabled, we automatically try to use maximum optimization
112 # with all compilers that are known to have a working optimizer.
117 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
118 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
119 # This currently requires VC 5.0 with Service Pack 3 or later.
120 # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
121 # and follow the directions in the package to install.
123 # Not recommended if you have VC 6.x and you're not running Windows 9x.
125 #USE_PERLCRT *= define
128 # uncomment to enable linking with setargv.obj under the Visual C
129 # compiler. Setting this options enables perl to expand wildcards in
130 # arguments, but it may be harder to use alternate methods like
131 # File::DosGlob that are more powerful. This option is supported only with
134 #USE_SETARGV *= define
137 # if you have the source for des_fcrypt(), uncomment this and make sure the
138 # file exists (see README.win32). File should be located in the same
139 # directory as this file.
141 #CRYPT_SRC *= fcrypt.c
144 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
145 # library, uncomment this, and make sure the library exists (see README.win32)
146 # Specify the full pathname of the library.
148 #CRYPT_LIB *= fcrypt.lib
151 # set this if you wish to use perl's malloc
152 # WARNING: Turning this on/off WILL break binary compatibility with extensions
153 # you may have compiled with/without it. Be prepared to recompile all
154 # extensions if you change the default. Currently, this cannot be enabled
155 # if you ask for USE_IMP_SYS above.
157 #PERL_MALLOC *= define
160 # set the install locations of the compiler include/libraries
161 # Running VCVARS32.BAT is *required* when using Visual C.
162 # Some versions of Visual C don't define MSVCDIR in the environment,
163 # so you may have to set CCHOME explicitly (spaces in the path name should
166 #CCHOME *= F:\borland\bc5
168 #CCHOME *= c:\gcc-2.95.2
169 CCINCDIR *= $(CCHOME)\include
170 CCLIBDIR *= $(CCHOME)\lib
173 # Additional compiler flags can be specified here.
177 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
178 # for old symbols by default, at the expense of extreme pollution. You most
179 # probably just want to build modules that won't compile with
180 # perl Makefile.PL POLLUTE=1
181 # instead of enabling this. Please report such modules to the respective
184 #BUILDOPT += -DPERL_POLLUTE
187 # This should normally be disabled. Enabling it will disable the File::Glob
188 # implementation of CORE::glob.
190 #BUILDOPT += -DPERL_EXTERNAL_GLOB
193 # This should normally be disabled. Enabling it causes perl to read scripts
194 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
195 #BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
198 # specify semicolon-separated list of extra directories that modules will
199 # look for libraries (spaces in path names need not be quoted)
204 # set this to point to cmd.exe (only needed if you use some
205 # alternate shell that doesn't grok cmd.exe style commands)
207 #SHELL *= g:\winnt\system32\cmd.exe
210 # set this to your email address (perl will guess a value from
211 # from your loginname and your hostname, which may not be right)
216 ## Build configuration ends.
219 ##################### CHANGE THESE ONLY IF YOU MUST #####################
221 .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
225 CRYPT_FLAG = -DHAVE_DES_FCRYPT
230 USE_5005THREADS *= undef
232 .IF "$(USE_5005THREADS)" == "define"
233 USE_ITHREADS != undef
236 .IF "$(USE_IMP_SYS)" == "define"
241 USE_ITHREADS *= undef
246 .IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
250 .IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
252 USE_5005THREADS != undef
255 .IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
256 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
259 .IF "$(USE_IMP_SYS)" != "undef"
260 BUILDOPT += -DPERL_IMPLICIT_SYS
263 .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
265 PROCESSOR_ARCHITECTURE *= x86
267 .IF "$(USE_5005THREADS)" == "define"
268 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
269 .ELIF "$(USE_MULTI)" == "define"
270 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
272 .IF "$(USE_PERLIO)" == "define"
273 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
275 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
277 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
280 .IF "$(USE_ITHREADS)" == "define"
281 ARCHNAME !:= $(ARCHNAME)-thread
284 # Visual Studio 98 specific
285 .IF "$(CCTYPE)" == "MSVC60"
287 # VC 6.0 can load the socket dll on demand. Makes the test suite
288 # run in about 10% less time.
289 DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
291 .IF "$(CFG)" == "Debug"
293 # VC 6.0 seems capable of compiling perl correctly with optimizations
294 # enabled. Anything earlier fails tests.
299 ARCHDIR = ..\lib\$(ARCHNAME)
300 COREDIR = ..\lib\CORE
301 AUTODIR = ..\lib\auto
305 EXTUTILSDIR = $(LIBDIR)\ExtUtils
308 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
309 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
310 INST_LIB = $(INST_TOP)$(INST_VER)\lib
311 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
312 INST_COREDIR = $(INST_ARCHLIB)\CORE
313 INST_POD = $(INST_LIB)\pod
314 INST_HTML = $(INST_TOP)$(INST_VER)\html
317 # Programs to compile, build .lib files and link
322 .IF "$(CCTYPE)" == "BORLAND"
325 .IF "$(BCCOLD)" != "define"
337 INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
338 #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
339 DEFINES = -DWIN32 $(CRYPT_FLAG)
340 LOCDEFS = -DPERLDLL -DPERL_CORE
345 LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC)
347 .IF "$(CFG)" == "Debug"
348 OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
351 OPTIMIZE = -O2 -D_RTLDLL
355 CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
356 $(PCHFLAGS) $(OPTIMIZE)
357 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
361 .IF "$(BCCOLD)" != "define"
363 DEFINES += -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0x0410
365 .IF "$(BCCVCL)" == "define"
366 LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib
367 LINK_FLAGS += -L"$(CCLIBDIR)\Release"
371 .ELIF "$(CCTYPE)" == "GCC"
387 INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
388 DEFINES = -DWIN32 $(CRYPT_FLAG)
389 LOCDEFS = -DPERLDLL -DPERL_CORE
396 LIBFILES = $(CRYPT_LIB) $(LIBC) \
397 -lmoldname -lkernel32 -luser32 -lgdi32 \
398 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
399 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \
400 -lwinmm -lversion -lodbc32
402 .IF "$(CFG)" == "Debug"
403 OPTIMIZE = -g -O2 -DDEBUGGING
410 CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
411 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
416 # NOTE: we assume that GCC uses MSVCRT.DLL
417 BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
423 LIB32 = $(LINK32) -lib
430 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
431 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
432 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
433 LOCDEFS = -DPERLDLL -DPERL_CORE
437 .IF "$(USE_PERLCRT)" != "define"
446 .IF "$(CFG)" == "Debug"
447 .IF "$(CCTYPE)" == "MSVC20"
448 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
449 LINK_DBG = -debug -pdb:none
451 # -Zi requires .pdb file(s)
452 #OPTIMIZE = -Od -MD -Zi -DDEBUGGING
454 OPTIMIZE = -O1 -MD -Z7 -DDEBUGGING
455 LINK_DBG = -debug -debugtype:both -pdb:none
458 .IF "$(CFG)" == "Optimize"
459 # -O1 yields smaller code, which turns out to be faster than -O2
460 #OPTIMIZE = -O2 -MD -DNDEBUG
461 OPTIMIZE = -O1 -MD -DNDEBUG
463 OPTIMIZE = -Od -MD -DNDEBUG
468 LIBBASEFILES = $(CRYPT_LIB) \
469 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
470 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
471 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
472 version.lib odbc32.lib odbccp32.lib
474 # we add LIBC here, since we may be using PerlCRT.dll
475 LIBFILES = $(LIBBASEFILES) $(LIBC)
477 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
478 $(PCHFLAGS) $(OPTIMIZE)
479 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
480 -libpath:"$(INST_COREDIR)" \
481 -machine:$(PROCESSOR_ARCHITECTURE)
486 .IF "$(USE_PERLCRT)" != "define"
487 BUILDOPT += -DPERL_MSVCRT_READFIX
492 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
494 # used to allow local linking flags that are not propogated into Config.pm,
498 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
500 #################### do not edit below this line #######################
501 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
513 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
516 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
519 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
525 .IF "$(CCTYPE)" == "BORLAND"
526 $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
527 $(IMPLIB) $(*B).lib $@
528 .ELIF "$(CCTYPE)" == "GCC"
529 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
530 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
532 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
533 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
541 MINIPERL = ..\miniperl.exe
543 PERLEXE = ..\perl.exe
544 WPERLEXE = ..\wperl.exe
545 GLOBEXE = ..\perlglob.exe
546 CONFIGPM = ..\lib\Config.pm
547 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
550 # Nominate a target which causes extensions to be re-built
551 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
552 # on and really only the interface - i.e. the .def file used to export symbols
554 PERLDEP = perldll.def
557 PL2BAT = bin\pl2bat.pl
558 GLOBBAT = bin\perlglob.bat
582 ..\lib\ExtUtils\xsubpp \
589 .IF "$(CCTYPE)" == "BORLAND"
591 CFGSH_TMPL = config.bc
592 CFGH_TMPL = config_H.bc
594 .ELIF "$(CCTYPE)" == "GCC"
596 CFGSH_TMPL = config.gc
597 CFGH_TMPL = config_H.gc
598 PERLIMPLIB = ..\libperl57$(a)
602 CFGSH_TMPL = config.vc
603 CFGH_TMPL = config_H.vc
607 # makedef.pl must be updated if this changes, and this should normally
608 # only change when there is an incompatible revision of the public API.
609 # XXX so why did we change it from perl56 to perl57?
610 PERLIMPLIB *= ..\perl57$(a)
611 PERLDLL = ..\perl57.dll
613 XCOPY = xcopy /f /r /i /d
614 RCOPY = xcopy /f /r /i /e /d
618 # filenames given to xsubpp must have forward slashes (since it puts
619 # full pathnames in #line strings)
620 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
657 EXTRACORE_SRC += perllib.c
659 .IF "$(PERL_MALLOC)" == "define"
660 EXTRACORE_SRC += ..\malloc.c
663 EXTRACORE_SRC += ..\perlio.c
670 .IF "$(USE_PERLIO)" == "define"
671 WIN32_SRC += .\win32io.c
674 .IF "$(CRYPT_SRC)" != ""
675 WIN32_SRC += .\$(CRYPT_SRC)
678 DLL_SRC = $(DYNALOADER).c
725 .\include\sys\socket.h \
728 CORE_H = $(CORE_NOCFG_H) .\config.h
730 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
731 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
732 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
733 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
734 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
735 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
736 DLL_OBJ = $(DLL_SRC:db:+$(o))
737 X2P_OBJ = $(X2P_SRC:db:+$(o))
739 PERLDLL_OBJ = $(CORE_OBJ)
740 PERLEXE_OBJ = perlmain$(o)
742 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
744 .IF "$(USE_SETARGV)" != ""
745 SETARGV_OBJ = setargv$(o)
748 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
749 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
750 Sys/Hostname Storable Filter/Util/Call Encode \
751 Digest/MD5 PerlIO/Scalar MIME/Base64 Time/HiRes
752 STATIC_EXT = DynaLoader
755 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
757 POD2HTML = $(PODDIR)\pod2html
758 POD2MAN = $(PODDIR)\pod2man
759 POD2LATEX = $(PODDIR)\pod2latex
760 POD2TEXT = $(PODDIR)\pod2text
762 # vars must be separated by "\t+~\t+", since we're using the tempfile
763 # version of config_sh.pl (we were overflowing someone's buffer by
764 # trying to fit them all on the command line)
767 INST_DRV=$(INST_DRV) ~ \
768 INST_TOP=$(INST_TOP:s/\/\\/) ~ \
769 INST_VER=$(INST_VER:s/\/\\/) ~ \
770 INST_ARCH=$(INST_ARCH) ~ \
771 archname=$(ARCHNAME) ~ \
774 ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
775 cf_email=$(EMAIL) ~ \
776 d_crypt=$(D_CRYPT) ~ \
777 d_mymalloc=$(PERL_MALLOC) ~ \
778 libs=$(LIBFILES:f) ~ \
779 incpath=$(CCINCDIR:s/\/\\/) ~ \
780 libperl=$(PERLIMPLIB:f) ~ \
781 libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \
784 _o=$(o) obj_ext=$(o) ~ \
785 _a=$(a) lib_ext=$(a) ~ \
786 static_ext=$(STATIC_EXT) ~ \
787 use5005threads=$(USE_5005THREADS) ~ \
788 useithreads=$(USE_ITHREADS) ~ \
789 usethreads=$(USE_5005THREADS) ~ \
790 usemultiplicity=$(USE_MULTI) ~ \
791 useperlio=$(USE_PERLIO) ~ \
792 LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \
796 # set up targets varying between Win95 and WinNT builds
799 .IF "$(IS_WIN95)" == "define"
801 RIGHTMAKE = __switch_makefiles
812 all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
813 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
816 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
818 #----------------------------------------------------------------
820 #-------------------- BEGIN Win95 SPECIFIC ----------------------
822 # this target is a jump-off point for Win95
823 # 1. it switches to the Win95-specific makefile if it exists
824 # (__do_switch_makefiles)
825 # 2. it prints a message when the Win95-specific one finishes (__done)
826 # 3. it then kills this makefile by trying to make __no_such_target
828 __switch_makefiles: __do_switch_makefiles __done __no_such_target
830 __do_switch_makefiles:
831 .IF "$(NOTFIRST)" != "true"
832 if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true
837 .IF "$(NOTFIRST)" != "true"
839 @echo Build process complete. Ignore any errors after this message.
840 @echo Run "dmake test" to test and "dmake install" to install
843 # dummy targets for Win95-specific makefile
853 # This target is used to generate the new makefile (.\makefile.95) for Win95
855 .\makefile.95: .\makefile.mk
856 $(MINIPERL) genmk95.pl makefile.mk $(MK2)
858 #--------------------- END Win95 SPECIFIC ---------------------
860 # a blank target for when builds don't need to do certain things
861 # this target added for Win95 port but used to keep the WinNT port able to
866 $(GLOBEXE) : perlglob$(o)
867 .IF "$(CCTYPE)" == "BORLAND"
868 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
869 $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \
870 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
871 .ELIF "$(CCTYPE)" == "GCC"
872 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
874 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
875 perlglob$(o) setargv$(o)
878 perlglob$(o) : perlglob.c
880 config.w32 : $(CFGSH_TMPL)
881 copy $(CFGSH_TMPL) config.w32
883 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
885 copy $(CFGH_TMPL) config.h
887 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
888 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
889 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
891 # this target is for when changes to the main config.sh happen
892 # edit config.{b,v,g}c and make this target once for each supported
893 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
895 perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
896 $(CFGSH_TMPL) > ..\config.sh
897 -cd .. && del /f perl.exe
898 cd .. && perl configpm
901 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
902 rename config.h $(CFGH_TMPL)
904 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
905 cd .. && miniperl configpm
906 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
907 $(XCOPY) ..\*.h $(COREDIR)\*.*
908 $(XCOPY) *.h $(COREDIR)\*.*
909 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
910 $(RCOPY) include $(COREDIR)\*.*
911 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
912 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
914 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
915 .IF "$(CCTYPE)" == "BORLAND"
916 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
917 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
918 .ELIF "$(CCTYPE)" == "GCC"
919 $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
920 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
922 $(LINK32) -subsystem:console -out:$@ \
923 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
927 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
929 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
930 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*B).c
932 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
933 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
935 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
936 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
937 # unless the .IF is true), so instead we use a .ELSE with the default.
938 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
940 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
941 .IF "$(USE_IMP_SYS)" == "define"
942 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
944 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
947 # 1. we don't want to rebuild miniperl.exe when config.h changes
948 # 2. we don't want to rebuild miniperl.exe with non-default config.h
949 $(MINI_OBJ) : $(CORE_NOCFG_H)
951 $(WIN32_OBJ) : $(CORE_H)
952 $(CORE_OBJ) : $(CORE_H)
953 $(DLL_OBJ) : $(CORE_H)
954 $(X2P_OBJ) : $(CORE_H)
956 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
957 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
958 $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
960 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
961 .IF "$(CCTYPE)" == "BORLAND"
962 $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
963 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
968 .ELIF "$(CCTYPE)" == "GCC"
969 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
970 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
971 dlltool --output-lib $(PERLIMPLIB) \
972 --dllname $(PERLDLL:b).dll \
974 --base-file perl.base \
975 --output-exp perl.exp
976 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
977 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
980 $(LINK32) -dll -def:perldll.def -out:$@ \
981 @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
982 $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\))
984 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
986 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
987 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
989 ..\x2p\a2p$(o) : ..\x2p\a2p.c
990 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
992 ..\x2p\hash$(o) : ..\x2p\hash.c
993 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
995 ..\x2p\str$(o) : ..\x2p\str.c
996 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
998 ..\x2p\util$(o) : ..\x2p\util.c
999 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1001 ..\x2p\walk$(o) : ..\x2p\walk.c
1002 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1004 $(X2P) : $(MINIPERL) $(X2P_OBJ)
1005 $(MINIPERL) ..\x2p\find2perl.PL
1006 $(MINIPERL) ..\x2p\s2p.PL
1007 .IF "$(CCTYPE)" == "BORLAND"
1008 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1009 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
1010 .ELIF "$(CCTYPE)" == "GCC"
1011 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1012 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
1014 $(LINK32) -subsystem:console -out:$@ \
1015 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
1018 perlmain.c : runperl.c
1019 copy runperl.c perlmain.c
1021 perlmain$(o) : perlmain.c
1022 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
1024 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1025 .IF "$(CCTYPE)" == "BORLAND"
1026 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1027 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
1029 $(PERLIMPLIB) $(LIBFILES)\n)
1030 .ELIF "$(CCTYPE)" == "GCC"
1031 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1032 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
1034 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1035 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
1037 copy $(PERLEXE) $(WPERLEXE)
1038 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1039 copy splittree.pl ..
1040 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1042 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
1043 if not exist $(AUTODIR) mkdir $(AUTODIR)
1044 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1045 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1046 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1047 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1048 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
1049 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
1051 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
1052 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
1054 #----------------------------------------------------------------------------------
1055 Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
1056 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
1059 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
1061 #----------------------------------------------------------------------------------
1065 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1066 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1067 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1069 utils: $(PERLEXE) $(X2P)
1070 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1071 copy ..\README.aix ..\pod\perlaix.pod
1072 copy ..\README.amiga ..\pod\perlamiga.pod
1073 copy ..\README.apollo ..\pod\perlapollo.pod
1074 copy ..\README.beos ..\pod\perlbeos.pod
1075 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1076 copy ..\README.ce ..\pod\perlce.pod
1077 copy ..\README.cygwin ..\pod\perlcygwin.pod
1078 copy ..\README.dgux ..\pod\perldgux.pod
1079 copy ..\README.dos ..\pod\perldos.pod
1080 copy ..\README.epoc ..\pod\perlepoc.pod
1081 copy ..\README.hpux ..\pod\perlhpux.pod
1082 copy ..\README.hurd ..\pod\perlhurd.pod
1083 copy ..\README.machten ..\pod\perlmachten.pod
1084 copy ..\README.macos ..\pod\perlmacos.pod
1085 copy ..\README.mint ..\pod\perlmint.pod
1086 copy ..\README.mpeix ..\pod\perlmpeix.pod
1087 copy ..\README.netware ..\pod\perlnetware.pod
1088 copy ..\README.os2 ..\pod\perlos2.pod
1089 copy ..\README.os390 ..\pod\perlos390.pod
1090 copy ..\README.plan9 ..\pod\perlplan9.pod
1091 copy ..\README.qnx ..\pod\perlqnx.pod
1092 copy ..\README.solaris ..\pod\perlsolaris.pod
1093 copy ..\README.tru64 ..\pod\perltru64.pod
1094 copy ..\README.uts ..\pod\perluts.pod
1095 copy ..\README.vmesa ..\pod\perlvmesa.pod
1096 copy ..\vms\perlvms.pod ..\pod\perlvms.pod
1097 copy ..\README.vos ..\pod\perlvos.pod
1098 copy ..\README.win32 ..\pod\perlwin32.pod
1099 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1100 cd ..\lib && $(PERLEXE) lib_pm.PL
1101 $(PERLEXE) $(PL2BAT) $(UTILS)
1104 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1105 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
1107 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1108 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1109 -del /f $(LIBDIR)\XSLoader.pm
1110 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1111 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1112 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1113 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1114 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1115 -del /f $(LIBDIR)\PerlIO\Scalar.pm
1116 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1117 -del /f $(LIBDIR)\File\Glob.pm
1118 -del /f $(LIBDIR)\Storable.pm
1119 -del /f $(LIBDIR)\Filter\Util\Call.pm
1120 -del /f $(LIBDIR)\Digest\MD5.pm
1121 -del /f $(LIBDIR)\MIME\Base64.pm
1122 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1123 -del /f $(LIBDIR)\Time\HiRes.pm
1124 -del /f $(LIBDIR)\List\Util.pm
1125 -del /f $(LIBDIR)\Scalar\Util.pm
1126 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1127 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1128 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1129 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
1130 -if exist $(LIBDIR)\Filter\Util\Call rmdir /s /q $(LIBDIR)\Filter\Util\Call || rmdir /s $(LIBDIR)\Filter
1131 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util || rmdir /s $(LIBDIR)\Filter
1132 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest || rmdir /s $(LIBDIR)\Digest
1133 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME || rmdir /s $(LIBDIR)\MIME
1134 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List || rmdir /s $(LIBDIR)\List
1135 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar || rmdir /s $(LIBDIR)\Scalar
1136 -cd $(PODDIR) && del /f *.html *.bat checkpods \
1137 perlaix.pod perlamiga.pod perlapollo.pod \
1138 perlbeos.pod perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1139 perldos.pod perlepoc.pod perlhpux.pod perlhurd.pod \
1140 perlmachten.pod perlmint.pod \
1141 perlmacos.pod perlmpeix.pod perlnetware.pod \
1142 perlos2.pod perlos390.pod \
1143 perlplan9.pod perlqnx.pod \
1144 perlsolaris.pod perltru64.pod perluts.pod \
1145 perlvmesa.pod perlvms.pod perlvos.pod \
1146 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1147 podchecker podselect
1148 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
1149 perlivp dprofpp *.bat
1150 -cd ..\x2p && del /f find2perl s2p *.bat
1151 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1154 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
1156 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1157 -if exist $(COREDIR) rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1159 install : all installbare installhtml
1161 installbare : $(RIGHTMAKE) utils
1162 $(PERLEXE) ..\installperl
1163 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1164 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1165 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1168 $(RCOPY) html\*.* $(INST_HTML)\*.*
1170 inst_lib : $(CONFIGPM)
1171 copy splittree.pl ..
1172 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1173 $(RCOPY) ..\lib $(INST_LIB)\*.*
1175 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1176 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1177 .IF "$(CCTYPE)" == "BORLAND"
1178 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1180 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1185 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1187 test-prep : all utils
1188 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1189 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1190 .IF "$(CCTYPE)" == "BORLAND"
1191 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1193 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1196 test : $(RIGHTMAKE) test-prep
1197 cd ..\t && $(PERLEXE) -I..\lib harness
1199 test-notty : test-prep
1200 set PERL_SKIP_TTY_TEST=1 && \
1201 cd ..\t && $(PERLEXE) -I.\lib harness
1203 test-wide : test-prep
1204 set HARNESS_PERL_SWITCHES=-C && \
1205 cd ..\t && $(PERLEXE) -I..\lib harness
1207 test-wide-notty : test-prep
1208 set PERL_SKIP_TTY_TEST=1 && \
1209 set HARNESS_PERL_SWITCHES=-C && \
1210 cd ..\t && $(PERLEXE) -I..\lib harness
1212 clean : Extensions_clean
1213 -@erase miniperlmain$(o)
1215 -@erase perlglob$(o)
1216 -@erase perlmain$(o)
1224 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
1225 -@erase $(WIN32_OBJ)
1228 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1229 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1230 -@erase ..\x2p\*.exe ..\x2p\*.bat
1234 # Handy way to run perlbug -ok without having to install and run the
1235 # installed perlbug. We don't re-run the tests here - we trust the user.
1236 # Please *don't* use this unless all tests pass.
1237 # If you want to report test failures, use "dmake nok" instead.
1239 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1242 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1245 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1248 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok