# uncomment to enable multiple interpreters. This is need for fork()
# emulation.
#
-#USE_MULTI *= define
+USE_MULTI *= define
#
# Beginnings of interpreter cloning/threads; still very incomplete.
# This should be enabled to get the fork() emulation. This needs
# USE_MULTI as well.
#
-#USE_ITHREADS *= define
+USE_ITHREADS *= define
#
# uncomment to enable the implicit "host" layer for all system calls
# made by perl. This needs USE_MULTI above. This is also needed to
# get fork().
#
-#USE_IMP_SYS *= define
+USE_IMP_SYS *= define
#
# WARNING! This option is deprecated and will eventually go away (enable
# Visual C++ > 2.x and < 6.x
#CCTYPE *= MSVC
# Visual C++ >= 6.x
-#CCTYPE *= MSVC60
+CCTYPE *= MSVC60
# Borland 5.02 or later
#CCTYPE *= BORLAND
# mingw32+gcc-2.95.2 or better
-CCTYPE *= GCC
+#CCTYPE *= GCC
#
# uncomment this if you are compiling under Windows 95/98 and command.com
# run in about 10% less time.
DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
+.IF "$(CFG)" == "Debug"
+.ELSE
# VC 6.0 seems capable of compiling perl correctly with optimizations
# enabled. Anything earlier fails tests.
CFG *= Optimize
.ENDIF
+.ENDIF
ARCHDIR = ..\lib\$(ARCHNAME)
COREDIR = ..\lib\CORE
IMPLIB = dlltool
RSC = rc
+i = .i
o = .o
a = .a
.IF "$(CFG)" == "Debug"
.IF "$(CCTYPE)" == "MSVC20"
OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
+LINK_DBG = -debug -pdb:none
.ELSE
-OPTIMIZE = -Od -MD -Zi -DDEBUGGING
+# -Zi requires .pdb file(s)
+#OPTIMIZE = -Od -MD -Zi -DDEBUGGING
+#LINK_DBG = -debug
+OPTIMIZE = -O1 -MD -Z7 -DDEBUGGING
+LINK_DBG = -debug -debugtype:both -pdb:none
.ENDIF
-LINK_DBG = -debug -pdb:none
.ELSE
.IF "$(CFG)" == "Optimize"
# -O1 yields smaller code, which turns out to be faster than -O2
# Rules
#
-.SUFFIXES : .c $(o) .dll $(a) .exe .rc .res
+.SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
.c$(o):
$(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
+.c.i:
+ $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
+
.y.c:
$(NOOP)