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
128 !IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
\r
129 !MESSAGE *** Cannot determine Visual C++ version
\r
130 !ERROR *** Aborting make job
\r
132 !MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
\r
133 !MESSAGE *** Using Microsoft Visual C++ version $(GEOS_MSVC)
\r
134 !MESSAGE *** Using Microsoft C/C++ version $(GEOS_MSC)
\r
137 ###############################################################################
\r
138 # Optional use of Visual Leak Detector (VLD) http://vld.codeplex.com/
\r
139 # Uncomment this line to use VLD in debug configuration only:
\r
140 !IF "$(BUILD_DEBUG)" == "YES"
\r
141 MSVC_VLD_DIR=$(EXTLIBDIR)\Source\vld\vld
\r
144 !IFDEF MSVC_VLD_DIR
\r
145 MSVC_VLD_FLAGS=-DMSVC_USE_VLD=1 -I$(MSVC_VLD_DIR)\include
\r
147 MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win64
\r
149 MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win32
\r
153 ###############################################################################
\r
154 # Include directories
\r
156 GEOS_INCLUDE = -I..\include -I..\capi
\r
158 !MESSAGE *** Setting GEOS_INCLUDE $(GEOS_INCLUDE)
\r
159 !MESSAGE *** Setting INCLUDE $(INCLUDE)
\r
161 ###############################################################################
\r
162 # Compilation flags for Release and Debug modes
\r
164 GEOS_CPPFLAGS = /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI"
\r
165 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "GEOS_DLL_EXPORT" $(MSVC_VLD_FLAGS)
\r
167 !IF "$(BUILD_DEBUG)" == "YES"
\r
169 GEOS_CFLAGS = /nologo /MDd /GR /Od /W4 /Zi
\r
170 GEOS_CPPFLAGS = /D "DEBUG" /D "_DEBUG" $(GEOS_CPPFLAGS)
\r
172 GEOS_CFLAGS = /nologo /MD /GR /O2 /W3
\r
173 GEOS_CPPFLAGS = /D "NDEBUG" $(GEOS_CPPFLAGS)
\r
176 # Compiler version specific flags
\r
177 !IF $(GEOS_MSC) >= 1400
\r
178 GEOS_CFLAGS = $(GEOS_CFLAGS) /EHs
\r
179 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE"
\r
181 GEOS_CFLAGS = $(GEOS_CFLAGS) /GX
\r
184 # For Visual C++ 9.0+ use multiple process build
\r
185 !IF "$(BUILD_BATCH)" == "YES"
\r
186 !IF $(GEOS_MSC) > 1400
\r
188 !MESSAGE *** Setting /MP flag to number of effective processors
\r
192 !IF "$(ENABLE_INLINE)" == "YES"
\r
193 GEOS_CFLAGS = /D "GEOS_INLINE"
\r
196 !MESSAGE *** Using GEOS_CFLAGS $(GEOS_CFLAGS)
\r
197 !MESSAGE *** Using GEOS_CPPFLAGS $(GEOS_CPPFLAGS)
\r
199 CFLAGS=$(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)
\r
201 !MESSAGE *** Complete CFLAGS $(CFLAGS)
\r
203 ###############################################################################
\r
206 LIBNAME = geos$(BUILD_PREFIX).lib
\r
207 DLLNAME = geos$(BUILD_PREFIX).dll
\r
208 SLIBNAME = geos_i$(BUILD_PREFIX).lib
\r
209 CDLLNAME = geos_c$(BUILD_PREFIX).dll
\r
210 CLIBNAME = geos_c_i$(BUILD_PREFIX).lib
\r
212 ###############################################################################
\r
213 # Building toolset programs
\r
220 # Linker executable
\r
221 # - Dynamic-Linked Libraries
\r
223 # - Static Libraries (use of lib.exe wrapper is not portable, see VC++ Toolkit 2003)
\r
226 LINKER_FLAGS = $(MSVC_VLD_LIB)
\r
228 !MESSAGE **********************************************************************
\r