[geos-commits] r2130 - trunk/source

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Jul 15 09:35:05 EDT 2008


Author: mloskot
Date: 2008-07-15 09:35:05 -0400 (Tue, 15 Jul 2008)
New Revision: 2130

Modified:
   trunk/source/Makefile.vc
Log:
For building with Visual C++, added new flag DEBUG=1 (see GEOS building instructions on GEOS Wiki). Added missing flags for Visual C++ compiler, in release and debug configuration.

Modified: trunk/source/Makefile.vc
===================================================================
--- trunk/source/Makefile.vc	2008-05-20 21:34:42 UTC (rev 2129)
+++ trunk/source/Makefile.vc	2008-07-15 13:35:05 UTC (rev 2130)
@@ -19,32 +19,42 @@
 
 # Check compiler version given in command line
 # nmake -f makefile.vc MSVC_VER=xxxx
+# By default, Visual C++ 7.1 (1310) is configured.
 #
 !IFNDEF MSVC_VER
-#assume msvc 7.1
 MSVC_VER=1310
 !ENDIF
 
+# Collect compiler version specific flags
 !IF $(MSVC_VER) >= 1400
 MSVC_CPPFLAGS = /EHs /D "_CRT_SECURE_NO_DEPRECATE"
 !ELSE
 MSVC_CPPFLAGS = /GX
 !ENDIF
 
-#CFLAGS = -Iheaders /GX /MD /GR /Zi /nologo
-#CFLAGS = -Iheaders /GX /MD /GR /O1 /D "NDEBUG" /nologo
-CFLAGS = -Iheaders /MD /GR /O2 /D "NDEBUG" /nologo \
-     	 /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI" \
-	 $(MSVC_CPPFLAGS)
+# Determine requested build configuration, by default use release and
+# build optimized binaries. For Debug, use
+# nmake -f makefile.vc DEBUG=1
+!IFNDEF DEBUG
+CFLAGS = -Iheaders /MD /GR /O2 /W3 /nologo /D "NDEBUG" \
+         /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI" \
+         $(MSVC_CPPFLAGS)
+!ELSE
+CFLAGS = -Iheaders /MDd /GR /Od /W4 /Zi /nologo /D "_DEBUG" \
+         /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI" \
+         $(MSVC_CPPFLAGS)
+!ENDIF
 
-
+# Names of binary files
 LIBNAME =	geos.lib
 DLLNAME = 	geos.dll
-CDLLNAME =  	geos_c.dll
-CLIBNAME =  	geos_c_i.lib
+CDLLNAME =  geos_c.dll
+CLIBNAME =  geos_c_i.lib
 SLIBNAME =	geos_i.lib
 
-OBJ = 	algorithm\CGAlgorithms.obj \
+# List of objects
+OBJ = \
+    algorithm\CGAlgorithms.obj \
 	algorithm\CentroidArea.obj \
 	algorithm\CentroidLine.obj \
 	algorithm\CentroidPoint.obj \



More information about the geos-commits mailing list