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)" == "12.00.21005.1"
\r
131 !IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
\r
132 !MESSAGE *** Cannot determine Visual C++ version
\r
133 !ERROR *** Aborting make job
\r
135 !MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
\r
136 !MESSAGE *** Using Microsoft Visual C++ version $(GEOS_MSVC)
\r
137 !MESSAGE *** Using Microsoft C/C++ version $(GEOS_MSC)
\r
140 ###############################################################################
\r
141 # Optional use of Visual Leak Detector (VLD) http://vld.codeplex.com/
\r
142 # Uncomment this line to use VLD in debug configuration only:
\r
143 !IF "$(BUILD_DEBUG)" == "YES"
\r
144 MSVC_VLD_DIR=$(EXTLIBDIR)\Source\vld\vld
\r
147 !IFDEF MSVC_VLD_DIR
\r
148 MSVC_VLD_FLAGS=-DMSVC_USE_VLD=1 -I$(MSVC_VLD_DIR)\include
\r
150 MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win64
\r
152 MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win32
\r
156 ###############################################################################
\r
157 # Include directories
\r
159 GEOS_INCLUDE = -I..\include -I..\capi
\r
161 !MESSAGE *** Setting GEOS_INCLUDE $(GEOS_INCLUDE)
\r
162 !MESSAGE *** Setting INCLUDE $(INCLUDE)
\r
164 ###############################################################################
\r
165 # Compilation flags for Release and Debug modes
\r
167 GEOS_CPPFLAGS = /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI"
\r
168 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "GEOS_DLL_EXPORT" $(MSVC_VLD_FLAGS)
\r
170 !IF "$(BUILD_DEBUG)" == "YES"
\r
172 GEOS_CFLAGS = /nologo /MDd /GR /Od /W4 /Zi
\r
173 GEOS_CPPFLAGS = /D "DEBUG" /D "_DEBUG" $(GEOS_CPPFLAGS)
\r
175 GEOS_CFLAGS = /nologo /MD /GR /O2 /W3
\r
176 GEOS_CPPFLAGS = /D "NDEBUG" $(GEOS_CPPFLAGS)
\r
179 # Compiler version specific flags
\r
180 !IF $(GEOS_MSC) >= 1400
\r
181 GEOS_CFLAGS = $(GEOS_CFLAGS) /EHs
\r
182 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE"
\r
184 GEOS_CFLAGS = $(GEOS_CFLAGS) /GX
\r
187 # For Visual C++ 9.0+ use multiple process build
\r
188 !IF "$(BUILD_BATCH)" == "YES"
\r
189 !IF $(GEOS_MSC) > 1400
\r
191 !MESSAGE *** Setting /MP flag to number of effective processors
\r
195 !IF "$(ENABLE_INLINE)" == "YES"
\r
196 GEOS_CFLAGS = /D "GEOS_INLINE"
\r
199 !MESSAGE *** Using GEOS_CFLAGS $(GEOS_CFLAGS)
\r
200 !MESSAGE *** Using GEOS_CPPFLAGS $(GEOS_CPPFLAGS)
\r
202 CFLAGS=$(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)
\r
204 !MESSAGE *** Complete CFLAGS $(CFLAGS)
\r
206 ###############################################################################
\r
209 LIBNAME = geos$(BUILD_PREFIX).lib
\r
210 DLLNAME = geos$(BUILD_PREFIX).dll
\r
211 SLIBNAME = geos_i$(BUILD_PREFIX).lib
\r
212 CDLLNAME = geos_c$(BUILD_PREFIX).dll
\r
213 CLIBNAME = geos_c_i$(BUILD_PREFIX).lib
\r
215 ###############################################################################
\r
216 # Building toolset programs
\r
223 # Linker executable
\r
224 # - Dynamic-Linked Libraries
\r
226 # - Static Libraries (use of lib.exe wrapper is not portable, see VC++ Toolkit 2003)
\r
229 LINKER_FLAGS = $(MSVC_VLD_LIB)
\r
231 !MESSAGE **********************************************************************
\r