summaryrefslogtreecommitdiff
path: root/win32/makefile.mk
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2002-04-21 01:55:35 +0000
committerGurusamy Sarathy <gsar@cpan.org>2002-04-21 01:55:35 +0000
commitc623ac675720b3145d48cc2ea9474a0f3e0cbbca (patch)
tree72f97c16f706a1538dd9a5726323e59d251c8c53 /win32/makefile.mk
parent6d1c0808b641926567cd16e07679f427c5fedc61 (diff)
downloadperl-c623ac675720b3145d48cc2ea9474a0f3e0cbbca.tar.gz
Windows 64-bit support:
* support for building it in the regular makefiles * large files support via the _*i64() functions (this should be portable to the 32-bit universe too, but quite untested and and binary-incompatible, therefore not enabled there) * three additional test failures in addition to the t/end.t one (see README.win32) * sprintf() on Windows gets %I{32,64,}[xoud] format that parallel the ones available from the CRT (needed because Perl uses the UVxf macros in both sprintf() *and* in sv_catpvf() et al.) * add a few 64-bit notes to README.win32 The following general problems were also fixed: * s/struct stat/Stat_t/g * Data::Dumper had some naughty 'long' typecasts * Errno_pm.PL didn't work safe when winsock.h was not in the same directory as errno.h * various tell/seek things were incorrectly prototyped * squelch ugly looking noise when running tests * Embed.t wasn't linking in all the libraries * perl57.dll is now perl58.dll (anticipating 5.8.0-RC1) * re-enable all the disabled warnings (additional fixes may be needed for the warnings uncovered by this) p4raw-id: //depot/perl@16033
Diffstat (limited to 'win32/makefile.mk')
-rw-r--r--win32/makefile.mk58
1 files changed, 40 insertions, 18 deletions
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 28c513c64b..1527b27444 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1,12 +1,13 @@
#
# Makefile to build perl on Windows NT using DMAKE.
# Supported compilers:
-# Visual C++ 2.0 thro 6.0
+# Visual C++ 2.0 through 6.0 (and possibly newer versions)
# Borland C++ 5.02
# Mingw32 with gcc-2.95.2 or better **experimental**
+# MS Platform SDK 64-bit compiler and tools **experimental**
#
# This is set up to build a perl.exe that runs off a shared library
-# (perl57.dll). Also makes individual DLLs for the XS extensions.
+# (perl58.dll). Also makes individual DLLs for the XS extensions.
#
##
@@ -264,10 +265,21 @@ BUILDOPT += -DPERL_IMPLICIT_CONTEXT
BUILDOPT += -DPERL_IMPLICIT_SYS
.ENDIF
-.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
+.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE PROCESSOR_ARCHITEW6432
PROCESSOR_ARCHITECTURE *= x86
+.IF "$(WIN64)" == ""
+.IF "$(PROCESSOR_ARCHITEW6432)" != ""
+PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
+WIN64 = define
+.ELIF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
+WIN64 = define
+.ELSE
+WIN64 = undef
+.ENDIF
+.ENDIF
+
.IF "$(USE_5005THREADS)" == "define"
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
.ELIF "$(USE_MULTI)" == "define"
@@ -450,14 +462,10 @@ PERLDLL_RES =
.IF "$(CFG)" == "Debug"
.IF "$(CCTYPE)" == "MSVC20"
OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
-LINK_DBG = -debug -pdb:none
.ELSE
-# -Zi requires .pdb file(s)
-#OPTIMIZE = -Od -MD -Zi -DDEBUGGING
-#LINK_DBG = -debug
-OPTIMIZE = -O1 -MD -Z7 -DDEBUGGING
-LINK_DBG = -debug -debugtype:both -pdb:none
+OPTIMIZE = -O1 -MD -Zi -DDEBUGGING
.ENDIF
+LINK_DBG = -debug
.ELSE
.IF "$(CFG)" == "Optimize"
# -O1 yields smaller code, which turns out to be faster than -O2
@@ -469,11 +477,25 @@ OPTIMIZE = -Od -MD -DNDEBUG
LINK_DBG = -release
.ENDIF
+.IF "$(WIN64)" == "define"
+DEFINES += -DWIN64 -DCONSERVATIVE
+OPTIMIZE += -Wp64 -Op
+.ENDIF
+
+.IF "$(USE_PERLCRT)" != "define"
+BUILDOPT += -DPERL_MSVCRT_READFIX
+.ENDIF
+
LIBBASEFILES = $(CRYPT_LIB) \
oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
- version.lib odbc32.lib odbccp32.lib
+ version.lib
+
+# win64 doesn't have some libs
+.IF "$(WIN64)" != "define"
+LIBBASEFILES += odbc32.lib odbccp32.lib
+.ENDIF
# we add LIBC here, since we may be using PerlCRT.dll
LIBFILES = $(LIBBASEFILES) $(LIBC)
@@ -487,10 +509,6 @@ OBJOUT_FLAG = -Fo
EXEOUT_FLAG = -Fe
LIBOUT_FLAG = /out:
-.IF "$(USE_PERLCRT)" != "define"
-BUILDOPT += -DPERL_MSVCRT_READFIX
-.ENDIF
-
.ENDIF
CFLAGS_O = $(CFLAGS) $(BUILDOPT)
@@ -599,20 +617,24 @@ CFGH_TMPL = config_H.bc
CFGSH_TMPL = config.gc
CFGH_TMPL = config_H.gc
-PERLIMPLIB = ..\libperl57$(a)
+PERLIMPLIB = ..\libperl58$(a)
.ELSE
+.IF "$(WIN64)" == "define"
+CFGSH_TMPL = config.vc64
+CFGH_TMPL = config_H.vc64
+.ELSE
CFGSH_TMPL = config.vc
CFGH_TMPL = config_H.vc
+.ENDIF
.ENDIF
# makedef.pl must be updated if this changes, and this should normally
# only change when there is an incompatible revision of the public API.
-# XXX so why did we change it from perl56 to perl57?
-PERLIMPLIB *= ..\perl57$(a)
-PERLDLL = ..\perl57.dll
+PERLIMPLIB *= ..\perl58$(a)
+PERLDLL = ..\perl58.dll
XCOPY = xcopy /f /r /i /d
RCOPY = xcopy /f /r /i /e /d