2 # nmake.opt - main configuration file for NMAKE makefiles
\r
4 !MESSAGE **********************************************************************
\r
5 !MESSAGE *** GEOS Build Configuration ***
\r
7 # TODO: Confirm as redundant and remove, nmake /P displays _NMAKE_VER anyway.
\r
8 #!INCLUDE <ntwin32.mak>
\r
10 ###############################################################################
\r
11 # For convenience, user may put custom settings to private mynmake.opt
\r
12 # and use EXT_NMAKE_OPT option while calling nmake.exe, as follows:
\r
14 # nmake -f makefile.vc EXT_NMAKE_OPT=mynmake.opt
\r
16 !IFDEF EXT_NMAKE_OPT
\r
17 !MESSAGE *** Setting EXT_NMAKE_OPT $(EXT_NMAKE_OPT)
\r
18 !INCLUDE $(EXT_NMAKE_OPT)
\r
21 ###############################################################################
\r
22 # Set BUILD_DEBUG to YES if you want to make debug build
\r
23 # and to prepare not optimized binaries.
\r
25 !IFNDEF BUILD_DEBUG
\r
29 !MESSAGE *** Setting BUILD_DEBUG $(BUILD_DEBUG)
\r
31 ###############################################################################
\r
32 # Set ENABLE_INLINE to YES if you want to make debug build
\r
33 # and to prepare not optimized binaries.
\r
35 !IFNDEF ENABLE_INLINE
\r
39 !MESSAGE *** Setting ENABLE_INLINE $(ENABLE_INLINE)
\r
41 ###############################################################################
\r
42 # Set BUILD_BATCH to YES if you want feed compiler with all
\r
43 # source .c and .cpp files in single batch.
\r
49 !MESSAGE *** Setting BUILD_BATCH $(BUILD_BATCH)
\r
51 ###############################################################################
\r
52 # Set WIN64=YES if you are building for 64-bit windows (x64).
\r
53 # Alternatively, pass WIN64=YES as NMAKE command line argument.
\r
54 ###############################################################################
\r
59 !MESSAGE *** Setting WIN64 $(WIN64)
\r
61 ###############################################################################
\r
62 # Derive version of Visual C++ being used from NMAKE if not specified
\r
65 # If we should expect variety of NMAKE build versions, tests below may fail
\r
66 # and we will need to fall back to setting GEOS_MSVC as command line parameter.
\r
68 !IF "$(_NMAKE_VER)" == ""
\r
70 !ERROR *** Failed to determine version of Visual C++
\r
71 !ELSEIF "$(_NMAKE_VER)" == "162"
\r
73 !ERROR *** Detected Visual C++ 5.0 - NOT SUPPORTED
\r
74 !ELSEIF "$(_NMAKE_VER)" == "6.00.8168.0"
\r
77 !ERROR *** Detected Visual C++ 6.0 - NOT SUPPORTED
\r
78 !ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
\r
81 !ELSEIF "$(_NMAKE_VER)" == "7.10.3077"
\r
84 !ELSEIF "$(_NMAKE_VER)" == "8.00.50727.42"
\r
87 !ELSEIF "$(_NMAKE_VER)" == "8.00.50727.762"
\r
90 !ELSEIF "$(_NMAKE_VER)" == "9.00.21022.08"
\r
93 !ELSEIF "$(_NMAKE_VER)" == "9.00.30729.01"
\r
96 !ELSEIF "$(_NMAKE_VER)" == "10.00.30128.01"
\r
99 !ELSEIF "$(_NMAKE_VER)" == "10.00.30319.01"
\r
102 !ELSEIF "$(_NMAKE_VER)" == "11.00.40825.2"
\r
105 !ELSEIF "$(_NMAKE_VER)" == "11.00.51106.1"
\r
108 !ELSEIF "$(_NMAKE_VER)" == "11.00.50727.1"
\r
111 !ELSEIF "$(_NMAKE_VER)" == "11.00.60315.1"
\r
114 !ELSEIF "$(_NMAKE_VER)" == "11.00.60430.2"
\r
117 !ELSEIF "$(_NMAKE_VER)" == "11.00.60521.0"
\r
120 !ELSEIF "$(_NMAKE_VER)" == "11.00.60610.1"
\r
123 !ELSEIF "$(_NMAKE_VER)" == "11.00.61030.0"
\r
126 !ELSEIF "$(_NMAKE_VER)" == "12.00.21005.1"
\r
134 !IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
\r
135 !MESSAGE *** Cannot determine Visual C++ version
\r
136 !ERROR *** Aborting make job
\r
138 !MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
\r
139 !MESSAGE *** Using Microsoft Visual C++ version $(GEOS_MSVC)
\r
140 !MESSAGE *** Using Microsoft C/C++ version $(GEOS_MSC)
\r
143 ###############################################################################
\r
144 # Optional use of Visual Leak Detector (VLD) http://vld.codeplex.com/
\r
145 # Uncomment this line to use VLD in debug configuration only:
\r
146 !IF "$(BUILD_DEBUG)" == "YES"
\r
147 MSVC_VLD_DIR=$(EXTLIBDIR)\Source\vld\vld
\r
150 !IFDEF MSVC_VLD_DIR
\r
151 MSVC_VLD_FLAGS=-DMSVC_USE_VLD=1 -I$(MSVC_VLD_DIR)\include
\r
153 MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win64
\r
155 MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win32
\r
159 ###############################################################################
\r
160 # Include directories
\r
162 GEOS_INCLUDE = -I..\include -I..\capi
\r
164 !MESSAGE *** Setting GEOS_INCLUDE $(GEOS_INCLUDE)
\r
165 !MESSAGE *** Setting INCLUDE $(INCLUDE)
\r
167 ###############################################################################
\r
168 # Compilation flags for Release and Debug modes
\r
170 GEOS_CPPFLAGS = /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI"
\r
171 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "GEOS_DLL_EXPORT" $(MSVC_VLD_FLAGS)
\r
173 !IF "$(BUILD_DEBUG)" == "YES"
\r
175 GEOS_CFLAGS = /nologo /MDd /GR /Od /W4 /Zi
\r
176 GEOS_CPPFLAGS = /D "DEBUG" /D "_DEBUG" $(GEOS_CPPFLAGS)
\r
178 GEOS_CFLAGS = /nologo /MD /GR /O2 /W3
\r
179 GEOS_CPPFLAGS = /D "NDEBUG" $(GEOS_CPPFLAGS)
\r
182 # Compiler version specific flags
\r
183 !IF $(GEOS_MSC) >= 1400
\r
184 GEOS_CFLAGS = $(GEOS_CFLAGS) /EHs
\r
185 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE"
\r
187 GEOS_CFLAGS = $(GEOS_CFLAGS) /GX
\r
190 # For Visual C++ 9.0+ use multiple process build
\r
191 !IF "$(BUILD_BATCH)" == "YES"
\r
192 !IF $(GEOS_MSC) > 1400
\r
194 !MESSAGE *** Setting /MP flag to number of effective processors
\r
198 !IF "$(ENABLE_INLINE)" == "YES"
\r
199 GEOS_CFLAGS = /D "GEOS_INLINE"
\r
202 !MESSAGE *** Using GEOS_CFLAGS $(GEOS_CFLAGS)
\r
203 !MESSAGE *** Using GEOS_CPPFLAGS $(GEOS_CPPFLAGS)
\r
205 CFLAGS=$(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)
\r
207 !MESSAGE *** Complete CFLAGS $(CFLAGS)
\r
209 ###############################################################################
\r
212 LIBNAME = geos$(BUILD_PREFIX).lib
\r
213 DLLNAME = geos$(BUILD_PREFIX).dll
\r
214 SLIBNAME = geos_i$(BUILD_PREFIX).lib
\r
215 CDLLNAME = geos_c$(BUILD_PREFIX).dll
\r
216 CLIBNAME = geos_c_i$(BUILD_PREFIX).lib
\r
218 ###############################################################################
\r
219 # Building toolset programs
\r
226 # Linker executable
\r
227 # - Dynamic-Linked Libraries
\r
229 # - Static Libraries (use of lib.exe wrapper is not portable, see VC++ Toolkit 2003)
\r
232 LINKER_FLAGS = $(MSVC_VLD_LIB)
\r
234 !MESSAGE **********************************************************************
\r