source: trunk/nmake.opt

Last change on this file was 4340, checked in by mloskot, 7 years ago

Add NMAKE version from VS2017 RTM

File size: 7.4 KB
Line 
1#
2# nmake.opt - main configuration file for NMAKE makefiles
3#
4!MESSAGE **********************************************************************
5!MESSAGE *** GEOS Build Configuration ***
6
7# TODO: Confirm as redundant and remove, nmake /P displays _NMAKE_VER anyway.
8#!INCLUDE <ntwin32.mak>
9
10###############################################################################
11# For convenience, user may put custom settings to private mynmake.opt
12# and use EXT_NMAKE_OPT option while calling nmake.exe, as follows:
13#
14# nmake -f makefile.vc EXT_NMAKE_OPT=mynmake.opt
15
16!IFDEF EXT_NMAKE_OPT
17!MESSAGE *** Setting EXT_NMAKE_OPT $(EXT_NMAKE_OPT)
18!INCLUDE $(EXT_NMAKE_OPT)
19!ENDIF
20
21###############################################################################
22# Set BUILD_DEBUG to YES if you want to make debug build
23# and to prepare not optimized binaries.
24
25!IFNDEF BUILD_DEBUG
26BUILD_DEBUG = NO
27!ENDIF
28
29!MESSAGE *** Setting BUILD_DEBUG $(BUILD_DEBUG)
30
31###############################################################################
32# Set ENABLE_INLINE to YES if you want to make debug build
33# and to prepare not optimized binaries.
34
35!IFNDEF ENABLE_INLINE
36ENABLE_INLINE = NO
37!ENDIF
38
39!MESSAGE *** Setting ENABLE_INLINE $(ENABLE_INLINE)
40
41###############################################################################
42# Set BUILD_BATCH to YES if you want feed compiler with all
43# source .c and .cpp files in single batch.
44
45!IFNDEF BUILD_BATCH
46BUILD_BATCH = NO
47!ENDIF
48
49!MESSAGE *** Setting BUILD_BATCH $(BUILD_BATCH)
50
51###############################################################################
52# Set WIN64=YES if you are building for 64-bit windows (x64).
53# Alternatively, pass WIN64=YES as NMAKE command line argument.
54###############################################################################
55!IFNDEF WIN64
56WIN64 = NO
57!ENDIF
58
59!MESSAGE *** Setting WIN64 $(WIN64)
60
61###############################################################################
62# Derive version of Visual C++ being used from NMAKE if not specified
63#
64# WARNING:
65# If we should expect variety of NMAKE build versions, tests below may fail
66# and we will need to fall back to setting GEOS_MSVC as command line parameter.
67
68!IF "$(_NMAKE_VER)" == ""
69GEOS_MSVC = 4.0
70!ERROR *** Failed to determine version of Visual C++
71!ELSEIF "$(_NMAKE_VER)" == "162"
72GEOS_MSVC = 5.0
73!ERROR *** Detected Visual C++ 5.0 - NOT SUPPORTED
74!ELSEIF "$(_NMAKE_VER)" == "6.00.8168.0"
75GEOS_MSVC = 6.0
76GEOS_MSC = 1200
77!ERROR *** Detected Visual C++ 6.0 - NOT SUPPORTED
78!ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
79GEOS_MSVC = 7.0
80GEOS_MSC = 1300
81!ELSEIF "$(_NMAKE_VER)" == "7.10.3077"
82GEOS_MSVC = 7.1
83GEOS_MSC = 1310
84!ELSEIF "$(_NMAKE_VER)" == "8.00.50727.42"
85GEOS_MSVC = 8.0
86GEOS_MSC = 1400
87!ELSEIF "$(_NMAKE_VER)" == "8.00.50727.762"
88GEOS_MSVC = 8.0
89GEOS_MSC = 1400
90!ELSEIF "$(_NMAKE_VER)" == "9.00.21022.08"
91GEOS_MSVC = 9.0
92GEOS_MSC = 1500
93!ELSEIF "$(_NMAKE_VER)" == "9.00.30729.01"
94GEOS_MSVC = 9.0
95GEOS_MSC = 1500
96!ELSEIF "$(_NMAKE_VER)" == "10.00.30128.01"
97GEOS_MSVC = 10.0
98GEOS_MSC = 1600
99!ELSEIF "$(_NMAKE_VER)" == "10.00.30319.01"
100GEOS_MSVC = 10.0
101GEOS_MSC = 1600
102!ELSEIF "$(_NMAKE_VER)" == "11.00.40825.2"
103GEOS_MSVC = 11.0
104GEOS_MSC = 1700
105!ELSEIF "$(_NMAKE_VER)" == "11.00.50522.1"
106GEOS_MSVC = 11.0
107GEOS_MSC = 1700
108!ELSEIF "$(_NMAKE_VER)" == "11.00.50727.1"
109GEOS_MSVC = 11.0
110GEOS_MSC = 1700
111!ELSEIF "$(_NMAKE_VER)" == "11.00.51106.1"
112GEOS_MSVC = 11.0
113GEOS_MSC = 1700
114!ELSEIF "$(_NMAKE_VER)" == "11.00.60315.1"
115GEOS_MSVC = 11.0
116GEOS_MSC = 1700
117!ELSEIF "$(_NMAKE_VER)" == "11.00.60430.2"
118GEOS_MSVC = 11.0
119GEOS_MSC = 1700
120!ELSEIF "$(_NMAKE_VER)" == "11.00.60521.0"
121GEOS_MSVC = 11.0
122GEOS_MSC = 1700
123!ELSEIF "$(_NMAKE_VER)" == "11.00.60610.1"
124GEOS_MSVC = 11.0
125GEOS_MSC = 1700
126!ELSEIF "$(_NMAKE_VER)" == "11.00.61030.0"
127GEOS_MSVC = 11.0
128GEOS_MSC = 1700
129!ELSEIF "$(_NMAKE_VER)" == "12.00.21005.1"
130GEOS_MSVC = 12.0
131GEOS_MSC = 1800
132!ELSEIF "$(_NMAKE_VER)" == "14.00.22816.0"
133GEOS_MSVC = 14.0
134GEOS_MSC = 1900
135!ELSEIF "$(_NMAKE_VER)" == "14.00.23026.0"
136GEOS_MSVC = 14.0
137GEOS_MSC = 1900
138!ELSEIF "$(_NMAKE_VER)" == "14.00.23506.0"
139GEOS_MSVC = 14.0
140GEOS_MSC = 1900
141!ELSEIF "$(_NMAKE_VER)" == "14.00.24210.0"
142GEOS_MSVC = 14.0
143GEOS_MSC = 1900
144!ELSEIF "$(_NMAKE_VER)" == "14.10.25017.0"
145GEOS_MSVC = 14.10
146GEOS_MSC = 1910
147!ELSE
148GEOS_MSVC = 0.0
149GEOS_MSC = 0
150!ENDIF
151
152!IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
153!MESSAGE *** Cannot determine Visual C++ version
154!ERROR *** Aborting make job
155!ELSE
156!MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
157!MESSAGE *** Using Microsoft Visual C++ version $(GEOS_MSVC)
158!MESSAGE *** Using Microsoft C/C++ version $(GEOS_MSC)
159!ENDIF
160
161###############################################################################
162# Optional use of Visual Leak Detector (VLD) http://vld.codeplex.com/
163# Uncomment this line to use VLD in debug configuration only:
164#MSVC_VLD_DIR=$(EXTLIBDIR)\Source\vld\vld
165
166!IF "$(BUILD_DEBUG)" == "YES"
167!IFDEF MSVC_VLD_DIR
168MSVC_VLD_FLAGS=-DMSVC_USE_VLD=1 -I$(MSVC_VLD_DIR)\include
169!IFDEF WIN64
170MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win64
171!ELSE
172MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win32
173!ENDIF
174!ENDIF
175!ENDIF
176
177###############################################################################
178# Include directories
179
180GEOS_INCLUDE = -I..\include -I..\capi
181
182!MESSAGE *** Setting GEOS_INCLUDE $(GEOS_INCLUDE)
183!MESSAGE *** Setting INCLUDE $(INCLUDE)
184
185###############################################################################
186# Compilation flags for Release and Debug modes
187
188GEOS_CPPFLAGS = /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI"
189GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "GEOS_DLL_EXPORT" $(MSVC_VLD_FLAGS)
190
191!IF "$(BUILD_DEBUG)" == "YES"
192BUILD_PREFIX=_d
193GEOS_CFLAGS = /nologo /MDd /GR /Od /W4 /Zi
194GEOS_CPPFLAGS = /D "DEBUG" /D "_DEBUG" $(GEOS_CPPFLAGS)
195!ELSE
196GEOS_CFLAGS = /nologo /MD /GR /O2 /W3
197GEOS_CPPFLAGS = /D "NDEBUG" $(GEOS_CPPFLAGS)
198!ENDIF
199
200# Compiler version specific flags
201!IF $(GEOS_MSC) >= 1400
202GEOS_CFLAGS = $(GEOS_CFLAGS) /EHs
203GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE"
204!ELSE
205GEOS_CFLAGS = $(GEOS_CFLAGS) /GX
206!ENDIF
207
208# For Visual C++ 9.0+ use multiple process build
209!IF "$(BUILD_BATCH)" == "YES"
210!IF $(GEOS_MSC) > 1400
211MPFLAGS = /MP
212!MESSAGE *** Setting /MP flag to number of effective processors
213!ENDIF
214!ENDIF
215
216!IF "$(ENABLE_INLINE)" == "YES"
217GEOS_CFLAGS = /D "GEOS_INLINE"
218!ENDIF
219
220!MESSAGE *** Using GEOS_CFLAGS $(GEOS_CFLAGS)
221!MESSAGE *** Using GEOS_CPPFLAGS $(GEOS_CPPFLAGS)
222
223CFLAGS=$(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)
224
225!MESSAGE *** Complete CFLAGS $(CFLAGS)
226
227###############################################################################
228# Output location
229
230LIBNAME = geos$(BUILD_PREFIX).lib
231DLLNAME = geos$(BUILD_PREFIX).dll
232SLIBNAME = geos_i$(BUILD_PREFIX).lib
233CDLLNAME = geos_c$(BUILD_PREFIX).dll
234CLIBNAME = geos_c_i$(BUILD_PREFIX).lib
235
236###############################################################################
237# Building toolset programs
238
239MAKE = nmake
240CC = cl
241RM = del
242CP = copy
243
244# Linker executable
245# - Dynamic-Linked Libraries
246# $(LINK) /dll
247# - Static Libraries (use of lib.exe wrapper is not portable, see VC++ Toolkit 2003)
248# $(LINK) /lib
249LINK = link.exe
250LINKER_FLAGS = $(MSVC_VLD_LIB)
251
252!MESSAGE **********************************************************************
253# EOF
Note: See TracBrowser for help on using the repository browser.