This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
force linkage of the function wrappers for globals in change#4878
[perl5.git] / win32 / makefile.mk
index 01034bb..75f6a5c 100644 (file)
@@ -73,14 +73,14 @@ INST_ARCH   *= \$(ARCHNAME)
 # XXX WARNING! This option currently undergoing changes.  May be broken.
 #
 # Beginnings of interpreter cloning/threads: still rather rough, fails
-# tests.  This should be enabled to get the fork() emulation.  Do not
-# enable unless you know what you're doing!
+# tests.  This should be enabled to get the fork() emulation.  This needs
+# one of USE_MULTI or USE_OBJECT enabled as well.
 #
 #USE_ITHREADS  *= define
 
 #
 # uncomment to enable the implicit "host" layer for all system calls
-# made by perl.  This is needed and auto-enabled by USE_OBJECT above.
+# made by perl.  This needs one of USE_MULTI or USE_OBJECT above.
 # This is also needed to get fork().
 #
 #USE_IMP_SYS   *= define
@@ -118,6 +118,8 @@ CCTYPE              *= BORLAND
 # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
 # and follow the directions in the package to install.
 #
+# Not recommended if you have VC 6.x and you're not running Windows 9x.
+#
 #USE_PERLCRT   *= define
 
 #
@@ -245,13 +247,19 @@ USE_MULTI *= undef
 USE_OBJECT     *= undef
 USE_ITHREADS   *= undef
 USE_IMP_SYS    *= undef
+USE_PERLCRT    *= undef
 
-.IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
-BUILDOPT       += -DPERL_IMPLICIT_CONTEXT
+.IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef"
+USE_MULTI      != define
+.ENDIF
+
+.IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef"
+USE_MULTI      != define
+USE_5005THREADS        != undef
 .ENDIF
 
-.IF "$(USE_ITHREADS)" != "undef"
-BUILDOPT       += -DUSE_ITHREADS
+.IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
+BUILDOPT       += -DPERL_IMPLICIT_CONTEXT
 .ENDIF
 
 .IF "$(USE_IMP_SYS)" != "undef"
@@ -412,7 +420,7 @@ LOCDEFS             = -DPERLDLL -DPERL_CORE
 SUBSYS         = console
 CXX_FLAG       = -TP -GX
 
-.IF "$(USE_PERLCRT)" == ""
+.IF "$(USE_PERLCRT)" != "define"
 .IF  "$(CFG)" == "Debug"
 PERLCRTLIBC    = msvcrtd.lib
 .ELSE
@@ -454,10 +462,10 @@ LINK_DBG  = -release
 .ENDIF
 
 LIBBASEFILES   = $(DELAYLOAD) $(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 version.lib odbc32.lib odbccp32.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 \
+               version.lib odbc32.lib odbccp32.lib
 
 # we add LIBC here, since we may be using PerlCRT.dll
 LIBFILES       = $(LIBBASEFILES) $(LIBC)
@@ -471,6 +479,10 @@ OBJOUT_FLAG        = -Fo
 EXEOUT_FLAG    = -Fe
 LIBOUT_FLAG    = /out:
 
+.IF "$(USE_PERLCRT)" != "define"
+BUILDOPT       += -DPERL_MSVCRT_READFIX
+.ENDIF
+
 .ENDIF
 
 .IF "$(USE_OBJECT)" == "define"
@@ -580,7 +592,7 @@ PERLIMPLIB  = ..\libperl$(a)
 
 CFGSH_TMPL     = config.vc
 CFGH_TMPL      = config_H.vc
-.IF "$(USE_PERLCRT)" == ""
+.IF "$(USE_PERLCRT)" != "define"
 PERL95EXE      = ..\perl95.exe
 .ENDIF
 
@@ -954,7 +966,8 @@ config.w32 : $(CFGSH_TMPL)
 # edit config.{b,v,g}c and make this target once for each supported
 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
 regen_config_h:
-       perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
+       perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
+           $(CFGSH_TMPL) > ..\config.sh
        -cd .. && del /f perl.exe
        cd .. && perl configpm
        -del /f $(CFGH_TMPL)
@@ -1100,7 +1113,7 @@ $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
 
 .IF "$(CCTYPE)" != "BORLAND"
 .IF "$(CCTYPE)" != "GCC"
-.IF "$(USE_PERLCRT)" == ""
+.IF "$(USE_PERLCRT)" != "define"
 
 perl95.c : runperl.c 
        copy runperl.c perl95.c