finall fix core dump in XS::Typemap
[p5sagit/p5-mst-13.2.git] / win32 / Makefile
index 17c4bc2..0877f4d 100644 (file)
@@ -32,7 +32,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.7.3
+#INST_VER = \5.8.0
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -47,12 +47,12 @@ INST_TOP    = $(INST_DRV)\perl
 
 #
 # uncomment to enable multiple interpreters.  This is need for fork()
-# emulation.
+# emulation and for thread support.
 #
 USE_MULTI = define
 
 #
-# Beginnings of interpreter cloning/threads; still very incomplete.
+# Beginnings of interpreter cloning/threads; now reasonably complete.
 # This should be enabled to get the fork() emulation.  This needs
 # USE_MULTI as well.
 #
@@ -66,7 +66,11 @@ USE_ITHREADS = define
 USE_IMP_SYS = define
 
 #
-# uncomment to enable the experimental PerlIO I/O subsystem.
+# Comment out next assign to disable perl's I/O subsystem and use compiler's 
+# stdio for IO - depending on your compiler vendor and run time library you may 
+# 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
 
 #
@@ -88,6 +92,8 @@ USE_PERLIO    = define
 
 #
 # uncomment next line if you want debug version of perl (big,slow)
+# If not enabled, we automatically try to use maximum optimization
+# with all compilers that are known to have a working optimizer.
 #
 #CFG           = Debug
 
@@ -350,10 +356,17 @@ OPTIMIZE  = -Od -MD -Zi -DDEBUGGING
 !  ENDIF
 LINK_DBG       = -debug
 !ELSE
-# -O1 yields smaller code, which turns out to be faster than -O2
-#OPTIMIZE      = -O2 -MD -DNDEBUG
-OPTIMIZE       = -O1 -MD -DNDEBUG
+OPTIMIZE       = -MD -DNDEBUG
 LINK_DBG       = -release
+!  IF "$(WIN64)" == "define"
+# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
+OPTIMIZE       = $(OPTIMIZE) -Ox -GL
+LINK_DBG       = $(LINK_DBG) -ltcg
+!  ELSE
+# -O1 yields smaller code, which turns out to be faster than -O2 on x86
+OPTIMIZE       = $(OPTIMIZE) -O1
+#OPTIMIZE      = $(OPTIMIZE) -O2
+!  ENDIF
 !ENDIF
 
 !IF "$(WIN64)" == "define"
@@ -446,11 +459,14 @@ UTILS             =                       \
                ..\utils\perlbug        \
                ..\utils\pl2pm          \
                ..\utils\c2ph           \
+               ..\utils\pstruct        \
                ..\utils\h2xs           \
                ..\utils\perldoc        \
                ..\utils\perlcc         \
                ..\utils\perlivp        \
                ..\utils\libnetcfg      \
+               ..\utils\enc2xs         \
+               ..\utils\piconv         \
                ..\pod\checkpods        \
                ..\pod\pod2html         \
                ..\pod\pod2latex        \
@@ -460,6 +476,7 @@ UTILS               =                       \
                ..\pod\podchecker       \
                ..\pod\podselect        \
                ..\x2p\find2perl        \
+               ..\x2p\psed             \
                ..\x2p\s2p              \
                ..\lib\ExtUtils\xsubpp  \
                bin\exetype.pl          \
@@ -540,9 +557,11 @@ WIN32_SRC  =               \
                .\win32sck.c    \
                .\win32thread.c
 
-!IF "$(USE_PERLIO)" == "define"
+# We need this for miniperl build unless we override canned 
+# config.h #define building mini\*
+#!IF "$(USE_PERLIO)" == "define"
 WIN32_SRC      = $(WIN32_SRC) .\win32io.c
-!ENDIF
+#!ENDIF
 
 !IF "$(CRYPT_SRC)" != ""
 WIN32_SRC      = $(WIN32_SRC) .\$(CRYPT_SRC)
@@ -642,12 +661,13 @@ STORABLE          = $(EXTDIR)\Storable\Storable
 FILTER                 = $(EXTDIR)\Filter\Util\Call\Call
 ENCODE                 = $(EXTDIR)\Encode\Encode
 MD5                    = $(EXTDIR)\Digest\MD5\MD5
-PERLIOSCALAR           = $(EXTDIR)\PerlIO\Scalar\Scalar
+PERLIOSCALAR           = $(EXTDIR)\PerlIO\scalar\scalar
 MIMEBASE64             = $(EXTDIR)\MIME\Base64\Base64
 TIMEHIRES              = $(EXTDIR)\Time\HiRes\HiRes
 CWD                    = $(EXTDIR)\Cwd\Cwd
 LISTUTIL               = $(EXTDIR)\List\Util\Util
-PERLIOVIA              = $(EXTDIR)\PerlIO\Via\Via
+PERLIOVIA              = $(EXTDIR)\PerlIO\via\via
+XSAPITEST              = $(EXTDIR)\XS\APItest\APItest
 XSTYPEMAP              = $(EXTDIR)\XS\Typemap\Typemap
 UNICODENORMALIZE       = $(EXTDIR)\Unicode\Normalize\Normalize
 
@@ -671,12 +691,13 @@ STORABLE_DLL              = $(AUTODIR)\Storable\Storable.dll
 FILTER_DLL             = $(AUTODIR)\Filter\Util\Call\Call.dll
 ENCODE_DLL             = $(AUTODIR)\Encode\Encode.dll
 MD5_DLL                        = $(AUTODIR)\Digest\MD5\MD5.dll
