diff options
Diffstat (limited to 'win32/makefile.mk')
-rw-r--r-- | win32/makefile.mk | 58 |
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 |