# Makefile to build perl on Windows using DMAKE.
# Supported compilers:
# Microsoft Visual C++ 6.0 or later
-# MinGW with gcc-3.4.5 or later
+# MinGW with gcc-3.4.5 or later with runtime < 3.21
+# MinGW64 with gcc-4.4.3 or later
# Windows SDK 64-bit compiler and tools
#
# This is set up to build a perl.exe that runs off a shared library
-# (perl527.dll). Also makes individual DLLs for the XS extensions.
+# (perl528.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.27.6
+#INST_VER *= \5.28.0
#
# Comment this out if you DON'T want your perl installation to have
# set this to additionally provide a statically linked perl-static.exe.
# Note that dynamic loading will not work with this perl, so you must
# include required modules statically using the STATIC_EXT or ALL_STATIC
-# variables below. A static library perl527s.lib will also be created.
+# variables below. A static library perl528s.lib will also be created.
# Ordinary perl.exe is not affected by this option.
#
#BUILD_STATIC *= define
#
# in addition to BUILD_STATIC the option ALL_STATIC makes *every*
-# extension get statically built
+# extension get statically built.
# This will result in a very large perl executable, but the main purpose
# is to have proper linking set so as to be able to create miscellaneous
-# executables with different built-in extensions
+# executables with different built-in extensions. It implies BUILD_STATIC.
#
#ALL_STATIC *= define
.IF "$(GCCCROSS)" == "define"
CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include
CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib
+.ELIF "$(CCTYPE)" == "GCC"
+CCINCDIR *= $(CCHOME)\include
+CCLIBDIR *= $(CCHOME)\lib
.ELSE
CCINCDIR *= $(CCHOME)\include
.IF "$(CCTYPE)" == "MSVC141"
CCLIBDIR *= $(CCHOME)\lib\x86
.ENDIF
.ELSE
+.IF "$(WIN64)" == "define"
+CCLIBDIR *= $(CCHOME)\lib\amd64
+.ELSE
CCLIBDIR *= $(CCHOME)\lib
.ENDIF
.ENDIF
+.ENDIF
# Set DLL location for GCC compilers.
.IF "$(CCTYPE)" == "GCC"
CFGSH_TMPL = config.gc
CFGH_TMPL = config_H.gc
-PERLIMPLIB = $(COREDIR)\libperl527$(a)
-PERLSTATICLIB = ..\libperl527s$(a)
+PERLIMPLIB = $(COREDIR)\libperl528$(a)
+PERLSTATICLIB = ..\libperl528s$(a)
INT64 = long long
.ELSE
# makedef.pl must be updated if this changes, and this should normally
# only change when there is an incompatible revision of the public API.
-PERLIMPLIB *= $(COREDIR)\perl527$(a)
-PERLEXPLIB *= $(COREDIR)\perl527.exp
-PERLSTATICLIB *= ..\perl527s$(a)
-PERLDLL = ..\perl527.dll
+PERLIMPLIB *= $(COREDIR)\perl528$(a)
+PERLEXPLIB *= $(COREDIR)\perl528.exp
+PERLSTATICLIB *= ..\perl528s$(a)
+PERLDLL = ..\perl528.dll
+PERLDLLBASE = perl528.dll
#EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel
#$(MAKE) will contain the -P that this makefile was called with, which is bad for
# some exclusions, unfortunately, until fixed:
# - MakeMaker isn't capable enough for SDBM_File (small bug)
STATIC_EXT = * !SDBM_File
+NORMALIZE_STATIC = Normalize_static
.ELSE
# specify static extensions here, for example:
# (be sure to include Win32CORE to load Win32 on demand)
#STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
STATIC_EXT = Win32CORE
+NORMALIZE_DYN = Normalize_dyn
.ENDIF
DYNALOADER = ..\DynaLoader$(o)
# Top targets
#
-all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC)
+all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) PostExt
..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
echo #define Off_t_size ^4)>> config.h
.ENDIF
.IF "$(WIN64)"=="define"
+.IF "$(CCTYPE)" == "GCC"
+ @(echo #define LONG_DOUBLESIZE ^16)>> config.h
+.ELSE
+ @(echo #define LONG_DOUBLESIZE ^8)>> config.h
+.ENDIF
@(echo #define PTRSIZE ^8&& \
echo #define SSize_t $(INT64)&& \
echo #define HAS_ATOLL&& \
echo #define HAS_STRTOULL&& \
echo #define Size_t_size ^8)>> config.h
.ELSE
+.IF "$(CCTYPE)" == "GCC"
+ @(echo #define LONG_DOUBLESIZE ^12)>> config.h
+.ELSE
+ @(echo #define LONG_DOUBLESIZE ^8)>> config.h
+.ENDIF
@(echo #define PTRSIZE ^4&& \
echo #define SSize_t int&& \
echo #undef HAS_ATOLL&& \
echo #define PERL_PRIgldbl "Lg"&& \
echo #define PERL_PRIeldbl "Le"&& \
echo #define PERL_SCNfldbl "Lf"&& \
- echo #define NVTYPE long double)>> config.h
-.IF "$(WIN64)"=="define"
- @(echo #define NVSIZE ^16&& \
- echo #define LONG_DOUBLESIZE ^16)>> config.h
-.ELSE
- @(echo #define NVSIZE ^12&& \
- echo #define LONG_DOUBLESIZE ^12)>> config.h
-.ENDIF
- @(echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0&& \
+ echo #define NVTYPE long double&& \
+ echo #define NVSIZE LONG_DOUBLESIZE&& \
+ echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0&& \
echo #define NVef "Le"&& \
echo #define NVff "Lf"&& \
echo #define NVgf "Lg"&& \
echo #undef PERL_SCNfldbl&& \
echo #define NVTYPE double&& \
echo #define NVSIZE ^8&& \
- echo #define LONG_DOUBLESIZE ^8&& \
echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0&& \
echo #define NVef "e"&& \
echo #define NVff "f"&& \
$(PERLEXPLIB) $(PERLIMPLIB) .UPDATEALL : perldll.def
.IF "$(CCTYPE)" == "GCC"
- $(IMPLIB) -k -d perldll.def -l $(PERLIMPLIB) -e $(PERLEXPLIB)
+ $(IMPLIB) -k -d perldll.def -D $(PERLDLLBASE) -l $(PERLIMPLIB) -e $(PERLEXPLIB)
.ELSE #VC family
lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
.ENDIF
# DynaLoader.pm, so this will have to do
#most of deps of this target are in DYNALOADER and therefore omitted here
-Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) MakePPPort
+Extensions : $(PERLDEP) $(DYNALOADER) Extension_lib $(GLOBEXE) MakePPPort
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
-Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
+Normalize_static : $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) $(UNIDATAFILES)
+ $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static +Unicode/Normalize
+
+Normalize_dyn : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
Extensions_reonly : $(PERLDEP) $(DYNALOADER)
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
-Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
- $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
+Exts_static_general : ..\make_ext.pl $(CONFIGPM) Extension_lib $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
+ $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static !Unicode/Normalize
+
+Extensions_static : list_static_libs.pl Exts_static_general $(NORMALIZE_STATIC)
$(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
+Extension_lib : ..\make_ext.pl $(CONFIGPM)
+ $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) lib
+
#lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
$(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
- $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader lib
+ $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader
Extensions_clean :
-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
# all PE files need to be built by the time this target runs, PP files can still
# be running in parallel like UNIDATAFILES, this target a placeholder for the
# future
-.IF "$(BUILD_STATIC)"=="define"
-rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(PERLEXESTATIC)
+.IF "$(PERLSTATIC)"=="static"
+rebasePE : Extensions $(PERLDLL) $(PERLEXE) $(PERLEXESTATIC)
.ELSE
-rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE)
+rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
.ENDIF
$(NOOP)
+PostExt : ..\lib\Storable\Limit.pm
+ $(NOOP)
+
+# we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions
+# rebasePE most of that, including adjustment for static builds, so we
+# just need non-xs extensions
+..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs
+ cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm
+ if not exist ..\lib\Storable mkdir ..\lib\Storable
+ copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm
+
#-------------------------------------------------------------------------------
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
- copy ..\pod\perldelta.pod ..\pod\perl5276delta.pod
+ copy ..\pod\perldelta.pod ..\pod\perl5290delta.pod
$(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
$(MINIPERL) -I..\lib ..\autodoc.pl ..
$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
-..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs Extensions_normalize utils
+..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs $(NORMALIZE_DYN) utils
$(PERLEXE) -f ..\pod\buildtoc -q
# Note that the pod cleanup in this next section is parsed (and regenerated
-del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
-del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
-del /f $(LIBDIR)\File\Glob.pm
- -del /f $(LIBDIR)\Storable.pm
-del /f $(LIBDIR)\Sys\Hostname.pm
-del /f $(LIBDIR)\Time\HiRes.pm
-del /f $(LIBDIR)\Unicode\Normalize.pm
-del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
+ -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
-del /f $(LIBDIR)\Win32.pm
-del /f $(LIBDIR)\Win32CORE.pm
-del /f $(LIBDIR)\Win32API\File.pm
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat roffitall \
- perl5276delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+ perl5290delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \