This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #131142] Revise 'if' documentation
[perl5.git] / win32 / makefile.mk
index 3864e36..de670b5 100644 (file)
@@ -6,7 +6,7 @@
 #      Windows SDK 64-bit compiler and tools
 #
 # This is set up to build a perl.exe that runs off a shared library
-# (perl525.dll).  Also makes individual DLLs for the XS extensions.
+# (perl527.dll).  Also makes individual DLLs for the XS extensions.
 #
 
 ##
@@ -44,7 +44,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.25.10
+#INST_VER      *= \5.27.0
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -108,6 +108,12 @@ USE_LARGE_FILES    *= define
 #USE_LONG_DOUBLE *=define
 
 #
+# Comment this out if you want the legacy default behavior of including '.' at
+# the end of @INC.
+#
+DEFAULT_INC_EXCLUDES_DOT *= define
+
+#
 # Uncomment this if you want to disable looking up values from
 # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
 # the Registry.
@@ -145,6 +151,10 @@ USE_LARGE_FILES    *= define
 #CCTYPE                = MSVC120
 # Visual C++ 2013 Express Edition (aka Visual C++ 12.0) (free version)
 #CCTYPE                = MSVC120FREE
+# Visual C++ 2015 (aka Visual C++ 14.0) (full version)
+#CCTYPE                = MSVC140
+# Visual C++ 2015 Express Edition (aka Visual C++ 14.0) (free version)
+#CCTYPE                = MSVC140FREE
 # MinGW or mingw-w64 with gcc-3.4.5 or later
 #CCTYPE                = GCC
 
@@ -212,7 +222,7 @@ USE_LARGE_FILES     *= define
 # 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 perl525s.lib will also be created.
+# variables below. A static library perl527s.lib will also be created.
 # Ordinary perl.exe is not affected by this option.
 #
 #BUILD_STATIC  *= define
@@ -300,6 +310,7 @@ USE_IMP_SYS *= undef
 USE_LARGE_FILES        *= undef
 USE_64_BIT_INT *= undef
 USE_LONG_DOUBLE        *= undef
+DEFAULT_INC_EXCLUDES_DOT *= undef
 USE_NO_REGISTRY        *= undef
 
 
@@ -606,7 +617,11 @@ DEFINES            = -DWIN32 -D_CONSOLE -DNO_STRICT
 LOCDEFS                = -DPERLDLL -DPERL_CORE
 CXX_FLAG       = -TP -EHsc
 
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+LIBC           = ucrt.lib
+.ELSE
 LIBC           = msvcrt.lib
+.ENDIF
 
 .IF  "$(CFG)" == "Debug"
 OPTIMIZE       = -Od -MD -Zi -DDEBUGGING
@@ -615,7 +630,11 @@ LINK_DBG   = -debug
 OPTIMIZE       = -Od -MD -Zi
 LINK_DBG       = -debug
 .ELIF  "$(CFG)" == "DebugFull"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+LIBC           = ucrtd.lib
+.ELSE
 LIBC           = msvcrtd.lib
+.ENDIF
 OPTIMIZE       = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
 LINK_DBG       = -debug
 .ELSE
@@ -648,6 +667,11 @@ OPTIMIZE   += -fp:precise
 DEFINES                += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
 .ENDIF
 
+# Likewise for deprecated Winsock APIs in VC++ 14.0 for now.
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+DEFINES                = $(DEFINES) -D_WINSOCK_DEPRECATED_NO_WARNINGS
+.ENDIF
+
 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
 # 64-bit, even in 32-bit mode.  It also provides the _USE_32BIT_TIME_T
 # preprocessor option to revert back to the old functionality for
@@ -667,6 +691,14 @@ LIBBASEFILES       = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
        netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
        odbc32.lib odbccp32.lib comctl32.lib
 
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+.IF "$(CFG)" == "DebugFull"
+LIBBASEFILES   += msvcrtd.lib vcruntimed.lib
+.ELSE
+LIBBASEFILES   += msvcrt.lib vcruntime.lib
+.ENDIF
+.ENDIF
+
 # Avoid __intel_new_proc_init link error for libircmt.
 # libmmd is /MD equivelent, other variants exist.
 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
@@ -865,8 +897,8 @@ UTILS               =                       \
 
 CFGSH_TMPL     = config.gc
 CFGH_TMPL      = config_H.gc
-PERLIMPLIB     = $(COREDIR)\libperl525$(a)
-PERLSTATICLIB  = ..\libperl525s$(a)
+PERLIMPLIB     = $(COREDIR)\libperl527$(a)
+PERLSTATICLIB  = ..\libperl527s$(a)
 INT64          = long long
 
 .ELSE
@@ -879,10 +911,10 @@ INT64             = __int64
 
 # 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)\perl525$(a)
-PERLEXPLIB     *= $(COREDIR)\perl525.exp
-PERLSTATICLIB  *= ..\perl525s$(a)
-PERLDLL                = ..\perl525.dll
+PERLIMPLIB     *= $(COREDIR)\perl527$(a)
+PERLEXPLIB     *= $(COREDIR)\perl527.exp
+PERLSTATICLIB  *= ..\perl527s$(a)
+PERLDLL                = ..\perl527.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
@@ -1071,6 +1103,7 @@ CFG_VARS  =                                       \
                uselongdouble=$(USE_LONG_DOUBLE)        ~       \
                uselargefiles=$(USE_LARGE_FILES)        ~       \
                usesitecustomize=$(USE_SITECUST)        ~       \
+               default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)    ~       \
                LINK_FLAGS=$(LINK_FLAGS)        ~       \
                optimize=$(OPTIMIZE)    ~       \
                ARCHPREFIX=$(ARCHPREFIX)        ~       \
@@ -1208,6 +1241,17 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
        echo #undef NVgf&& \
        echo #undef USE_LONG_DOUBLE&& \
        echo #undef USE_CPLUSPLUS)>> config.h
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+       @(echo #undef FILE_ptr&& \
+       echo #undef FILE_cnt&& \
+       echo #undef FILE_base&& \
+       echo #undef FILE_bufsiz&& \
+       echo #define FILE_ptr(fp) PERLIO_FILE_ptr(fp)&& \
+       echo #define FILE_cnt(fp) PERLIO_FILE_cnt(fp)&& \
+       echo #define FILE_base(fp) PERLIO_FILE_base(fp)&& \
+       echo #define FILE_bufsiz(fp) (PERLIO_FILE_cnt(fp) + PERLIO_FILE_ptr(fp) - PERLIO_FILE_base(fp))&& \
+       echo #define I_STDBOOL)>> config.h
+.ENDIF
 .IF "$(USE_LARGE_FILES)"=="define"
        @(echo #define Off_t $(INT64)&& \
        echo #define LSEEKSIZE ^8&& \
@@ -1530,7 +1574,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
        copy ..\README.tw       ..\pod\perltw.pod
        copy ..\README.vos      ..\pod\perlvos.pod
        copy ..\README.win32    ..\pod\perlwin32.pod
-       copy ..\pod\perldelta.pod ..\pod\perl52510delta.pod
+       copy ..\pod\perldelta.pod ..\pod\perl5271delta.pod
        $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
        $(MINIPERL) -I..\lib ..\autodoc.pl ..
        $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
@@ -1628,7 +1672,7 @@ distclean: realclean
        -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 \
-           perl52510delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+           perl5271delta.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 \