support optional crypt() with PERL_OBJECT
[p5sagit/p5-mst-13.2.git] / win32 / makefile.mk
index dd03ae2..249c0aa 100644 (file)
@@ -3,7 +3,7 @@
 # Supported compilers:
 #      Visual C++ 2.0 thro 5.0
 #      Borland C++ 5.02
-#      Mingw32 with gcc-2.8.1 or egcs-1.0.2
+#      Mingw32 with gcc-2.8.1 or egcs-1.0.2  **experimental**
 #
 # This is set up to build a perl.exe that runs off a shared library
 # (perl.dll).  Also makes individual DLLs for the XS extensions.
@@ -29,7 +29,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.00471
+INST_VER       *= \5.005
 
 #
 # uncomment to enable threads-capabilities
@@ -46,7 +46,8 @@ CCTYPE                *= BORLAND
 
 #
 # uncomment next line if you want to use the perl object
-# Currently, this cannot be enabled if you ask for threads above
+# Currently, this cannot be enabled if you ask for threads above, or
+# if you are using GCC or EGCS.
 #
 #OBJECT                *= -DPERL_OBJECT
 
@@ -56,9 +57,10 @@ CCTYPE               *= BORLAND
 #CFG           *= Debug
 
 #
-# uncomment to enable use of PerlCRT.DLL.  Highly recommended.  It has
-# patches that fix known bugs in MSCVRT.DLL.  You will need to download it
-# from: <TBD> and follow the directions in the package to install.
+# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
+# Highly recommended.  It has patches that fix known bugs in MSVCRT.DLL.
+# You will need to download it from: http://www.activestate.com/
+# and follow the directions in the package to install.
 #
 #USE_PERLCRT   *= define
 
@@ -73,8 +75,8 @@ CCTYPE                *= BORLAND
 
 #
 # if you have the source for des_fcrypt(), uncomment this and make sure the
-# file exists (see README.win32).  File should be located at the perl
-# top level directory.
+# file exists (see README.win32).  File should be located in the same
+# directory as this file.
 #
 #CRYPT_SRC     *= des_fcrypt.c
 
@@ -149,7 +151,9 @@ USE_THREADS *= undef
 
 PROCESSOR_ARCHITECTURE *= x86
 
-.IF "$(USE_THREADS)" == "define"
+.IF "$(OBJECT)" != ""
+ARCHNAME       = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
+.ELIF "$(USE_THREADS)" == "define"
 ARCHNAME       = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
 .ELSE
 ARCHNAME       = MSWin32-$(PROCESSOR_ARCHITECTURE)
@@ -176,7 +180,7 @@ IMPLIB              = implib -c
 # Options
 #
 RUNTIME                = -D_RTLDLL
-INCLUDES       = -I.\include -I. -I.. -I$(CCINCDIR)
+INCLUDES       = -I$(COREDIR) -I.\include -I. -I.. -I$(CCINCDIR)
 #PCHFLAGS      = -H -Hc -H=c:\temp\bcmoduls.pch 
 DEFINES                = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
 LOCDEFS                = -DPERLDLL -DPERL_CORE
@@ -215,15 +219,15 @@ a = .a
 # Options
 #
 RUNTIME                =
-INCLUDES       = -I.\include -I. -I..
+INCLUDES       = -I$(COREDIR) -I.\include -I. -I..
 DEFINES                = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
 LOCDEFS                = -DPERLDLL -DPERL_CORE
 SUBSYS         = console
 CXX_FLAG       = -xc++
 
 LIBC           = -lcrtdll
-LIBFILES       = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 -lmingw32 \
-               -lgcc -lmoldname $(LIBC) -lkernel32
+LIBFILES       = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 \
+               -lmingw32 -lgcc -lmoldname $(LIBC) -lkernel32
 
 .IF  "$(CFG)" == "Debug"
 OPTIMIZE       = -g -O2 $(RUNTIME) -DDEBUGGING
@@ -250,9 +254,9 @@ LIB32               = $(LINK32) -lib
 #
 
 RUNTIME                = -MD
-INCLUDES       = -I.\include -I. -I..
+INCLUDES       = -I$(COREDIR) -I.\include -I. -I..
 #PCHFLAGS      = -Fpc:\temp\vcmoduls.pch -YX 
-DEFINES                = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG)
+DEFINES                = -DWIN32 -D_CONSOLE -DNO_STRICT $(BUILDOPT) $(CRYPT_FLAG)
 LOCDEFS                = -DPERLDLL -DPERL_CORE
 SUBSYS         = console
 CXX_FLAG       = -TP -GX
@@ -405,7 +409,11 @@ CFGH_TMPL  = config_H.bc
 
 CFGSH_TMPL     = config.gc
 CFGH_TMPL      = config_H.gc
-PERLIMPLIB     *= ..\libperl$(a)
+.IF "$(OBJECT)" == "-DPERL_OBJECT"
+PERLIMPLIB     = ..\libperlcore$(a)
+.ELSE
+PERLIMPLIB     = ..\libperl$(a)
+.ENDIF
 
 .ELSE
 
@@ -420,7 +428,7 @@ PERL95EXE   = ..\perl95.exe
 .IF "$(OBJECT)" == "-DPERL_OBJECT"
 PERLIMPLIB     *= ..\perlcore$(a)
 PERLDLL                = ..\perlcore.dll
-CAPILIB                = $(COREDIR)\PerlCAPI$(a)
+CAPILIB                = $(COREDIR)\perlCAPI$(a)
 .ELSE
 PERLIMPLIB     *= ..\perl$(a)
 PERLDLL                = ..\perl.dll
@@ -465,10 +473,6 @@ MICROCORE_SRC      =               \
                ..\universal.c  \
                ..\util.c
 
-.IF "$(CRYPT_SRC)" != ""
-MICROCORE_SRC  += ..\$(CRYPT_SRC)
-.ENDIF
-
 .IF "$(PERL_MALLOC)" == "define"
 EXTRACORE_SRC  += ..\malloc.c
 .ENDIF
@@ -485,13 +489,17 @@ WIN32_SRC =               \
 WIN32_SRC      += .\win32thread.c 
 .ENDIF
 
+.IF "$(CRYPT_SRC)" != ""
+WIN32_SRC      += .\$(CRYPT_SRC)
+.ENDIF
+
 PERL95_SRC     =               \
                perl95.c        \
                win32mt.c       \
                win32sckmt.c
 
 .IF "$(CRYPT_SRC)" != ""
-PERL95_SRC     += ..\$(CRYPT_SRC)
+PERL95_SRC     += .\$(CRYPT_SRC)
 .ENDIF
 
 DLL_SRC                = $(DYNALOADER).c
@@ -884,24 +892,24 @@ $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
 
 .IF "$(OBJECT)" == "-DPERL_OBJECT"
 
-PerlCAPI.cpp : $(MINIPERL)
+perlCAPI.cpp : $(MINIPERL)
        $(MINIPERL) GenCAPI.pl $(COREDIR)
 
-PerlCAPI$(o) : PerlCAPI.cpp
+perlCAPI$(o) : perlCAPI.cpp
 .IF "$(CCTYPE)" == "BORLAND"
-       $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
+       $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
 .ELIF "$(CCTYPE)" == "GCC"
-       $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
+       $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
 .ELSE
        $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
-           $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
+           $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
 .ENDIF
 
-$(CAPILIB) : PerlCAPI.cpp PerlCAPI$(o)
+$(CAPILIB) : perlCAPI.cpp perlCAPI$(o)
 .IF "$(CCTYPE)" == "BORLAND"
-       $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +PerlCAPI$(o)
+       $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +perlCAPI$(o)
 .ELSE
-       $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) PerlCAPI$(o)
+       $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) perlCAPI$(o)
 .ENDIF
 
 .ENDIF
@@ -970,13 +978,13 @@ $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
        cd $(EXTDIR)\$(*B) && $(MAKE)
 
 doc: $(PERLEXE)
-       copy ..\README.win32 ..\pod\perlwin32.pod
        $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
            --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
            --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
 
 utils: $(PERLEXE) $(X2P)
        cd ..\utils && $(MAKE) PERL=$(MINIPERL)
+       copy ..\README.win32 ..\pod\perlwin32.pod
        cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
        $(PERLEXE) $(PL2BAT) $(UTILS)
 
@@ -1063,7 +1071,7 @@ clean :
        -@erase $(MINIPERL)
        -@erase perlglob$(o)
        -@erase perlmain$(o)
-       -@erase PerlCAPI.cpp
+       -@erase perlCAPI.cpp
        -@erase config.w32
        -@erase /f config.h
        -@erase $(GLOBEXE)