-PERLIOSCALAR_DLL       = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
+PERLIOSCALAR_DLL       = $(AUTODIR)\PerlIO\scalar\scalar.dll
 MIMEBASE64_DLL         = $(AUTODIR)\MIME\Base64\Base64.dll
 TIMEHIRES_DLL          = $(AUTODIR)\Time\HiRes\HiRes.dll
 CWD_DLL                        = $(AUTODIR)\Cwd\Cwd.dll
 LISTUTIL_DLL           = $(AUTODIR)\List\Util\Util.dll
-PERLIOVIA_DLL          = $(AUTODIR)\PerlIO\Via\Via.dll
+PERLIOVIA_DLL          = $(AUTODIR)\PerlIO\via\via.dll
+XSAPITEST_DLL          = $(AUTODIR)\XS\APItest\APItest.dll
 XSTYPEMAP_DLL          = $(AUTODIR)\XS\Typemap\Typemap.dll
 UNICODENORMALIZE_DLL   = $(AUTODIR)\Unicode\Normalize\Normalize.dll
 
@@ -707,6 +728,7 @@ EXTENSION_C =               \
                $(CWD).c        \
                $(LISTUTIL).c   \
                $(PERLIOVIA).c  \
+               $(XSAPITEST).c  \
                $(XSTYPEMAP).c  \
                $(UNICODENORMALIZE).c
 
@@ -737,6 +759,7 @@ EXTENSION_DLL       =               \
                $(CWD_DLL)      \
                $(LISTUTIL_DLL) \
                $(PERLIOVIA_DLL)        \
+               $(XSAPITEST_DLL)        \
                $(XSTYPEMAP_DLL)        \
                $(UNICODENORMALIZE_DLL)
 
@@ -805,12 +828,12 @@ config.w32 : $(CFGSH_TMPL)
 regen_config_h:
        perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
        cd ..
-       -del /f perl.exe
+       -del /f perl.exe perl*.dll
        perl configpm
        cd win32
        -del /f $(CFGH_TMPL)
        -mkdir $(COREDIR)
-       -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
+       -perl config_h.PL "INST_VER=$(INST_VER)"
        rename config.h $(CFGH_TMPL)
 
 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
@@ -949,8 +972,10 @@ utils: $(PERLEXE) $(X2P)
        copy ..\README.dgux     .\perldgux.pod
        copy ..\README.dos      .\perldos.pod
        copy ..\README.epoc     .\perlepoc.pod
+       copy ..\README.freebsd     .\perlfreebsd.pod
        copy ..\README.hurd     .\perlhurd.pod
        copy ..\README.hpux     .\perlhpux.pod
+       copy ..\README.irix     .\perlirix.pod
        copy ..\README.machten  .\perlmachten.pod
        copy ..\README.macos    .\perlmacos.pod
        copy ..\README.mint     .\perlmint.pod
@@ -992,19 +1017,18 @@ distclean: clean
        -del /f $(LIBDIR)\Storable.pm
        -del /f $(LIBDIR)\Filter\Util\Call.pm
        -del /f $(LIBDIR)\Digest\MD5.pm
-       -del /f $(LIBDIR)\PerlIO\Scalar.pm
-       -del /f $(LIBDIR)\PerlIO\Via.pm
+       -del /f $(LIBDIR)\PerlIO\scalar.pm
+       -del /f $(LIBDIR)\PerlIO\via.pm
        -del /f $(LIBDIR)\MIME\Base64.pm
        -del /f $(LIBDIR)\MIME\QuotedPrint.pm
        -del /f $(LIBDIR)\List\Util.pm
        -del /f $(LIBDIR)\Scalar\Util.pm
        -del /f $(LIBDIR)\Time\HiRes.pm
+       -del /f $(LIBDIR)\XS\APItest.pm
        -del /f $(LIBDIR)\XS\Typemap.pm
        -del /f $(LIBDIR)\Unicode\Normalize.pm
        -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
        -rmdir /s $(LIBDIR)\IO
-       -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
-       -rmdir /s $(LIBDIR)\Thread
        -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
        -rmdir /s $(LIBDIR)\B
        -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
@@ -1024,8 +1048,8 @@ distclean: clean
        -del /f *.html *.bat checkpods \
            perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
            perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
-           perldos.pod perlepoc.pod perlhurd.pod \
-           perlhpux.pod perlmachten.pod \
+           perldos.pod perlepoc.pod perlfreebsd.pod perlhurd.pod \
+           perlhpux.pod perlirix.pod perlmachten.pod \
            perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
            perlos2.pod perlos390.pod perlplan9.pod perlqnx.pod \
            perlsolaris.pod perltru64.pod perluts.pod \
@@ -1033,18 +1057,22 @@ distclean: clean
            perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
            podchecker podselect
        cd ..\utils
-       -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc perlivp dprofpp
+       -del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs perldoc perlivp \
+           dprofpp perlcc libnetcfg enc2xs piconv
        -del /f *.bat
        cd ..\win32
        cd ..\x2p
-       -del /f find2perl s2p
+       -del /f find2perl s2p psed
        -del /f *.bat
        cd ..\win32
        -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
        -del /f $(CONFIGPM)
        -del /f bin\*.bat
+       cd ..
+       -del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
+       cd win32
        cd $(EXTDIR)
-       -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
+       -del /s *.def Makefile Makefile.old
        cd ..\win32
        -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
        -rmdir /s $(AUTODIR)