# Mingw32 with gcc-2.95.2 or better **experimental**
#
# 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.
+# (perl56.dll). Also makes individual DLLs for the XS extensions.
#
##
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-INST_VER *= \5.5.640
+INST_VER *= \5.6.0
#
# Comment this out if you DON'T want your perl installation to have
INST_ARCH *= \$(ARCHNAME)
#
-# XXX WARNING! This option currently undergoing changes. May be broken.
+# uncomment to enable multiple interpreters. This is need for fork()
+# emulation.
#
-# uncomment to enable threads-capabilities
-#
-#USE_5005THREADS *= define
+#USE_MULTI *= define
#
-# XXX WARNING! This option currently undergoing changes. May be broken.
+# Beginnings of interpreter cloning/threads; still very incomplete.
+# This should be enabled to get the fork() emulation. This needs
+# USE_MULTI as well.
#
-# uncomment to enable multiple interpreters
-#
-#USE_MULTI *= define
+#USE_ITHREADS *= define
#
-# XXX WARNING! This option currently undergoing changes. May be broken.
-#
-# uncomment next line if you want to use the perl object
-# Currently, this cannot be enabled if you ask for threads above, or
-# if you are using GCC or EGCS.
+# uncomment to enable the implicit "host" layer for all system calls
+# made by perl. This needs USE_MULTI above. This is also needed to
+# get fork().
#
-#USE_OBJECT *= define
+#USE_IMP_SYS *= define
#
-# XXX WARNING! This option currently undergoing changes. May be broken.
+# WARNING! This option is deprecated and will eventually go away (enable
+# USE_ITHREADS instead).
#
-# Beginnings of interpreter cloning/threads: still rather rough, fails
-# tests. This should be enabled to get the fork() emulation. This needs
-# one of USE_MULTI or USE_OBJECT enabled as well.
+# uncomment to enable threads-capabilities. This is incompatible with
+# USE_ITHREADS, and is only here for people who may have come to rely
+# on the experimental Thread support that was in 5.005.
#
-#USE_ITHREADS *= define
+#USE_5005THREADS *= define
#
-# uncomment to enable the implicit "host" layer for all system calls
-# made by perl. This needs one of USE_MULTI or USE_OBJECT above.
-# This is also needed to get fork().
+# WARNING! This option is deprecated and will eventually go away (enable
+# USE_MULTI instead).
#
-#USE_IMP_SYS *= define
+# uncomment next line if you want to use the PERL_OBJECT build option.
+# DO NOT ENABLE unless you have legacy code that relies on the C++
+# CPerlObj class that was available in 5.005. This cannot be enabled
+# if you ask for USE_5005THREADS above.
+#
+#USE_OBJECT *= define
#
# uncomment exactly one of the following
# Visual C++ >= 6.x
#CCTYPE *= MSVC60
# Borland 5.02 or later
-CCTYPE *= BORLAND
-# mingw32/gcc-2.95.2 or better
-#CCTYPE *= GCC
+#CCTYPE *= BORLAND
+# mingw32+gcc-2.95.2 or better
+CCTYPE *= GCC
#
# uncomment this if you are compiling under Windows 95/98 and command.com
# WARNING: Turning this on/off WILL break binary compatibility with extensions
# 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 USE_OBJECT above.
+# if you ask for USE_IMP_SYS above.
#
#PERL_MALLOC *= define
# so you may have to set CCHOME explicitly (spaces in the path name should
# not be quoted)
#
-CCHOME *= c:\bc5
+#CCHOME *= c:\bc5
#CCHOME *= $(MSVCDIR)
-#CCHOME *= D:\packages\mingw32
+CCHOME *= c:\gcc-2.95.2-msvcrt
CCINCDIR *= $(CCHOME)\include
CCLIBDIR *= $(CCHOME)\lib
#BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
#
-# This should normally be disabled. Enabling it runs a cloned toplevel
-# interpreter (*EXPERIMENTAL*, fails tests)
-#BUILDOPT += -DTOP_CLONE
-
-#
# specify semicolon-separated list of extra directories that modules will
# look for libraries (spaces in path names need not be quoted)
#
USE_ITHREADS != undef
.ENDIF
+.IF "$(USE_IMP_SYS)" == "define"
+PERL_MALLOC != undef
+.ENDIF
+
USE_MULTI *= undef
USE_OBJECT *= undef
USE_ITHREADS *= undef
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
.ENDIF
-.IF "$(USE_OBJECT)" == "define"
-ARCHNAME = $(ARCHNAME)-thread
+.IF "$(USE_ITHREADS)" == "define"
+ARCHNAME !:= $(ARCHNAME)-thread
.ENDIF
# Visual Studio 98 specific
# VC 6.0 can load the socket dll on demand. Makes the test suite
# run in about 10% less time.
-DELAYLOAD *= -DELAYLOAD:wsock32.dll delayimp.lib
+DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
# VC 6.0 seems capable of compiling perl correctly with optimizations
# enabled. Anything earlier fails tests.
#
# Options
#
-RUNTIME = -D_RTLDLL
INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
DEFINES = -DWIN32 $(CRYPT_FLAG)
LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib
.IF "$(CFG)" == "Debug"
-OPTIMIZE = -v $(RUNTIME) -DDEBUGGING
+OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
LINK_DBG = -v
.ELSE
-OPTIMIZE = -O2 $(RUNTIME)
+OPTIMIZE = -O2 -D_RTLDLL
LINK_DBG =
.ENDIF
# Options
#
-RUNTIME =
INCLUDES = -I$(COREDIR) -I.\include -I. -I..
DEFINES = -DWIN32 $(CRYPT_FLAG)
LOCDEFS = -DPERLDLL -DPERL_CORE
-lwinmm -lversion -lodbc32
.IF "$(CFG)" == "Debug"
-OPTIMIZE = -g $(RUNTIME) -DDEBUGGING
+OPTIMIZE = -g -DDEBUGGING
LINK_DBG = -g
.ELSE
-OPTIMIZE = -g -O2 $(RUNTIME)
+OPTIMIZE = -g -O2
LINK_DBG =
.ENDIF
EXEOUT_FLAG = -o
LIBOUT_FLAG =
+# NOTE: we assume that GCC uses MSVCRT.DLL
+BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
+
.ELSE
CC = cl
# Options
#
-RUNTIME = -MD
INCLUDES = -I$(COREDIR) -I.\include -I. -I..
#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
CXX_FLAG = -TP -GX
.IF "$(USE_PERLCRT)" != "define"
-.IF "$(CFG)" == "Debug"
-PERLCRTLIBC = msvcrtd.lib
-.ELSE
-PERLCRTLIBC = msvcrt.lib
-.ENDIF
-.ELSE
-.IF "$(CFG)" == "Debug"
-PERLCRTLIBC = PerlCRTD.lib
+LIBC = msvcrt.lib
.ELSE
-PERLCRTLIBC = PerlCRT.lib
-.ENDIF
+LIBC = PerlCRT.lib
.ENDIF
PERLEXE_RES =
PERLDLL_RES =
-.IF "$(RUNTIME)" == "-MD"
-LIBC = $(PERLCRTLIBC)
-.ELSE
-LIBC = libcmt.lib
-.ENDIF
-
.IF "$(CFG)" == "Debug"
.IF "$(CCTYPE)" == "MSVC20"
-OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
+OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
.ELSE
-OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
+OPTIMIZE = -Od -MD -Zi -DDEBUGGING
.ENDIF
LINK_DBG = -debug -pdb:none
.ELSE
.IF "$(CFG)" == "Optimize"
# -O1 yields smaller code, which turns out to be faster than -O2
-#OPTIMIZE = -O2 $(RUNTIME) -DNDEBUG
-OPTIMIZE = -O1 $(RUNTIME) -DNDEBUG
+#OPTIMIZE = -O2 -MD -DNDEBUG
+OPTIMIZE = -O1 -MD -DNDEBUG
.ELSE
-OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
+OPTIMIZE = -Od -MD -DNDEBUG
.ENDIF
LINK_DBG = -release
.ENDIF
-LIBBASEFILES = $(DELAYLOAD) $(CRYPT_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 \
.ENDIF
.rc.res:
- $(RSC) $<
+ $(RSC) -i.. $<
#
# various targets
..\pod\podselect \
..\x2p\find2perl \
..\x2p\s2p \
+ bin\exetype.pl \
bin\runperl.pl \
bin\pl2bat.pl \
bin\perlglob.pl \
CFGSH_TMPL = config.gc
CFGH_TMPL = config_H.gc
-.IF "$(USE_OBJECT)" == "define"
-PERLIMPLIB = ..\libperlcore$(a)
-.ELSE
-PERLIMPLIB = ..\libperl$(a)
-.ENDIF
+PERLIMPLIB = ..\libperl56$(a)
.ELSE
CFGSH_TMPL = config.vc
CFGH_TMPL = config_H.vc
-.IF "$(USE_PERLCRT)" != "define"
-PERL95EXE = ..\perl95.exe
-.ENDIF
.ENDIF
WIN32_SRC = \
.\win32.c \
- .\win32sck.c
-
-.IF "$(USE_5005THREADS)" == "define"
-WIN32_SRC += .\win32thread.c
-.ENDIF
+ .\win32sck.c \
+ .\win32thread.c
.IF "$(CRYPT_SRC)" != ""
WIN32_SRC += .\$(CRYPT_SRC)
.ENDIF
-PERL95_SRC = \
- perl95.c \
- win32mt.c \
- win32sckmt.c
-
-.IF "$(CRYPT_SRC)" != ""
-PERL95_SRC += .\$(CRYPT_SRC)
-.ENDIF
-
DLL_SRC = $(DYNALOADER).c
X2P_SRC = \
.\include\dirent.h \
.\include\netdb.h \
.\include\sys\socket.h \
- .\win32.h \
- .\perlhost.h \
- .\vdir.h \
- .\vmem.h
+ .\win32.h
CORE_H = $(CORE_NOCFG_H) .\config.h
MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
-PERL95_OBJ = $(PERL95_SRC:db:+$(o))
DLL_OBJ = $(DLL_SRC:db:+$(o))
X2P_OBJ = $(X2P_SRC:db:+$(o))
.ENDIF
DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
- Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob
+ Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
+ Sys/Hostname
STATIC_EXT = DynaLoader
NONXS_EXT = Errno
BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
DPROF = $(EXTDIR)\Devel\DProf\DProf
GLOB = $(EXTDIR)\File\Glob\Glob
+HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
+HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
ERRNO_PM = $(LIBDIR)\Errno.pm
$(B).c \
$(BYTELOADER).c \
$(DPROF).c \
- $(GLOB).c
+ $(GLOB).c \
+ $(HOSTNAME).c
EXTENSION_DLL = \
$(SOCKET_DLL) \
$(THREAD_DLL) \
$(BYTELOADER_DLL) \
$(DPROF_DLL) \
- $(GLOB_DLL)
+ $(GLOB_DLL) \
+ $(HOSTNAME_DLL)
EXTENSION_PM = \
$(ERRNO_PM)
# -- BKS 10-17-1999
CFG_VARS = \
INST_DRV=$(INST_DRV) ~ \
- INST_TOP=$(INST_TOP) ~ \
+ INST_TOP=$(INST_TOP:s/\/\\/) ~ \
INST_VER=$(INST_VER:s/\/\\/) ~ \
INST_ARCH=$(INST_ARCH) ~ \
archname=$(ARCHNAME) ~ \
d_crypt=$(D_CRYPT) ~ \
d_mymalloc=$(PERL_MALLOC) ~ \
libs=$(LIBFILES:f) ~ \
- incpath=$(CCINCDIR) ~ \
+ incpath=$(CCINCDIR:s/\/\\/) ~ \
libperl=$(PERLIMPLIB:f) ~ \
- libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
+ libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \
libc=$(LIBC) ~ \
make=dmake ~ \
_o=$(o) obj_ext=$(o) ~ \
#
all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
- $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
+ $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
$(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
# rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
-# unless the .IF is true), so instead we use a .ELSE with the default
-perllib$(o) : perllib.c
+# unless the .IF is true), so instead we use a .ELSE with the default.
+# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
+
+perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
.IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
.ELSE
$(WIN32_OBJ) : $(CORE_H)
$(CORE_OBJ) : $(CORE_H)
$(DLL_OBJ) : $(CORE_H)
-$(PERL95_OBJ) : $(CORE_H)
$(X2P_OBJ) : $(CORE_H)
perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
perl.exp $(LKPOST))
.ELSE
$(LINK32) -dll -def:perldll.def -out:$@ \
- @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\))
+ @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
+ $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\))
.ENDIF
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
$(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
$(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
.ELSE
- $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) $(LIBFILES) \
- $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
- copy $(PERLEXE) $(WPERLEXE)
- editbin /subsystem:windows $(WPERLEXE)
+ $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
+ $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
.ENDIF
+ copy $(PERLEXE) $(WPERLEXE)
+ $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
copy splittree.pl ..
$(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
-.IF "$(CCTYPE)" != "BORLAND"
-.IF "$(CCTYPE)" != "GCC"
-.IF "$(USE_PERLCRT)" != "define"
-
-perl95.c : runperl.c
- copy runperl.c perl95.c
-
-perl95$(o) : perl95.c
- $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
-
-win32sckmt$(o) : win32sck.c
- $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
- $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
-
-win32mt$(o) : win32.c
- $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
- $(OBJOUT_FLAG)win32mt$(o) win32.c
-
-DynaLoadmt$(o) : $(DYNALOADER).c
- $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
- $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
-
-$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
- $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(BLINK_FLAGS) \
- $(LIBBASEFILES) $(PERL95_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) \
- libcmt.lib
-
-.ENDIF
-.ENDIF
-.ENDIF
-
$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
if not exist $(AUTODIR) mkdir $(AUTODIR)
cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
cd $(EXTDIR)\$(*B) && $(MAKE)
+$(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs
+ cd $(EXTDIR)\Sys\$(*B) && \
+ ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
+ cd $(EXTDIR)\Sys\$(*B) && $(MAKE)
+
$(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
cd $(EXTDIR)\$(*B) && \
..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
utils: $(PERLEXE) $(X2P)
cd ..\utils && $(MAKE) PERL=$(MINIPERL)
- copy ..\README.win32 ..\pod\perlwin32.pod
+ copy ..\README.amiga ..\pod\perlamiga.pod
+ copy ..\README.cygwin ..\pod\perlcygwin.pod
+ copy ..\README.dos ..\pod\perldos.pod
+ copy ..\README.hpux ..\pod\perlhpux.pod
+ copy ..\README.machten ..\pod\perlmachten.pod
+ copy ..\README.os2 ..\pod\perlos2.pod
+ copy ..\README.os2 ..\pod\perlos2.pod
+ copy ..\vms\perlvms.pod ..\pod\perlvms.pod
cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
$(PERLEXE) $(PL2BAT) $(UTILS)
distclean: clean
- -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
+ -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
$(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
-del /f *.def *.map
-del /f $(EXTENSION_DLL) $(EXTENSION_PM)
-cd ..\x2p && del /f find2perl s2p *.bat
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
-del /f $(CONFIGPM)
-.IF "$(PERL95EXE)" != ""
- -del /f perl95.c
-.ENDIF
-del /f bin\*.bat
-cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
pm_to_blib
installbare : $(RIGHTMAKE) utils
$(PERLEXE) ..\installperl
-.IF "$(PERL95EXE)" != ""
- $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
-.ENDIF
if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
test-notty : test-prep
set PERL_SKIP_TTY_TEST=1 && \
- cd ..\t && $(PERLEXE) -I.\lib harness
+ cd ..\t && $(PERLEXE) -I.\lib harness
+
+test-wide : test-prep
+ set HARNESS_PERL_SWITCHES=-C && \
+ cd ..\t && $(PERLEXE) -I..\lib harness
+
+test-wide-notty : test-prep
+ set PERL_SKIP_TTY_TEST=1 && \
+ set HARNESS_PERL_SWITCHES=-C && \
+ cd ..\t && $(PERLEXE) -I..\lib harness
clean :
-@erase miniperlmain$(o)