3 # nmake.opt - main configuration file for NMAKE makefiles
\r
5 !MESSAGE **********************************************************************
\r
6 !MESSAGE *** GEOS Build Configuration ***
\r
7 !INCLUDE <ntwin32.mak>
\r
9 ###############################################################################
\r
10 # For convenience, user may put custom settings to private mynmake.opt
\r
11 # and use EXT_NMAKE_OPT option while calling nmake.exe, as follows:
\r
13 # nmake -f makefile.vc EXT_NMAKE_OPT=mynmake.opt
\r
15 !IFDEF EXT_NMAKE_OPT
\r
16 !MESSAGE *** Setting EXT_NMAKE_OPT $(EXT_NMAKE_OPT)
\r
17 !INCLUDE $(EXT_NMAKE_OPT)
\r
20 ###############################################################################
\r
21 # Set BUILD_DEBUG to YES if you want to make debug build
\r
22 # and to prepare not optimized binaries.
\r
24 !IFNDEF BUILD_DEBUG
\r
28 !MESSAGE *** Setting BUILD_DEBUG $(BUILD_DEBUG)
\r
30 ###############################################################################
\r
31 # Set ENABLE_INLINE to YES if you want to make debug build
\r
32 # and to prepare not optimized binaries.
\r
34 !IFNDEF ENABLE_INLINE
\r
38 !MESSAGE *** Setting ENABLE_INLINE $(ENABLE_INLINE)
\r
40 ###############################################################################
\r
41 # Set BUILD_BATCH to YES if you want feed compiler with all
\r
42 # source .c and .cpp files in single batch.
\r
48 !MESSAGE *** Setting BUILD_BATCH $(BUILD_BATCH)
\r
50 ###############################################################################
\r
51 # Derive version of Visual C++ being used from NMAKE if not specified
\r
54 # If we should expect variety of NMAKE build versions, tests below may fail
\r
55 # and we will need to fall back to setting GEOS_MSVC as command line parameter.
\r
57 !IF "$(_NMAKE_VER)" == ""
\r
59 !ERROR *** Failed to determine version of Visual C++
\r
60 !ELSEIF "$(_NMAKE_VER)" == "162"
\r
62 !ERROR *** Detected Visual C++ 5.0 - NOT SUPPORTED
\r
63 !ELSEIF "$(_NMAKE_VER)" == "6.00.8168.0"
\r
66 !ERROR *** Detected Visual C++ 6.0 - NOT SUPPORTED
\r
67 !ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
\r
70 !ELSEIF "$(_NMAKE_VER)" == "7.10.3077"
\r
73 !ELSEIF "$(_NMAKE_VER)" == "8.00.50727.42"
\r
76 !ELSEIF "$(_NMAKE_VER)" == "8.00.50727.762"
\r
79 !ELSEIF "$(_NMAKE_VER)" == "9.00.21022.08"
\r
82 !ELSEIF "$(_NMAKE_VER)" == "9.00.30729.01"
\r
85 !ELSEIF "$(_NMAKE_VER)" == "10.00.30128.01"
\r
88 !ELSEIF "$(_NMAKE_VER)" == "10.00.30319.01"
\r
96 !IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
\r
97 !MESSAGE *** Cannot determined Visual C++ version
\r
98 !ERROR *** Aborting make job
\r
100 !MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
\r
101 !MESSAGE *** Using Microsoft Visual C++ version $(GEOS_MSVC)
\r
102 !MESSAGE *** Using Microsoft C/C++ version $(GEOS_MSC)
\r
105 ###############################################################################
\r
106 # Include directories
\r
108 GEOS_INCLUDE = -I..\include -I..\capi
\r
110 !MESSAGE *** Setting GEOS_INCLUDE $(GEOS_INCLUDE)
\r
111 !MESSAGE *** Setting INCLUDE $(INCLUDE)
\r
113 ###############################################################################
\r
114 # Compilation flags for Release and Debug modes
\r
116 GEOS_CPPFLAGS = /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI"
\r
117 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "GEOS_DLL_EXPORT"
\r
119 !IF "$(BUILD_DEBUG)" == "YES"
\r
121 GEOS_CFLAGS = /nologo /MDd /GR /Od /W4 /Zi
\r
122 GEOS_CPPFLAGS = /D "DEBUG" /D "_DEBUG" $(GEOS_CPPFLAGS)
\r
124 GEOS_CFLAGS = /nologo /MD /GR /O2 /W3
\r
125 GEOS_CPPFLAGS = /D "NDEBUG" $(GEOS_CPPFLAGS)
\r
128 # Compiler version specific flags
\r
129 !IF $(GEOS_MSC) >= 1400
\r
130 GEOS_CFLAGS = $(GEOS_CFLAGS) /EHs
\r
131 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE"
\r
133 GEOS_CFLAGS = $(GEOS_CFLAGS) /GX
\r
136 # For Visual C++ 9.0+ use multiple process build
\r
137 !IF "$(BUILD_BATCH)" == "YES"
\r
138 !IF $(GEOS_MSC) > 1400
\r
140 !MESSAGE *** Setting /MP flag to number of effective processors
\r
144 !IF "$(ENABLE_INLINE)" == "YES"
\r
145 GEOS_CFLAGS = /D "GEOS_INLINE"
\r
148 !MESSAGE *** Using CFLAGS $(GEOS_CFLAGS)
\r
149 !MESSAGE *** Using CPPFLAGS $(GEOS_CPPFLAGS)
\r
151 CFLAGS= $(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)
\r
153 ###############################################################################
\r
156 LIBNAME = geos$(BUILD_PREFIX).lib
\r
157 DLLNAME = geos$(BUILD_PREFIX).dll
\r
158 SLIBNAME = geos_i$(BUILD_PREFIX).lib
\r
159 CDLLNAME = geos_c$(BUILD_PREFIX).dll
\r
160 CLIBNAME = geos_c_i$(BUILD_PREFIX).lib
\r
162 ###############################################################################
\r
163 # Building toolset programs
\r
170 # Linker executable
\r
171 # - Dynamic-Linked Libraries
\r
173 # - Static Libraries (use of lib.exe wrapper is not portable, see VC++ Toolkit 2003)
\r
177 !MESSAGE **********************************************************************
\r