Index: /gsdl/trunk/runtime-src/packages/d2m/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/packages/d2m/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/packages/d2m/win32.mak	(revision 19521)
@@ -10,18 +10,25 @@
 AR = lib
 
+DEBUG = 0
 DLL = 0
 DLLDEBUG = 0
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+!ENDIF
+
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
+CXXFLAGS = $(CXXFLAGS) -GX
 !ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
 !IF $(DLL)
-CPPFLAGS = $(CPPFLAGS) -MD 
+CXXFLAGS = $(CXXFLAGS) -MD 
 !ELSE
 !IF ($(DLLDEBUG))
-CPPFLAGS = $(CPPFLAGS) -MDd
+CXXFLAGS = $(CXXFLAGS) -MDd
 !ENDIF
 !ENDIF
@@ -31,5 +38,5 @@
 DEFS=-DHAVE_CONFIG_H -D__WIN32__ -D_CRT_SECURE_NO_DEPRECATE
 INCLUDES= -I"$(GSDLHOME)"
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 
 LIB_OBJS = MARC2709$o MARCtidy$o usMARC$o util$o strcasecmp$o
Index: /gsdl/trunk/runtime-src/src/colservr/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/src/colservr/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/src/colservr/win32.mak	(revision 19521)
@@ -34,4 +34,5 @@
 
 GSDL_VC4 = 0
+DEBUG = 0
 DLL = 0
 DLLDEBUG = 0
@@ -39,16 +40,22 @@
 USE_MSSQL = 0
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+!ENDIF
+
 
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
+CXXFLAGS = $(CXXFLAGS) -GX
 !ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
 !IF $(DLL)
-CPPFLAGS = $(CPPFLAGS) -MD
+CXXFLAGS = $(CXXFLAGS) -MD
 !ELSE
 !IF ($(DLLDEBUG))
-CPPFLAGS = $(CPPFLAGS) -MDd
+CXXFLAGS = $(CXXFLAGS) -MDd
 !ENDIF
 !ENDIF
@@ -86,5 +93,5 @@
 
 
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 
 
Index: /gsdl/trunk/runtime-src/src/oaiservr/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/src/oaiservr/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/src/oaiservr/win32.mak	(revision 19521)
@@ -38,4 +38,5 @@
 
 GSDL_VC4 = 0
+DEBUG = 0
 LOCAL_LIBRARY = 0
 DLL = 0
@@ -44,16 +45,21 @@
 USE_SQLITE = 1
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+!ENDIF
 
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
+CXXFLAGS = $(CXXFLAGS) -GX
 !ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
 !IF $(DLL)
-CPPFLAGS = $(CPPFLAGS) -MD
+CXXFLAGS = $(CXXFLAGS) -MD
 !ELSE
 !IF ($(DLLDEBUG))
-CPPFLAGS = $(CPPFLAGS) -MDd
+CXXFLAGS = $(CXXFLAGS) -MDd
 !ENDIF
 !ENDIF
@@ -93,5 +99,5 @@
 
 
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 LINK = $(CC) -nologo -Fe"$@" 
 
Index: /gsdl/trunk/runtime-src/src/protocol/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/src/protocol/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/src/protocol/win32.mak	(revision 19521)
@@ -35,19 +35,25 @@
 
 GSDL_VC4 = 0
+DEBUG = 0
 DLL = 0
 DLLDEBUG = 0
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+!ENDIF
 
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
+CXXFLAGS = $(CXXFLAGS) -GX
 !ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
 !IF $(DLL)
-CPPFLAGS = $(CPPFLAGS) -MD
+CXXFLAGS = $(CXXFLAGS) -MD
 !ELSE
 !IF ($(DLLDEBUG))
-CPPFLAGS = $(CPPFLAGS) -MDd
+CXXFLAGS = $(CXXFLAGS) -MDd
 !ENDIF
 !ENDIF
@@ -67,5 +73,5 @@
 
 
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 
 
Index: /gsdl/trunk/runtime-src/src/recpt/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/src/recpt/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/src/recpt/win32.mak	(revision 19521)
@@ -40,4 +40,5 @@
 LOCAL_LIBRARY = 0
 USE_Z3950 = 0
+DEBUG = 0
 DLL = 0
 DLLDEBUG = 0
@@ -45,16 +46,21 @@
 USE_SQLITE = 1
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+!ENDIF
 
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
-!ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -GX
+!ELSE
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
 !IF $(DLL)
-CPPFLAGS = $(CPPFLAGS) -MD
+CXXFLAGS = $(CXXFLAGS) -MD
 !ELSE
 !IF ($(DLLDEBUG))
-CPPFLAGS = $(CPPFLAGS) -MDd
+CXXFLAGS = $(CXXFLAGS) -MDd
 !ENDIF
 !ENDIF
@@ -105,5 +111,5 @@
 
 
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
 
Index: /gsdl/trunk/runtime-src/src/w32apachectl/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/src/w32apachectl/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/src/w32apachectl/win32.mak	(revision 19521)
@@ -45,15 +45,21 @@
 GSDL_VC4 = 0
 LOCAL_LIBRARY = 0
+DEBUG = 0
 DLL = 0
 DLLDEBUG = 0
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+!ENDIF
 
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
+CXXFLAGS = $(CXXFLAGS) -GX
 !ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
-CPPFLAGS = $(CPPFLAGS) -MT 
+CXXFLAGS = $(CXXFLAGS) -MT 
 
 CC = cl
@@ -73,5 +79,5 @@
 
 
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
 
Index: /gsdl/trunk/runtime-src/src/w32server/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/src/w32server/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/src/w32server/win32.mak	(revision 19521)
@@ -38,12 +38,21 @@
 
 GSDL_VC4 = 0
+DEBUG = 0
 ENABLE_ACCENTFOLD = 1
 USE_SQLITE = 1
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+LDFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+LDFLAGS = 
+!ENDIF
+
 
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
+CXXFLAGS = $(CXXFLAGS) -GX
 !ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
@@ -69,5 +78,5 @@
         -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text" \
     	-I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
-LDFLAGS =
+
 LIBS = "$(COMMON_PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
         "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
@@ -85,5 +94,5 @@
 
 
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
 
@@ -157,5 +166,5 @@
 	del *.obj
 	del $(EXECUTABLE)
-
+	if exist *.pdb del *.pdb
 
 # Resources stuff
Index: /gsdl/trunk/runtime-src/src/z3950/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/src/z3950/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/src/z3950/win32.mak	(revision 19521)
@@ -37,4 +37,5 @@
 
 GSDL_VC4 = 0
+DEBUG = 0
 DLL = 0
 DLLDEBUG = 0
@@ -42,16 +43,21 @@
 USE_SQLITE = 1
 
+!IF $(DEBUG)
+CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
+!ELSE
+CXXFLAGS =
+!ENDIF
 
 !IF $(GSDL_VC4)
-CPPFLAGS = -GX
+CXXFLAGS = $(CXXFLAGS) -GX
 !ELSE
-CPPFLAGS = -EHsc
+CXXFLAGS = $(CXXFLAGS) -EHsc
 !ENDIF
 
 !IF $(DLL)
-CPPFLAGS = $(CPPFLAGS) -MD
+CXXFLAGS = $(CXXFLAGS) -MD
 !ELSE
 !IF ($(DLLDEBUG))
-CPPFLAGS = $(CPPFLAGS) -MDd
+CXXFLAGS = $(CXXFLAGS) -MDd
 !ENDIF
 !ENDIF
@@ -89,5 +95,5 @@
 
 
-COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
 
Index: /gsdl/trunk/runtime-src/win32.mak
===================================================================
--- /gsdl/trunk/runtime-src/win32.mak	(revision 19520)
+++ /gsdl/trunk/runtime-src/win32.mak	(revision 19521)
@@ -31,4 +31,5 @@
 LOCAL_LIBRARY = 0
 APACHE_HTTPD = 0
+DEBUG = 0
 DLL = 0
 DLLDEBUG = 0
@@ -58,4 +59,7 @@
 MAKECMD = $(MAKECMD) APACHE_HTTPD=1
 INSTALLDIRS = $(INSTALLDIRS) packages\apache-httpd
+!ENDIF
+!IF $(DEBUG)
+MAKECMD = $(MAKECMD) DEBUG=1
 !ENDIF
 !IF $(DLL)
