This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add const to every table in win32/fcrypt.c
[perl5.git] / win32 / makefile.mk
index d376a8c..12e4cf3 100644 (file)
@@ -32,6 +32,7 @@ INST_TOP      *= $(INST_DRV)\perl
 #
 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
 # on a 64-bit version of Windows.
+#
 #WIN64         *= undef
 
 #
@@ -43,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.21.2
+#INST_VER      *= \5.21.7
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -91,12 +92,14 @@ USE_IMP_SYS *= define
 # then get a number of fails from make test i.e. bugs - complain to them not us ;-). 
 # You will also be unable to take full advantage of perl5.8's support for multiple 
 # encodings and may see lower IO performance. You have been warned.
+#
 USE_PERLIO     *= define
 
 #
 # Comment this out if you don't want to enable large file support for
 # some reason.  Should normally only be changed to maintain compatibility
 # with an older release of perl.
+#
 USE_LARGE_FILES        *= define
 
 #
@@ -104,9 +107,16 @@ USE_LARGE_FILES    *= define
 # (If you're building a 64-bit perl then you will have 64-bit integers whether
 # or not this is uncommented.)
 # Note: This option is not supported in 32-bit MSVC60 builds.
+#
 #USE_64_BIT_INT        *= define
 
 #
+# Uncomment this if you want to support the use of long doubles in GCC builds.
+# This option is not supported for MSVC builds.
+#
+#USE_LONG_DOUBLE *=define
+
+#
 # uncomment exactly one of the following
 #
 # Visual C++ 6.x (aka Visual C++ 98)
@@ -292,6 +302,7 @@ USE_IMP_SYS *= undef
 USE_PERLIO     *= undef
 USE_LARGE_FILES        *= undef
 USE_64_BIT_INT *= undef
+USE_LONG_DOUBLE        *= undef
 
 .IF "$(USE_IMP_SYS)" == "define"
 PERL_MALLOC    = undef
@@ -358,6 +369,12 @@ CCTYPE             = SDK2003SP1
 USE_64_BIT_INT != undef
 .ENDIF
 
+# Disable the long double option for MSVC builds since that compiler
+# does not support it.
+.IF "$(CCTYPE)" != "GCC"
+USE_LONG_DOUBLE        != undef
+.ENDIF
+
 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
 .IF "$(ARCHITECTURE)" == "AMD64"
 ARCHITECTURE   = x64
@@ -428,6 +445,11 @@ LIB32              = $(ARCHPREFIX)ar rc
 IMPLIB         = $(ARCHPREFIX)dlltool
 RSC            = $(ARCHPREFIX)windres
 
+.IF "$(USE_LONG_DOUBLE)" == "define"
+BUILDOPT        += -D__USE_MINGW_ANSI_STDIO
+MINIBUILDOPT    += -D__USE_MINGW_ANSI_STDIO
+.ENDIF
+
 GCCWRAPV *= $(shell for /f "delims=. tokens=1,2,3" %i in ('$(CC) -dumpversion') do @if "%i"=="4" (if "%j" geq "3" echo define) else if "%i" geq "5" (echo define))
 
 .IF "$(GCCWRAPV)" == "define"
@@ -603,6 +625,9 @@ LIBBASEFILES    += bufferoverflowU.lib
 LIBFILES       = $(LIBBASEFILES) $(LIBC)
 
 EXTRACFLAGS    = -nologo -GF -W3
+.IF "$(__ICC)" == "define"
+EXTRACFLAGS    = $(EXTRACFLAGS) -Qstd=c99
+.ENDIF
 CFLAGS         = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
                $(PCHFLAGS) $(OPTIMIZE)
 LINK_FLAGS     = -nologo -nodefaultlib $(LINK_DBG) \
@@ -761,14 +786,12 @@ CFGH_TMPL = config_H.gc
 PERLIMPLIB     = ..\libperl521$(a)
 PERLSTATICLIB  = ..\libperl521s$(a)
 INT64          = long long
-INT64f         = ll
 
 .ELSE
 
 CFGSH_TMPL     = config.vc
 CFGH_TMPL      = config_H.vc
 INT64          = __int64
-INT64f         = I64
 
 .ENDIF
 
@@ -951,6 +974,7 @@ CFG_VARS    =                                       \
                usemultiplicity=$(USE_MULTI)    ~       \
                useperlio=$(USE_PERLIO)         ~       \
                use64bitint=$(USE_64_BIT_INT)   ~       \
+               uselongdouble=$(USE_LONG_DOUBLE)        ~       \
                uselargefiles=$(USE_LARGE_FILES)        ~       \
                usesitecustomize=$(USE_SITECUST)        ~       \
                LINK_FLAGS=$(LINK_FLAGS)        ~       \
@@ -1026,6 +1050,7 @@ config.w32 : $(CFGSH_TMPL)
        @echo #undef HAS_ATOLL>>$@
        @echo #undef HAS_STRTOLL>>$@
        @echo #undef HAS_STRTOULL>>$@
+       @echo #undef Size_t_size>>$@
        @echo #undef IVTYPE>>$@
        @echo #undef UVTYPE>>$@
        @echo #undef IVSIZE>>$@
@@ -1038,7 +1063,25 @@ config.w32 : $(CFGSH_TMPL)
        @echo #undef UVxf>>$@
        @echo #undef UVXf>>$@
        @echo #undef USE_64_BIT_INT>>$@
