X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fmakefile.mk;h=6722a5efcf3a25cecb43ab6ea75f0e678262a3b4;hb=5095244257e3c5d9389813ccbcd2187ff6e2e91f;hp=a8c5d78807da8ae576e792333e328a015c951a27;hpb=4ce4f76ea90ddd8879f53d5ef4d9ff6bb82eb5f0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/makefile.mk b/win32/makefile.mk index a8c5d78..6722a5e 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1,12 +1,12 @@ # # Makefile to build perl on Windows NT using DMAKE. # Supported compilers: -# Visual C++ 2.0 thro 5.0 +# Visual C++ 2.0 thro 6.0 # Borland C++ 5.02 -# Mingw32 with gcc-2.8.1 or egcs-1.0.2 **experimental** +# 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. # ## @@ -33,7 +33,7 @@ INST_TOP *= $(INST_DRV)\perl # versioned installation can be obtained by setting INST_TOP above to a # path that includes an arbitrary version string. # -INST_VER *= \5.00563 +INST_VER *= \5.6.0 # # Comment this out if you DON'T want your perl installation to have @@ -47,42 +47,45 @@ INST_VER *= \5.00563 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_THREADS *= define +#USE_MULTI *= define # -# XXX WARNING! This option currently undergoing changes. May be broken. -# -# uncomment to enable multiple interpreters +# Beginnings of interpreter cloning/threads; still very incomplete. +# This should be enabled to get the fork() emulation. This needs +# USE_MULTI as well. # -#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. Do not -# enable unless you know what you're doing! +# 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 is needed and auto-enabled by USE_OBJECT above. +# 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 @@ -94,9 +97,9 @@ INST_ARCH *= \$(ARCHNAME) # Visual C++ >= 6.x #CCTYPE *= MSVC60 # Borland 5.02 or later -CCTYPE *= BORLAND -# mingw32/egcs or mingw32/gcc -#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 @@ -111,13 +114,14 @@ CCTYPE *= BORLAND #CFG *= Debug # -# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler -# or GCC/Mingw32. Highly recommended. It has patches that fix known bugs in -# MSVCRT.DLL. This currently requires VC 5.0 with Service Pack 3 or later -# or GCC/Mingw32. +# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. +# It has patches that fix known bugs in older versions of MSVCRT.DLL. +# This currently requires VC 5.0 with Service Pack 3 or later. # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/ # and follow the directions in the package to install. # +# Not recommended if you have VC 6.x and you're not running Windows 9x. +# #USE_PERLCRT *= define # @@ -148,7 +152,7 @@ CCTYPE *= BORLAND # 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 @@ -159,30 +163,36 @@ CCTYPE *= BORLAND # so you may have to set CCHOME explicitly (spaces in the path name should # not be quoted) # -CCHOME *= d:\bc5 +#CCHOME *= c:\bc5 #CCHOME *= $(MSVCDIR) -#CCHOME *= D:\packages\mingw32 +CCHOME *= c:\gcc-2.95.2-msvcrt CCINCDIR *= $(CCHOME)\include CCLIBDIR *= $(CCHOME)\lib # -# additional compiler flags can be specified here. +# Additional compiler flags can be specified here. +# + # -# Adding -DPERL_POLLUTE enables support for old symbols, at the expense of -# extreme pollution. You most probably want this if you're compiling modules -# from CPAN, or other such serious uses of this experimental perl release. -# We don't enable this by default because we want the modules to get fixed -# instead of clinging to shortcuts like this one. +# This should normally be disabled. Adding -DPERL_POLLUTE enables support +# for old symbols by default, at the expense of extreme pollution. You most +# probably just want to build modules that won't compile with +# perl Makefile.PL POLLUTE=1 +# instead of enabling this. Please report such modules to the respective +# authors. # #BUILDOPT += -DPERL_POLLUTE # -# enable this to disable the File::Glob implementation of CORE::glob +# This should normally be disabled. Enabling it will disable the File::Glob +# implementation of CORE::glob. # #BUILDOPT += -DPERL_EXTERNAL_GLOB -# Enabling this runs a cloned toplevel interpreter (fails tests) -#BUILDOPT += -DTOP_CLONE +# +# This should normally be disabled. Enabling it causes perl to read scripts +# in text mode (which is the 5.005 behavior) and will break ByteLoader. +#BUILDOPT += -DPERL_TEXTMODE_SCRIPTS # # specify semicolon-separated list of extra directories that modules will @@ -217,30 +227,40 @@ CRYPT_FLAG = -DHAVE_DES_FCRYPT .IF "$(USE_OBJECT)" == "define" PERL_MALLOC != undef -USE_THREADS != undef +USE_5005THREADS != undef USE_MULTI != undef USE_IMP_SYS != define .ENDIF PERL_MALLOC *= undef -USE_THREADS *= undef +USE_5005THREADS *= undef -.IF "$(USE_THREADS)" == "define" +.IF "$(USE_5005THREADS)" == "define" USE_ITHREADS != undef .ENDIF +.IF "$(USE_IMP_SYS)" == "define" +PERL_MALLOC != undef +.ENDIF + USE_MULTI *= undef USE_OBJECT *= undef USE_ITHREADS *= undef USE_IMP_SYS *= undef +USE_PERLCRT *= undef -.IF "$(USE_MULTI)$(USE_THREADS)$(USE_OBJECT)" != "undefundefundef" -BUILDOPT += -DPERL_IMPLICIT_CONTEXT +.IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef" +USE_MULTI != define .ENDIF -.IF "$(USE_ITHREADS)" != "undef" -BUILDOPT += -DUSE_ITHREADS +.IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef" +USE_MULTI != define +USE_5005THREADS != undef +.ENDIF + +.IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef" +BUILDOPT += -DPERL_IMPLICIT_CONTEXT .ENDIF .IF "$(USE_IMP_SYS)" != "undef" @@ -253,7 +273,7 @@ PROCESSOR_ARCHITECTURE *= x86 .IF "$(USE_OBJECT)" == "define" ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object -.ELIF "$(USE_THREADS)" == "define" +.ELIF "$(USE_5005THREADS)" == "define" ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread .ELIF "$(USE_MULTI)" == "define" ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi @@ -261,12 +281,16 @@ ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi 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. -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. @@ -302,11 +326,11 @@ CC = bcc32 LINK32 = tlink32 LIB32 = tlib /P128 IMPLIB = implib -c +RSC = rc # # 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) @@ -318,10 +342,10 @@ LIBC = cw32mti.lib 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 @@ -338,6 +362,7 @@ CC = gcc LINK32 = gcc LIB32 = ar rc IMPLIB = dlltool +RSC = rc o = .o a = .a @@ -346,36 +371,26 @@ a = .a # Options # -# GCC headers need to know that we're using MSVCRT (or a clone thereof) -RUNTIME = -D__MSVCRT__ INCLUDES = -I$(COREDIR) -I.\include -I. -I.. DEFINES = -DWIN32 $(CRYPT_FLAG) LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console CXX_FLAG = -xc++ -.IF "$(USE_PERLCRT)" == "" -LIBCDLL = msvcrt.dll -CRTIMPLIBS = $(OLDNAMES_A) -.ELSE -LIBCDLL = PerlCRT.dll -CRTIMPLIBS = $(PERLCRT_A) $(OLDNAMES_A) -.ENDIF - -LIBC = -l$(LIBCDLL:s/.dll//) -GCCLIBS = -lmingw32 -lgcc +LIBC = -lmsvcrt -# same libs as MSVC, but no -luuid32 or -lodbccp32 yet -LIBFILES = $(GCCLIBS) $(CRYPT_LIB) $(LIBC) -loldnames -lkernel32 \ - -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 \ - -lole32 -loleaut32 -lnetapi32 -lwsock32 -lmpr -lwinmm \ - -lversion -lodbc32 +# same libs as MSVC +LIBFILES = $(CRYPT_LIB) $(LIBC) \ + -lmoldname -lkernel32 -luser32 -lgdi32 \ + -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \ + -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \ + -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 @@ -385,20 +400,20 @@ OBJOUT_FLAG = -o EXEOUT_FLAG = -o LIBOUT_FLAG = -# tack COREDIR on for perl build -PRIV_LINK_FLAGS = -L"$(COREDIR)" +# NOTE: we assume that GCC uses MSVCRT.DLL +BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX .ELSE CC = cl LINK32 = link LIB32 = $(LINK32) -lib +RSC = rc # # Options # -RUNTIME = -MD INCLUDES = -I$(COREDIR) -I.\include -I. -I.. #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) @@ -406,49 +421,38 @@ LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console CXX_FLAG = -TP -GX -.IF "$(USE_PERLCRT)" == "" -.IF "$(CFG)" == "Debug" -PERLCRTLIBC = msvcrtd.lib -.ELSE -PERLCRTLIBC = msvcrt.lib -.ENDIF +.IF "$(USE_PERLCRT)" != "define" +LIBC = msvcrt.lib .ELSE -.IF "$(CFG)" == "Debug" -PERLCRTLIBC = PerlCRTD.lib -.ELSE -PERLCRTLIBC = PerlCRT.lib -.ENDIF +LIBC = PerlCRT.lib .ENDIF -.IF "$(RUNTIME)" == "-MD" -LIBC = $(PERLCRTLIBC) -.ELSE -LIBC = libcmt.lib -.ENDIF +PERLEXE_RES = +PERLDLL_RES = .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) \ - 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 +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) @@ -462,6 +466,10 @@ OBJOUT_FLAG = -Fo EXEOUT_FLAG = -Fe LIBOUT_FLAG = /out: +.IF "$(USE_PERLCRT)" != "define" +BUILDOPT += -DPERL_MSVCRT_READFIX +.ENDIF + .ENDIF .IF "$(USE_OBJECT)" == "define" @@ -469,16 +477,11 @@ OPTIMIZE += $(CXX_FLAG) BUILDOPT += -DPERL_OBJECT .ENDIF -CRTIMPLIBS *= __not_needed -PERLCRT_A *= $(COREDIR)\libPerlCRT.a -PERLCRT_DEF *= PerlCRT.def -OLDNAMES_A *= $(COREDIR)\liboldnames.a -OLDNAMES_DEF *= oldnames.def - CFLAGS_O = $(CFLAGS) $(BUILDOPT) -# used to allow local linking flags that are not propogated into Config.pm -# -- BKS, 11-15-1999 +# used to allow local linking flags that are not propogated into Config.pm, +# currently unused +# -- BKS, 12-12-1999 PRIV_LINK_FLAGS *= BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) @@ -495,7 +498,7 @@ LKPOST = ) # Rules # -.SUFFIXES : .c $(o) .dll $(a) .exe +.SUFFIXES : .c $(o) .dll $(a) .exe .rc .res .c$(o): $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< @@ -509,12 +512,15 @@ $(o).dll: $(IMPLIB) $(*B).lib $@ .ELIF "$(CCTYPE)" == "GCC" $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES) - $(IMPLIB) -def $(*B).def $(*B).a $@ + $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@ .ELSE $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL) .ENDIF +.rc.res: + $(RSC) -i.. $< + # # various targets MINIPERL = ..\miniperl.exe @@ -549,6 +555,7 @@ UTILS = \ ..\pod\podselect \ ..\x2p\find2perl \ ..\x2p\s2p \ + bin\exetype.pl \ bin\runperl.pl \ bin\pl2bat.pl \ bin\perlglob.pl \ @@ -563,29 +570,17 @@ CFGH_TMPL = config_H.bc 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)" == "" -PERL95EXE = ..\perl95.exe -.ENDIF .ENDIF -.IF "$(USE_OBJECT)" == "define" PERLIMPLIB *= ..\perl56$(a) PERLDLL = ..\perl56.dll -.ELSE -PERLIMPLIB *= ..\perl$(a) -PERLDLL = ..\perl.dll -.ENDIF XCOPY = xcopy /f /r /i /d RCOPY = xcopy /f /r /i /e /d @@ -639,25 +634,13 @@ EXTRACORE_SRC += ..\perlio.c WIN32_SRC = \ .\win32.c \ - .\win32sck.c - -.IF "$(USE_THREADS)" == "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 = \ @@ -705,10 +688,7 @@ CORE_NOCFG_H = \ .\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 @@ -718,19 +698,12 @@ WIN32_OBJ = $(WIN32_SRC:db:+$(o)) 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)) PERLDLL_OBJ = $(CORE_OBJ) PERLEXE_OBJ = perlmain$(o) -.IF "$(CCTYPE)" == "GCC" -PERLEXE_OBJ += .\gcrt0$(o) -MINI_OBJ += $(MINIDIR)\gcrt0$(o) -DLL_OBJ += .\gdllcrt0$(o) -.ENDIF - PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ) .IF "$(USE_SETARGV)" != "" @@ -738,7 +711,8 @@ SETARGV_OBJ = setargv$(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 @@ -759,6 +733,7 @@ PEEK = $(EXTDIR)\Devel\Peek\Peek 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 @@ -775,6 +750,7 @@ RE_DLL = $(AUTODIR)\re\re.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 @@ -793,7 +769,8 @@ EXTENSION_C = \ $(B).c \ $(BYTELOADER).c \ $(DPROF).c \ - $(GLOB).c + $(GLOB).c \ + $(HOSTNAME).c EXTENSION_DLL = \ $(SOCKET_DLL) \ @@ -810,7 +787,8 @@ EXTENSION_DLL = \ $(THREAD_DLL) \ $(BYTELOADER_DLL) \ $(DPROF_DLL) \ - $(GLOB_DLL) + $(GLOB_DLL) \ + $(HOSTNAME_DLL) EXTENSION_PM = \ $(ERRNO_PM) @@ -826,7 +804,7 @@ POD2TEXT = $(PODDIR)\pod2text # -- 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) ~ \ @@ -836,9 +814,9 @@ CFG_VARS = \ 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) ~ \ @@ -846,7 +824,9 @@ CFG_VARS = \ static_ext=$(STATIC_EXT) ~ \ dynamic_ext=$(DYNAMIC_EXT) ~ \ nonxs_ext=$(NONXS_EXT) ~ \ - usethreads=$(USE_THREADS) ~ \ + use5005threads=$(USE_5005THREADS) ~ \ + useithreads=$(USE_ITHREADS) ~ \ + usethreads=$(USE_5005THREADS) ~ \ usemultiplicity=$(USE_MULTI) ~ \ LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \ optimize=$(OPTIMIZE) @@ -868,8 +848,8 @@ RIGHTMAKE = __not_needed # Top targets # -all : $(CRTIMPLIBS) .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \ - $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \ +all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \ + $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \ $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM) $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c @@ -880,7 +860,7 @@ $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c # this target is a jump-off point for Win95 # 1. it switches to the Win95-specific makefile if it exists -# (__do_switc_makefiles) +# (__do_switch_makefiles) # 2. it prints a message when the Win95-specific one finishes (__done) # 3. it then kills this makefile by trying to make __no_such_target @@ -916,36 +896,6 @@ __no_such_target: #--------------------- END Win95 SPECIFIC --------------------- -#--------------------- BEGIN GCC/Mingw32 SPECIFIC ------------- - -# make GCC-ish implib for PerlCRT.dll if needed -$(PERLCRT_A): $(PERLCRT_DEF) - if not exist $(COREDIR) mkdir $(COREDIR) - $(IMPLIB) --def $(PERLCRT_DEF) \ - --dllname $(LIBCDLL) \ - --output-lib $(PERLCRT_A) - -# make GCC-ish oldnames implib for our CRT (whether it's MSVCRT or PerlCRT) -$(OLDNAMES_A): $(OLDNAMES_DEF) - $(IMPLIB) --def $(OLDNAMES_DEF) \ - --dllname $(LIBCDLL) \ - --output-lib $(OLDNAMES_A) \ - --add-underscore - -# MSVCRT-using runtime startup files -$(MINIDIR)\gcrt0$(o): .\gstartup.c - $(CC) -c $(CFLAGS) -DEXESTARTUP $(OBJOUT_FLAG)$@ .\gstartup.c - -.\gcrt0$(o): .\gstartup.c - $(CC) -c $(CFLAGS) -DEXESTARTUP $(OBJOUT_FLAG)$@ .\gstartup.c - -.\gdllcrt0$(o): .\gstartup.c - $(CC) -c $(CFLAGS) -DDLLSTARTUP $(OBJOUT_FLAG)$@ .\gstartup.c - $(XCOPY) $@ $(COREDIR) - - -#--------------------- END GCC/Mingw32 SPECIFIC --------------- - # a blank target for when builds don't need to do certain things # this target added for Win95 port but used to keep the WinNT port able to # use this file @@ -958,7 +908,7 @@ $(GLOBEXE) : perlglob$(o) $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \ "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib, .ELIF "$(CCTYPE)" == "GCC" - $(LINK32) $(BLINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES) + $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES) .ELSE $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ perlglob$(o) setargv$(o) @@ -981,7 +931,8 @@ config.w32 : $(CFGSH_TMPL) # edit config.{b,v,g}c and make this target once for each supported # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`) regen_config_h: - perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh + perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \ + $(CFGSH_TMPL) > ..\config.sh -cd .. && del /f perl.exe cd .. && perl configpm -del /f $(CFGH_TMPL) @@ -1004,7 +955,7 @@ $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) .ELIF "$(CCTYPE)" == "GCC" - $(LINK32) -v -nostdlib -o $@ $(BLINK_FLAGS) \ + $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) .ELSE $(LINK32) -subsystem:console -out:$@ \ @@ -1021,9 +972,15 @@ $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).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. +# 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" -perllib$(o) : perllib.c $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c +.ELSE + $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c .ENDIF # 1. we don't want to rebuild miniperl.exe when config.h changes @@ -1033,35 +990,35 @@ $(MINI_OBJ) : $(CORE_NOCFG_H) $(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 - $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \ - CCTYPE=$(CCTYPE) > perldll.def + $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \ + $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def -$(PERLDLL): perldll.def $(PERLDLL_OBJ) +$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) .IF "$(CCTYPE)" == "BORLAND" - $(LINK32) -Tpd -ap $(LINK_FLAGS) \ + $(LINK32) -Tpd -ap $(BLINK_FLAGS) \ @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \ $@,\n \ $(LIBFILES)\n \ perldll.def\n) $(IMPLIB) $*.lib $@ .ELIF "$(CCTYPE)" == "GCC" - $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \ + $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) dlltool --output-lib $(PERLIMPLIB) \ - --dllname $(PERLDLL:b).dll \ - --def perldll.def \ - --base-file perl.base \ - --output-exp perl.exp - $(LINK32) -mdll -o $@ $(LINK_FLAGS) \ + --dllname $(PERLDLL:b).dll \ + --def perldll.def \ + --base-file perl.base \ + --output-exp perl.exp + $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \ perl.exp $(LKPOST)) .ELSE $(LINK32) -dll -def:perldll.def -out:$@ \ - @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\)) + @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \ + $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\)) .ENDIF $(XCOPY) $(PERLIMPLIB) $(COREDIR) @@ -1103,55 +1060,24 @@ perlmain.c : runperl.c perlmain$(o) : perlmain.c $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c -$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) +$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) .IF "$(CCTYPE)" == "BORLAND" $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \ $(@:s,\,\\),\n \ $(PERLIMPLIB) $(LIBFILES)\n) .ELIF "$(CCTYPE)" == "GCC" - $(LINK32) -nostdlib -o $@ $(BLINK_FLAGS) \ + $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES) .ELSE - $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) $(LIBFILES) \ - $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) - 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)" == "" - -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 @@ -1234,6 +1160,11 @@ $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs ..\..\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 @@ -1251,12 +1182,20 @@ doc: $(PERLEXE) 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 + cd ..\lib && $(PERLEXE) lib_pm.PL $(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) @@ -1282,9 +1221,6 @@ distclean: clean -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 @@ -1295,9 +1231,6 @@ install : all installbare installhtml 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)\*.* @@ -1336,7 +1269,16 @@ test : $(RIGHTMAKE) test-prep 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)