#
# Makefile to build perl on Windows NT using DMAKE.
# Supported compilers:
-# Visual C++ 2.0 through 6.0 (and possibly newer versions)
-# Borland C++ 5.02
-# Mingw32 with gcc-2.95.2 or better **experimental**
+# Visual C++ 2.0 through 7.0 (and possibly newer versions)
+# Borland C++ 5.02 or better
+# Mingw32 with gcc-2.95.2 or better
# MS Platform SDK 64-bit compiler and tools **experimental**
#
# This is set up to build a perl.exe that runs off a shared library
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-#INST_VER *= \5.9.3
+#INST_VER *= \5.9.5
#
# Comment this out if you DON'T want your perl installation to have
#CCTYPE *= MSVC20
# Visual C++ > 2.x and < 6.x
#CCTYPE *= MSVC
-# Visual C++ >= 6.x
+# Visual C++ 6.x (aka Visual Studio 98)
#CCTYPE *= MSVC60
+# Visual C++ Toolkit 2003 (free version of Visual C++ 7.x command-line tools)
+#CCTYPE *= MSVC70FREE
+# Visual C++ 7.x (aka Visual Studio .NET 2003) (full version)
+#CCTYPE *= MSVC70
# Borland 5.02 or later
#CCTYPE *= BORLAND
# MinGW with gcc-2.95.2 or later
PROCESSOR_ARCHITECTURE *= x86
.IF "$(WIN64)" == ""
+# When we are running from a 32bit cmd.exe on AMD64 then
+# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
+# is set to AMD64
.IF "$(PROCESSOR_ARCHITEW6432)" != ""
PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
WIN64 = define
-.ELIF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
+.ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
WIN64 = define
.ELSE
WIN64 = undef
.ENDIF
.ENDIF
+ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+.IF "$(ARCHITECTURE)" == "AMD64"
+ARCHITECTURE = x64
+.ENDIF
+.IF "$(ARCHITECTURE)" == "IA64"
+ARCHITECTURE = ia64
+.ENDIF
+
.IF "$(USE_MULTI)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
+ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
.ELSE
.IF "$(USE_PERLIO)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
.ELSE
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+ARCHNAME = MSWin32-$(ARCHITECTURE)
.ENDIF
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
.ENDIF
.IF "$(USE_ITHREADS)" == "define"
ARCHNAME !:= $(ARCHNAME)-thread
.ENDIF
-# Visual Studio 98 specific
-.IF "$(CCTYPE)" == "MSVC60"
-
-# VC 6.0 can load the socket dll on demand. Makes the test suite
-# run in about 10% less time.
+# Visual Studio 98 and .NET 2003 specific
+# VC++ 6.x and 7.x can load DLL's on demand. Makes the test suite run in
+# about 10% less time. (The free version of 7.x can't do this, however.)
+.IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70"
DELAYLOAD *= -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
-
-.IF "$(CFG)" == "Debug"
-.ELSE
-# VC 6.0 seems capable of compiling perl correctly with optimizations
-# enabled. Anything earlier fails tests.
-CFG *= Optimize
-.ENDIF
.ENDIF
ARCHDIR = ..\lib\$(ARCHNAME)
EXTDIR = ..\ext
PODDIR = ..\pod
EXTUTILSDIR = $(LIBDIR)\ExtUtils
+HTMLDIR = .\html
#
INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
INST_LIB = $(INST_TOP)$(INST_VER)\lib
INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
INST_COREDIR = $(INST_ARCHLIB)\CORE
-INST_POD = $(INST_LIB)\pod
INST_HTML = $(INST_TOP)$(INST_VER)\html
#
LINK_DBG =
.ENDIF
+EXTRACFLAGS =
CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" \
LINK_DBG = -s
.ENDIF
+EXTRACFLAGS =
CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
OBJOUT_FLAG = -o
.IF "$(WIN64)" == "define"
DEFINES += -DWIN64 -DCONSERVATIVE
-OPTIMIZE += -Wp64 -Op
+OPTIMIZE += -Wp64 -fp:precise
.ENDIF
.IF "$(USE_PERLCRT)" != "define"
oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
- version.lib
+ version.lib odbc32.lib odbccp32.lib
-# win64 doesn't have some libs
-.IF "$(WIN64)" != "define"
-LIBBASEFILES += odbc32.lib odbccp32.lib
+# The 64 bit Platform SDK compilers contain a runtime library that doesn't
+# include the buffer overrun verification code used by the /GS switch.
+# Since the code links against libraries that are compiled with /GS, this
+# "security cookie verification" must be included via bufferoverlow.lib.
+.IF "$(WIN64)" == "define"
+LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib
.ENDIF
# we add LIBC here, since we may be using PerlCRT.dll
LIBFILES = $(LIBBASEFILES) $(LIBC)
-CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
+EXTRACFLAGS = -nologo -GF -W3
+CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
-libpath:"$(INST_COREDIR)" \
..\utils\pstruct \
..\utils\h2xs \
..\utils\perldoc \
- ..\utils\perlcc \
..\utils\perlivp \
..\utils\libnetcfg \
..\utils\enc2xs \
..\utils\piconv \
+ ..\utils\config_data \
..\utils\corelist \
..\utils\cpan \
..\utils\xsubpp \
..\utils\prove \
..\utils\ptar \
+ ..\utils\ptardiff \
+ ..\utils\shasum \
..\utils\instmodsh \
..\pod\checkpods \
..\pod\pod2html \
PERLIMPLIB *= ..\perl59$(a)
PERLDLL = ..\perl59.dll
-XCOPY = xcopy /f /r /i /d
-RCOPY = xcopy /f /r /i /e /d
+XCOPY = xcopy /f /r /i /d /y
+RCOPY = xcopy /f /r /i /e /d /y
NOOP = @rem
#
..\gv.c \
..\hv.c \
..\locale.c \
+ ..\mathoms.c \
..\mg.c \
..\numeric.c \
..\op.c \
DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
Sys/Hostname Storable Filter/Util/Call Encode \
- Digest/MD5 PerlIO/scalar MIME/Base64 Time/HiRes \
- Unicode/Normalize Math/BigInt/FastCalc Compress/Zlib Win32
+ Digest/MD5 Digest/SHA PerlIO/scalar MIME/Base64 Time/HiRes \
+ Unicode/Normalize Math/BigInt/FastCalc Compress/Zlib Win32 \
+ Win32API/File
STATIC_EXT =
NONXS_EXT = Errno
DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
-POD2HTML = $(PODDIR)\pod2html
-POD2MAN = $(PODDIR)\pod2man
-POD2LATEX = $(PODDIR)\pod2latex
-POD2TEXT = $(PODDIR)\pod2text
-
# vars must be separated by "\t+~\t+", since we're using the tempfile
# version of config_sh.pl (we were overflowing someone's buffer by
# trying to fit them all on the command line)
archname=$(ARCHNAME) ~ \
cc=$(CC) ~ \
ld=$(LINK32) ~ \
- ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
+ ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
cf_email=$(EMAIL) ~ \
d_crypt=$(D_CRYPT) ~ \
d_mymalloc=$(PERL_MALLOC) ~ \
all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
$(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
- $(X2P) Extensions
+ $(X2P) MakePPPort Extensions
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
+MakePPPort: $(MINIPERL) $(CONFIGPM)
+ $(MINIPERL) -I..\lib ..\mkppport
+
+MakePPPort_clean:
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\mkppport --clean
+
#-------------------------------------------------------------------------------
Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic
doc: $(PERLEXE)
- $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
+ $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
--podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
copy ..\README.irix ..\pod\perlirix.pod
copy ..\README.jp ..\pod\perljp.pod
copy ..\README.ko ..\pod\perlko.pod
+ copy ..\README.linux ..\pod\perllinux.pod
copy ..\README.machten ..\pod\perlmachten.pod
copy ..\README.macos ..\pod\perlmacos.pod
copy ..\README.macosx ..\pod\perlmacosx.pod
copy ..\README.os400 ..\pod\perlos400.pod
copy ..\README.plan9 ..\pod\perlplan9.pod
copy ..\README.qnx ..\pod\perlqnx.pod
+ copy ..\README.riscos ..\pod\perlriscos.pod
copy ..\README.solaris ..\pod\perlsolaris.pod
copy ..\README.symbian ..\pod\perlsymbian.pod
copy ..\README.tru64 ..\pod\perltru64.pod
copy ..\README.vms ..\pod\perlvms.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
- copy ..\pod\perl593delta.pod ..\pod\perldelta.pod
+ copy ..\pod\perl594delta.pod ..\pod\perldelta.pod
cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
cd ..\lib && $(PERLEXE) lib_pm.PL
$(PERLEXE) $(PL2BAT) $(UTILS)
# Note that the pod cleanup in this next section is parsed (and regenerated
# by pod/buildtoc so please check that script before making changes here
-# the doubled rmdir calls are needed because older cmd shells
-# don't understand /q
distclean: realclean
-del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
$(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
-del /f $(LIBDIR)\File\Glob.pm
-del /f $(LIBDIR)\Storable.pm
-del /f $(LIBDIR)\Digest\MD5.pm
+ -del /f $(LIBDIR)\Digest\SHA.pm
-del /f $(LIBDIR)\PerlIO\encoding.pm
-del /f $(LIBDIR)\PerlIO\scalar.pm
-del /f $(LIBDIR)\PerlIO\via.pm
-del /f $(LIBDIR)\Unicode\Normalize.pm
-del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
-del /f $(LIBDIR)\Win32.pm
- -if exist $(LIBDIR)\IO\Socket rmdir /s /q $(LIBDIR)\IO\Socket
- -if exist $(LIBDIR)\IO\Socket rmdir /s $(LIBDIR)\IO\Socket
+ -del /f $(LIBDIR)\Win32API\File.pm
+ -del /f $(LIBDIR)\Win32API\File\cFile.pc
-if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
- -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
+ -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
-if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
- -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
-if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
- -if exist $(LIBDIR)\Encode rmdir /s $(LIBDIR)\Encode
-if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
- -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
- -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
- -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
+ -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
+ -if exist $(LIBDIR)\IO\Compress rmdir /s /q $(LIBDIR)\IO\Compress
+ -if exist $(LIBDIR)\IO\Socket rmdir /s /q $(LIBDIR)\IO\Socket
+ -if exist $(LIBDIR)\IO\Uncompress rmdir /s /q $(LIBDIR)\IO\Uncompress
-if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
- -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
+ -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
- -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
-if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
- -if exist $(LIBDIR)\Sys rmdir /s $(LIBDIR)\Sys
-if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
- -if exist $(LIBDIR)\threads rmdir /s $(LIBDIR)\threads
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
- -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
+ -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-cd $(PODDIR) && del /f *.html *.bat checkpods \
perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldelta.pod perldgux.pod perldos.pod perlepoc.pod \
perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \
- perljp.pod perlko.pod perlmachten.pod perlmacos.pod \
- perlmacosx.pod perlmint.pod perlmpeix.pod perlnetware.pod \
- perlopenbsd.pod perlos2.pod perlos390.pod perlos400.pod \
- perlplan9.pod perlqnx.pod perlsolaris.pod perlsymbian.pod \
- perltru64.pod perltw.pod perluts.pod perlvmesa.pod perlvms.pod \
- perlvms.pod perlvos.pod perlwin32.pod \
+ perljp.pod perlko.pod perllinux.pod perlmachten.pod \
+ perlmacos.pod perlmacosx.pod perlmint.pod perlmpeix.pod \
+ perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
+ perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
+ perlsolaris.pod perlsymbian.pod perltru64.pod perltw.pod \
+ perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \
+ perlwin32.pod \
pod2html pod2latex pod2man pod2text pod2usage \
podchecker podselect
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
- perldoc perlivp dprofpp perlcc libnetcfg enc2xs piconv cpan *.bat \
- xsubpp instmodsh prove ptar corelist
+ perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
+ xsubpp instmodsh prove ptar ptardiff shasum corelist config_data
-cd ..\x2p && del /f find2perl s2p psed *.bat
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
-del /f $(CONFIGPM)
-cd .. && del /s *$(a) *.map *.pdb *.ilk *.tds *.bs *$(o) .exists pm_to_blib
-cd $(EXTDIR) && del /s *.def Makefile Makefile.old
-if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
- -if exist $(AUTODIR) rmdir /s $(AUTODIR)
-if exist $(COREDIR) rmdir /s /q $(COREDIR)
- -if exist $(COREDIR) rmdir /s $(COREDIR)
+ -if exist pod2htmd.tmp del pod2htmd.tmp
+ -if exist pod2htmi.tmp del pod2htmi.tmp
+ -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
install : all installbare installhtml
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
installhtml : doc
- $(RCOPY) html\*.* $(INST_HTML)\*.*
+ $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
inst_lib : $(CONFIGPM)
copy splittree.pl ..
.ENDIF
cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
-# the doubled rmdir calls are needed because older cmd shells
-# don't understand /q
_clean :
-@erase miniperlmain$(o)
-@erase $(MINIPERL)
-@erase $(PERLDLL)
-@erase $(CORE_OBJ)
-if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
- -if exist $(MINIDIR) rmdir /s $(MINIDIR)
-if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
- -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
-if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
- -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
-@erase $(UNIDATAFILES)
-@erase $(WIN32_OBJ)
-@erase $(DLL_OBJ)
clean : Extensions_clean _clean
-realclean : Extensions_realclean _clean
+realclean : Extensions_realclean MakePPPort_clean _clean
# Handy way to run perlbug -ok without having to install and run the
# installed perlbug. We don't re-run the tests here - we trust the user.