-       @echo #undef Size_t_size>>$@
+       @echo #undef Gconvert>>$@
+       @echo #undef HAS_FREXPL>>$@
+       @echo #undef HAS_ISNANL>>$@
+       @echo #undef HAS_MODFL>>$@
+       @echo #undef HAS_MODFL_PROTO>>$@
+       @echo #undef HAS_SQRTL>>$@
+       @echo #undef HAS_STRTOLD>>$@
+       @echo #undef PERL_PRIfldbl>>$@
+       @echo #undef PERL_PRIgldbl>>$@
+       @echo #undef PERL_PRIeldbl>>$@
+       @echo #undef PERL_SCNfldbl>>$@
+       @echo #undef NVTYPE>>$@
+       @echo #undef NVSIZE>>$@
+       @echo #undef LONG_DOUBLESIZE>>$@
+       @echo #undef NV_OVERFLOWS_INTEGERS_AT>>$@
+       @echo #undef NVef>>$@
+       @echo #undef NVff>>$@
+       @echo #undef NVgf>>$@
+       @echo #undef USE_LONG_DOUBLE>>$@
 .IF "$(USE_LARGE_FILES)"=="define"
        @echo #define Off_t $(INT64)>>$@
        @echo #define LSEEKSIZE ^8>>$@
@@ -1068,13 +1111,18 @@ config.w32 : $(CFGSH_TMPL)
        @echo #define UVTYPE unsigned $(INT64)>>$@
        @echo #define IVSIZE ^8>>$@
        @echo #define UVSIZE ^8>>$@
+.IF "$(USE_LONG_DOUBLE)"=="define"
+       @echo #define NV_PRESERVES_UV>>$@
+       @echo #define NV_PRESERVES_UV_BITS 64>>$@
+.ELSE
        @echo #undef NV_PRESERVES_UV>>$@
        @echo #define NV_PRESERVES_UV_BITS 53>>$@
-       @echo #define IVdf "$(INT64f)d">>$@
-       @echo #define UVuf "$(INT64f)u">>$@
-       @echo #define UVof "$(INT64f)o">>$@
-       @echo #define UVxf "$(INT64f)x">>$@
-       @echo #define UVXf "$(INT64f)X">>$@
+.ENDIF
+       @echo #define IVdf "I64d">>$@
+       @echo #define UVuf "I64u">>$@
+       @echo #define UVof "I64o">>$@
+       @echo #define UVxf "I64x">>$@
+       @echo #define UVXf "I64X">>$@
        @echo #define USE_64_BIT_INT>>$@
 .ELSE
        @echo #define IVTYPE long>>$@
@@ -1090,6 +1138,52 @@ config.w32 : $(CFGSH_TMPL)
        @echo #define UVXf "lX">>$@
        @echo #undef USE_64_BIT_INT>>$@
 .ENDIF
+.IF "$(USE_LONG_DOUBLE)"=="define"
+       @echo #define Gconvert(x,n,t,b) sprintf((b),"%.*""Lg",(n),(x))>>$@
+       @echo #define HAS_FREXPL>>$@
+       @echo #define HAS_ISNANL>>$@
+       @echo #define HAS_MODFL>>$@
+       @echo #define HAS_MODFL_PROTO>>$@
+       @echo #define HAS_SQRTL>>$@
+       @echo #define HAS_STRTOLD>>$@
+       @echo #define PERL_PRIfldbl "Lf">>$@
+       @echo #define PERL_PRIgldbl "Lg">>$@
+       @echo #define PERL_PRIeldbl "Le">>$@
+       @echo #define PERL_SCNfldbl "Lf">>$@
+       @echo #define NVTYPE long double>>$@
+.IF "$(WIN64)"=="define"
+       @echo #define NVSIZE ^16>>$@
+       @echo #define LONG_DOUBLESIZE ^16>>$@
+.ELSE
+       @echo #define NVSIZE ^12>>$@
+       @echo #define LONG_DOUBLESIZE ^12>>$@
+.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 NVef "Le">>$@
+       @echo #define NVff "Lf">>$@
+       @echo #define NVgf "Lg">>$@
+       @echo #define USE_LONG_DOUBLE>>$@
+.ELSE
+       @echo #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))>>$@
+       @echo #undef HAS_FREXPL>>$@
+       @echo #undef HAS_ISNANL>>$@
+       @echo #undef HAS_MODFL>>$@
+       @echo #undef HAS_MODFL_PROTO>>$@
+       @echo #undef HAS_SQRTL>>$@
+       @echo #undef HAS_STRTOLD>>$@
+       @echo #undef PERL_PRIfldbl>>$@
+       @echo #undef PERL_PRIgldbl>>$@
+       @echo #undef PERL_PRIeldbl>>$@
+       @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">>$@
+       @echo #define NVgf "g">>$@
+       @echo #undef USE_LONG_DOUBLE>>$@
+.ENDIF
        @echo #endif>>$@
 
 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
@@ -1349,7 +1443,7 @@ utils: $(PERLEXE) ..\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\perl5212delta.pod
+       copy ..\pod\perldelta.pod ..\pod\perl5217delta.pod
        $(PERLEXE) $(PL2BAT) $(UTILS)
        $(MINIPERL) -I..\lib ..\autodoc.pl ..
        $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
@@ -1428,6 +1522,7 @@ distclean: realclean
        -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
        -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
        -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
+       -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
        -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
        -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
        -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
@@ -1443,7 +1538,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 \
-           perl5212delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+           perl5217delta.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 \