# Visual C++ > 2.x and < 6.x
#CCTYPE *= MSVC
# Visual C++ >= 6.x
-CCTYPE *= MSVC60
+#CCTYPE *= MSVC60
# Borland 5.02 or later
#CCTYPE *= BORLAND
-# mingw32+gcc-2.95.2 or better
-#CCTYPE *= GCC
-# Uncomment this if you are using the latest MinGW release (2.0.0)
-# with gcc3.2
-#USE_GCC_V3_2 *= define
+# MinGW with gcc-2.95.2 or later
+CCTYPE *= GCC
#
# uncomment this if your Borland compiler is older than v5.4.
#PERL_MALLOC *= define
#
+# set this to enable debugging mstats
+# This must be enabled to use the Devel::Peek::mstat() function. This cannot
+# be enabled without PERL_MALLOC as well.
+#
+#DEBUG_MSTATS *= define
+
+#
# set the install locations of the compiler include/libraries
# Running VCVARS32.BAT is *required* when using Visual C.
# Some versions of Visual C don't define MSVCDIR in the environment,
.ENDIF
PERL_MALLOC *= undef
+DEBUG_MSTATS *= undef
USE_MULTI *= undef
USE_ITHREADS *= undef
USE_LARGE_FILES *= undef
USE_PERLCRT *= undef
-.IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
+.IF "$(USE_IMP_SYS)" == "define"
+PERL_MALLOC = undef
+.ENDIF
+
+.IF "$(PERL_MALLOC)" == "undef"
+DEBUG_MSTATS = undef
+.ENDIF
+
+.IF "$(DEBUG_MSTATS)" == "define"
+BUILDOPT += -DPERL_DEBUGGING_MSTATS
+.ENDIF
+
+.IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
USE_MULTI != define
.ENDIF
-.IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
+.IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
USE_MULTI != define
.ENDIF
# VC 6.0 can load the socket dll on demand. Makes the test suite
# run in about 10% less time.
-DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
+DELAYLOAD *= -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
.IF "$(CFG)" == "Debug"
.ELSE
CC = gcc
LINK32 = g++
-.IF "$(USE_GCC_V3_2)" == "define"
-LINK32 = g++
-.END
LIB32 = ar rc
IMPLIB = dlltool
RSC = windres
LIBFILES = $(CRYPT_LIB) $(LIBC) \
-lmoldname -lkernel32 -luser32 -lgdi32 \
-lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
- -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \
+ -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
-lwinmm -lversion -lodbc32
.IF "$(CFG)" == "Debug"
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 \
+ netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
version.lib
# win64 doesn't have some libs
#################### do not edit below this line #######################
############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
+# Some dmake's built with Borland C++, including Sarathy's one at:
+# http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip
+# require backslashes to be doubled-up when written to $(mktmp) files.
+# Other dmake's do not require this and would actually output a double
+# backslash if they were doubled-up.
+.IF "$(shell type $(mktmp \\))"=="\\"
+B=\\
+.ELSE
+B=\\\
+.ENDIF
+
o *= .obj
a *= .lib
PERLEXE = ..\perl.exe
WPERLEXE = ..\wperl.exe
GLOBEXE = ..\perlglob.exe
-CONFIGPM = ..\lib\Config.pm
+CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
MINIMOD = ..\lib\ExtUtils\Miniperl.pm
X2P = ..\x2p\a2p.exe
# Unicode data files generated by mktables
UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
- ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl
+ ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
+ ..\lib\unicore\PVA.pl
# Directories of Unicode data files generated by mktables
-UNIDATADIRS = ..\lib\unicore\To ..\lib\unicore\lib
+UNIDATADIR1 = ..\lib\unicore\To
+UNIDATADIR2 = ..\lib\unicore\lib
PERLEXE_ICO = .\perlexe.ico
PERLEXE_RES = .\perlexe.res
..\utils\libnetcfg \
..\utils\enc2xs \
..\utils\piconv \
+ ..\utils\corelist \
..\utils\cpan \
..\utils\xsubpp \
..\utils\prove \
XCOPY = xcopy /f /r /i /d
RCOPY = xcopy /f /r /i /e /d
-NOOP = @echo
+NOOP = @echo.
#
# filenames given to xsubpp must have forward slashes (since it puts
Sys/Hostname Storable Filter/Util/Call Encode \
Digest/MD5 PerlIO/scalar MIME/Base64 Time/HiRes \
Unicode/Normalize Win32
-STATIC_EXT = DynaLoader
+STATIC_EXT =
NONXS_EXT = Errno
DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
# -- BKS 10-17-1999
CFG_VARS = \
INST_DRV=$(INST_DRV) ~ \
- INST_TOP=$(INST_TOP:s/\/\\/) ~ \
- INST_VER=$(INST_VER:s/\/\\/) ~ \
+ INST_TOP=$(INST_TOP:s,\,$B,) ~ \
+ INST_VER=$(INST_VER:s,\,$B,) ~ \
INST_ARCH=$(INST_ARCH) ~ \
archname=$(ARCHNAME) ~ \
cc=$(CC) ~ \
d_crypt=$(D_CRYPT) ~ \
d_mymalloc=$(PERL_MALLOC) ~ \
libs=$(LIBFILES:f) ~ \
- incpath=$(CCINCDIR:s/\/\\/) ~ \
+ incpath=$(CCINCDIR:s,\,$B,) ~ \
libperl=$(PERLIMPLIB:f) ~ \
- libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \
+ libpth=$(CCLIBDIR:s,\,$B,);$(EXTRALIBDIRS:s,\,$B,) ~ \
libc=$(LIBC) ~ \
make=dmake ~ \
_o=$(o) ~ \
usemultiplicity=$(USE_MULTI) ~ \
useperlio=$(USE_PERLIO) ~ \
uselargefiles=$(USE_LARGE_FILES) ~ \
- LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \
+ LINK_FLAGS=$(LINK_FLAGS:s,\,$B,) ~ \
optimize=$(OPTIMIZE)
#
perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
.IF "$(USE_IMP_SYS)" == "define"
- $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
+ $(CC) -c -I. -DWITH_STATIC $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
.ELSE
- $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
+ $(CC) -c -I. -DWITH_STATIC $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
.ENDIF
# 1. we don't want to rebuild miniperl.exe when config.h changes
$(X2P_OBJ) : $(CORE_H)
perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
+ $(MINIPERL) -I..\lib buildext.pl --create-perllibst-h
$(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
$(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
-$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
+$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpd -ap $(BLINK_FLAGS) \
@$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
$(IMPLIB) $*.lib $@
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
- $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
+ $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) \
+ $(shell $(MINIPERL) -I..\lib buildext.pl --list-static-libs|tr \\\\ /) \
+ $(LIBFILES) $(LKPOST))
dlltool --output-lib $(PERLIMPLIB) \
--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))
+ $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) \
+ $(shell $(MINIPERL) -I..\lib buildext.pl --list-static-libs|tr \\\\ /) \
+ $(LIBFILES) perl.exp $(LKPOST))
.ELSE
$(LINK32) -dll -def:perldll.def -out:$@ \
+ $(shell $(MINIPERL) -I..\lib buildext.pl --list-static-libs) \
@$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
$(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\))
.ENDIF
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
+
$(PERLEXE_ICO): $(MINIPERL) makeico.pl
$(MINIPERL) makeico.pl > $@
#----------------------------------------------------------------------------------
Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
- $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
- $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext
+ $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic
+ $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic
+
+Extensions_static : buildext.pl
+ $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static
+ $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static
# Note: The next two targets explicitly remove a "blibdirs.exists" file that
# currerntly gets left behind, until CPAN RT Ticket #5616 is resolved.
# Note that the pod cleanup in this next section is parsed (and regenerated
# by pod/buildtoc so please check that script before making changes here
+# the doubled rmdir calls are needed because older cmd shells
+# don't understand /q
distclean: realclean
-del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
$(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
-if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
-if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
-if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
+ -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
+ -if exist $(LIBDIR)\Sys rmdir /s $(LIBDIR)\Sys
+ -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
+ -if exist $(LIBDIR)\threads rmdir /s $(LIBDIR)\threads
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat checkpods \
podchecker podselect
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
perldoc perlivp dprofpp perlcc libnetcfg enc2xs piconv cpan *.bat \
- xsubpp instmodsh prove
+ xsubpp instmodsh prove corelist
-cd ..\x2p && del /f find2perl s2p psed *.bat
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
-del /f $(CONFIGPM)
-del /f bin\*.bat
+ -del /f perllibst.h
-del /f $(PERLEXE_ICO) perl.base
-cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
-cd $(EXTDIR) && del /s *.def Makefile Makefile.old
$(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
$(RCOPY) ..\lib $(INST_LIB)\*.*
-$(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
- cd ..\lib\unicore
- ..\..\$(MINIPERL) -I..\..\lib mktables
- cd ..\..\win32
+$(UNIDATAFILES) .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
+ cd ..\lib\unicore && \
+ ..\$(MINIPERL) -I.. mktables
minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
$(XCOPY) $(MINIPERL) ..\t\$(NULL)
.ENDIF
test : $(RIGHTMAKE) test-prep
- cd ..\t && $(PERLEXE) -I..\lib harness
+ cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
test-notty : test-prep
set PERL_SKIP_TTY_TEST=1 && \
- cd ..\t && $(PERLEXE) -I.\lib harness
+ cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
_test : $(RIGHTMAKE)
$(XCOPY) $(PERLEXE) ..\t\$(NULL)
.ELSE
$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
.ENDIF
- cd ..\t && $(PERLEXE) -I..\lib harness
+ cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
+# the doubled rmdir calls are needed because older cmd shells
+# don't understand /q
_clean :
-@erase miniperlmain$(o)
-@erase $(MINIPERL)
-@erase $(CORE_OBJ)
-if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
-if exist $(MINIDIR) rmdir /s $(MINIDIR)
- -if exist $(UNIDATADIRS) rmdir /s $(UNIDATADIRS)
+ -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
+ -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
+ -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
+ -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
-@erase $(UNIDATAFILES)
-@erase $(WIN32_OBJ)
-@erase $(DLL_OBJ)