{
$self->{'LDLOADLIBS'}
||= ( $BORLAND
- ? 'import32.lib cw32mti.lib '
+ ? 'import32.lib'
: # compiler adds msvcrtd?.lib according to debug switches
'oldnames.lib kernel32.lib comdlg32.lib winspool.lib gdi32.lib '
.'advapi32.lib user32.lib shell32.lib netapi32.lib ole32.lib '
- .'oleaut32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib '
- ) . ' odbc32.lib odbccp32.lib';
+ .'oleaut32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib'
+ ) . ' $(LIBC) odbc32.lib odbccp32.lib';
}
$self->{'DEV_NULL'} = '> NUL';
# $self->{'NOECHO'} = ''; # till we have it working
-# Makefile to build perl on Windowns NT using Microsoft NMAKE.
-# Works with MS command line compilers from VC++ etc.
+#
+# Makefile to build perl on Windows NT using Microsoft NMAKE.
#
# This is set up to build a perl.exe that runs off a shared library
# (perl.dll). Also makes individual DLLs for the XS extensions.
-# NB: Miniperl has a different set of objects it depends on than
-# perl.exe
-# Also, Miniperl will not build with -DPERL_OBJECT defined
+#
+
+##
+## Build configuration. Edit the values below to suit your needs.
+##
+
#
# Set these to wherever you want "nmake install" to put your
# newly built perl.
+#
INST_DRV = c:
INST_TOP = $(INST_DRV)\perl
+#
# Comment this out if you DON'T want your perl installation to be versioned.
# This means that the new installation will overwrite any files from the
# old installation at the same INST_TOP location. Leaving it enabled is
# locations it installs files to. If you disable it, an alternative
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
+#
INST_VER = \5.00467
#
# uncomment to enable threads-capabilities
+#
#USE_THREADS = define
#
# uncomment next line if you are using Visual C++ 2.x
+#
#CCTYPE = MSVC20
#
# uncomment next line if you want to use the perl object
# Currently, this cannot be enabled if you ask for threads above
+#
#OBJECT = -DPERL_OBJECT
#
# uncomment next line if you want debug version of perl (big,slow)
+#
#CFG = Debug
#
+# uncomment to enable use of PerlCRT.DLL. Highly recommended. It has
+# patches that fix known bugs in MSCVRT.DLL. You will need to download it
+# from: <TBD> and follow the directions in the package to install.
+#
+#USE_PERLCRT = define
+
+#
# if you have the source for des_fcrypt(), uncomment this and make sure the
# file exists (see README.win32). File should be located at the perl
# top level directory.
+#
#CRYPT_SRC = des_fcrypt.c
#
# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
# library, uncomment this, and make sure the library exists (see README.win32)
# Specify the full pathname of the library.
+#
#CRYPT_LIB = des_fcrypt.lib
#
# you may have compiled with/without it. Be prepared to recompile all extensions
# if you change the default. Currently, this cannot be enabled if you ask for
# PERL_OBJECT above.
+#
#PERL_MALLOC = define
#
#
# set this to your email address (perl will guess a value from
# from your loginname and your hostname, which may not be right)
+#
#EMAIL =
+##
+## Build configuration ends.
+##
+
##################### CHANGE THESE ONLY IF YOU MUST #####################
!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
SUBSYS = console
CXX_FLAG = -TP -GX
+!IF "$(USE_PERLCRT)" == ""
+! IF "$(CFG)" == "Debug"
+PERLCRTLIBC = msvcrtd.lib
+! ELSE
+PERLCRTLIBC = msvcrt.lib
+! ENDIF
+!ELSE
+! IF "$(CFG)" == "Debug"
+PERLCRTLIBC = PerlCRTD.lib
+! ELSE
+PERLCRTLIBC = PerlCRT.lib
+! ENDIF
+!ENDIF
+
!IF "$(RUNTIME)" == "-MD"
-LIBC = msvcrt.lib
+LIBC = $(PERLCRTLIBC)
!ELSE
LIBC = libcmt.lib
!ENDIF
OPTIMIZE = $(OPTIMIZE) $(CXX_FLAG)
!ENDIF
-# we don't add LIBC here, the compiler does it based on -MD/-MT
-LIBFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
+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
+# we add LIBC here, since we may be using PerlCRT.dll
+LIBFILES = $(LIBBASEFILES) $(LIBC)
+
CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
-LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
+LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
OBJOUT_FLAG = -Fo
EXEOUT_FLAG = -Fe
CFGSH_TMPL = config.vc
CFGH_TMPL = config_H.vc
+
+!IF "$(USE_PERLCRT)" == ""
PERL95EXE = ..\perl95.exe
+!ENDIF
XCOPY = xcopy /f /r /i /d
RCOPY = xcopy /f /r /i /e /d
copy splittree.pl ..
$(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
+!IF "$(USE_PERLCRT)" == ""
+
perl95.c : runperl.c
copy runperl.c perl95.c
$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
$(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
- $(LIBFILES) $(PERL95_OBJ) $(PERLIMPLIB) libcmt.lib
+ $(LIBBASEFILES) $(PERL95_OBJ) $(PERLIMPLIB) libcmt.lib
+
+!ENDIF
$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
if not exist $(AUTODIR) mkdir $(AUTODIR)
installbare : utils
$(PERLEXE) ..\installperl
+!IF "$(USE_PERLCRT)" == ""
$(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
+!ENDIF
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
$(XCOPY) bin\network.pl $(INST_LIB)\*.*
#
-# Makefile to build perl on Windowns NT using DMAKE.
+# Makefile to build perl on Windows NT using DMAKE.
# Supported compilers:
# Visual C++ 2.0 thro 5.0
# Borland C++ 5.02
-# Mingw32-0.1.4 with gcc-2.7.2
+# Mingw32 with gcc-2.8.1 or egcs-1.0.2
#
# This is set up to build a perl.exe that runs off a shared library
# (perl.dll). Also makes individual DLLs for the XS extensions.
#
+##
+## Build configuration. Edit the values below to suit your needs.
+##
+
#
# Set these to wherever you want "nmake install" to put your
# newly built perl.
+#
INST_DRV *= c:
INST_TOP *= $(INST_DRV)\perl
+#
# Comment this out if you DON'T want your perl installation to be versioned.
# This means that the new installation will overwrite any files from the
# old installation at the same INST_TOP location. Leaving it enabled is
# locations it installs files to. If you disable it, an alternative
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
+#
INST_VER *= \5.00467
#
# uncomment to enable threads-capabilities
+#
#USE_THREADS *= define
#
# uncomment one
+#
#CCTYPE *= MSVC20
#CCTYPE *= MSVC
CCTYPE *= BORLAND
#
# uncomment next line if you want to use the perl object
# Currently, this cannot be enabled if you ask for threads above
+#
#OBJECT *= -DPERL_OBJECT
#
# uncomment next line if you want debug version of perl (big,slow)
+#
#CFG *= Debug
#
+# uncomment to enable use of PerlCRT.DLL. Highly recommended. It has
+# patches that fix known bugs in MSCVRT.DLL. You will need to download it
+# from: <TBD> and follow the directions in the package to install.
+#
+#USE_PERLCRT *= define
+
+#
# if you have the source for des_fcrypt(), uncomment this and make sure the
# file exists (see README.win32). File should be located at the perl
# top level directory.
+#
#CRYPT_SRC *= des_fcrypt.c
#
# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
# library, uncomment this, and make sure the library exists (see README.win32)
# Specify the full pathname of the library.
+#
#CRYPT_LIB *= des_fcrypt.lib
#
# you may have compiled with/without it. Be prepared to recompile all extensions
# if you change the default. Currently, this cannot be enabled if you ask for
# PERL_OBJECT above.
+#
#PERL_MALLOC *= define
#
#
# set this to point to cmd.exe (only needed if you use some
# alternate shell that doesn't grok cmd.exe style commands)
+#
#SHELL *= g:\winnt\system32\cmd.exe
#
# set this to your email address (perl will guess a value from
# from your loginname and your hostname, which may not be right)
+#
#EMAIL *=
+##
+## Build configuration ends.
+##
+
##################### CHANGE THESE ONLY IF YOU MUST #####################
.IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
SUBSYS = console
CXX_FLAG = -TP -GX
+.IF "$(USE_PERLCRT)" == ""
+.IF "$(CFG)" == "Debug"
+PERLCRTLIBC = msvcrtd.lib
+.ELSE
+PERLCRTLIBC = msvcrt.lib
+.ENDIF
+.ELSE
+.IF "$(CFG)" == "Debug"
+PERLCRTLIBC = PerlCRTD.lib
+.ELSE
+PERLCRTLIBC = PerlCRT.lib
+.ENDIF
+.ENDIF
+
.IF "$(RUNTIME)" == "-MD"
-LIBC = msvcrt.lib
+LIBC = $(PERLCRTLIBC)
.ELSE
LIBC = libcmt.lib
.ENDIF
LINK_DBG = -release
.ENDIF
-# we don't add LIBC here, the compiler does it based on -MD/-MT
-LIBFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
+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
+# we add LIBC here, since we may be using PerlCRT.dll
+LIBFILES = $(LIBBASEFILES) $(LIBC)
+
CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
-LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
+LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
OBJOUT_FLAG = -Fo
EXEOUT_FLAG = -Fe
LIBOUT_FLAG = /out:
CFGSH_TMPL = config.vc
CFGH_TMPL = config_H.vc
+.IF "$(USE_PERLCRT)" == ""
PERL95EXE = ..\perl95.exe
+.ENDIF
.ENDIF
.IF "$(CCTYPE)" != "BORLAND"
.IF "$(CCTYPE)" != "GCC"
+.IF "$(USE_PERLCRT)" == ""
perl95.c : runperl.c
copy runperl.c perl95.c
$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
$(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
- $(LIBFILES) $(PERL95_OBJ) $(PERLIMPLIB) libcmt.lib
+ $(LIBBASEFILES) $(PERL95_OBJ) $(PERLIMPLIB) libcmt.lib
.ENDIF
.ENDIF
+.ENDIF
$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
if not exist $(AUTODIR) mkdir $(AUTODIR)