File: nmake.opt

package info (click to toggle)
geos 3.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 17,900 kB
  • sloc: cpp: 106,077; xml: 29,592; sh: 4,446; ansic: 1,877; makefile: 1,662; ruby: 1,295; python: 928
file content (271 lines) | stat: -rw-r--r-- 8,030 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
#
# nmake.opt - main configuration file for NMAKE makefiles
#
!MESSAGE **********************************************************************
!MESSAGE *** GEOS Build Configuration ***

# TODO: Confirm as redundant and remove, nmake /P displays _NMAKE_VER anyway.
#!INCLUDE <ntwin32.mak>

###############################################################################
# For convenience, user may put custom settings to private mynmake.opt
# and use EXT_NMAKE_OPT option while calling nmake.exe, as follows:
#
# nmake -f makefile.vc EXT_NMAKE_OPT=mynmake.opt

!IFDEF EXT_NMAKE_OPT
!MESSAGE *** Setting EXT_NMAKE_OPT $(EXT_NMAKE_OPT)
!INCLUDE $(EXT_NMAKE_OPT)
!ENDIF

###############################################################################
# Set BUILD_DEBUG to YES if you want to make debug build
# and to prepare not optimized binaries.

!IFNDEF BUILD_DEBUG
BUILD_DEBUG = NO
!ENDIF

!MESSAGE *** Setting BUILD_DEBUG $(BUILD_DEBUG)

###############################################################################
# Set ENABLE_INLINE to YES if you want to make debug build
# and to prepare not optimized binaries.

!IFNDEF ENABLE_INLINE
ENABLE_INLINE = NO
!ENDIF

!MESSAGE *** Setting ENABLE_INLINE $(ENABLE_INLINE)

###############################################################################
# Set BUILD_BATCH to YES if you want feed compiler with all
# source .c and .cpp files in single batch.

!IFNDEF BUILD_BATCH
BUILD_BATCH = NO
!ENDIF

!MESSAGE *** Setting BUILD_BATCH $(BUILD_BATCH)

###############################################################################
# Set WIN64=YES if you are building for 64-bit windows (x64).
# Alternatively, pass WIN64=YES as NMAKE command line argument.
###############################################################################
!IFNDEF WIN64
WIN64 = NO
!ENDIF

!MESSAGE *** Setting WIN64 $(WIN64)

###############################################################################
# Derive version of Visual C++ being used from NMAKE if not specified
#
# WARNING:
# If we should expect variety of NMAKE build versions, tests below may fail
# and we will need to fall back to setting GEOS_MSVC as command line parameter.

!IF "$(_NMAKE_VER)" == ""
GEOS_MSVC = 4.0
!ERROR *** Failed to determine version of Visual C++
!ELSEIF "$(_NMAKE_VER)" == "162"
GEOS_MSVC = 5.0
!ERROR *** Detected Visual C++ 5.0 - NOT SUPPORTED
!ELSEIF "$(_NMAKE_VER)" == "6.00.8168.0"
GEOS_MSVC = 6.0
GEOS_MSC = 1200
!ERROR *** Detected Visual C++ 6.0 - NOT SUPPORTED
!ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
GEOS_MSVC = 7.0
GEOS_MSC = 1300
!ELSEIF "$(_NMAKE_VER)" == "7.10.3077"
GEOS_MSVC = 7.1
GEOS_MSC = 1310
!ELSEIF "$(_NMAKE_VER)" == "8.00.50727.42"
GEOS_MSVC = 8.0
GEOS_MSC = 1400
!ELSEIF "$(_NMAKE_VER)" == "8.00.50727.762"
GEOS_MSVC = 8.0
GEOS_MSC = 1400
!ELSEIF "$(_NMAKE_VER)" == "9.00.21022.08"
GEOS_MSVC = 9.0
GEOS_MSC = 1500
!ELSEIF "$(_NMAKE_VER)" == "9.00.30729.01"
GEOS_MSVC = 9.0
GEOS_MSC = 1500
!ELSEIF "$(_NMAKE_VER)" == "10.00.30128.01"
GEOS_MSVC = 10.0
GEOS_MSC = 1600
!ELSEIF "$(_NMAKE_VER)" == "10.00.30319.01"
GEOS_MSVC = 10.0
GEOS_MSC = 1600
!ELSEIF "$(_NMAKE_VER)" == "11.00.40825.2"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.50522.1"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.50727.1"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.51106.1"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.60315.1"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.60430.2"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.60521.0"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.60610.1"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "11.00.61030.0"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
!ELSEIF "$(_NMAKE_VER)" == "12.00.21005.1"
GEOS_MSVC = 12.0
GEOS_MSC = 1800
!ELSEIF "$(_NMAKE_VER)" == "14.00.22816.0"
GEOS_MSVC = 14.0
GEOS_MSC = 1900
!ELSEIF "$(_NMAKE_VER)" == "14.00.23026.0"
GEOS_MSVC = 14.0
GEOS_MSC = 1900
!ELSEIF "$(_NMAKE_VER)" == "14.00.23506.0"
GEOS_MSVC = 14.0
GEOS_MSC = 1900
!ELSEIF "$(_NMAKE_VER)" == "14.00.23918.0"
GEOS_MSVC = 14.0
GEOS_MSC = 1900
!ELSEIF "$(_NMAKE_VER)" == "14.00.24210.0"
GEOS_MSVC = 14.0
GEOS_MSC = 1900
!ELSEIF "$(_NMAKE_VER)" == "14.10.25017.0"
GEOS_MSVC = 14.10
GEOS_MSC = 1910
!ELSEIF "$(_NMAKE_VER)" == "14.10.25019.0"
GEOS_MSVC = 14.10
GEOS_MSC = 1910
!ELSEIF "$(_NMAKE_VER)" == "14.11.25506.0"
GEOS_MSVC = 14.10
GEOS_MSC = 1910
!ELSEIF "$(_NMAKE_VER)" == "14.11.25507.1"
GEOS_MSVC = 14.10
GEOS_MSC = 1910
!ELSEIF "$(_NMAKE_VER)" == "14.11.25508.2"
GEOS_MSVC = 14.10
GEOS_MSC = 1910
!ELSEIF "$(_NMAKE_VER)" == "14.11.25547.0"
GEOS_MSVC = 14.1
GEOS_MSC = 1910
!ELSE
GEOS_MSVC = 0.0
GEOS_MSC = 0
!ENDIF

!IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
!MESSAGE *** Cannot determine Visual C++ version
!ERROR *** Aborting make job
!ELSE
!MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
!MESSAGE *** Using Microsoft Visual C++ version $(GEOS_MSVC)
!MESSAGE *** Using Microsoft C/C++ version $(GEOS_MSC)
!ENDIF

###############################################################################
# Optional use of Visual Leak Detector (VLD) http://vld.codeplex.com/
# Uncomment this line to use VLD in debug configuration only:
#MSVC_VLD_DIR=$(EXTLIBDIR)\Source\vld\vld

!IF "$(BUILD_DEBUG)" == "YES"
!IFDEF MSVC_VLD_DIR
MSVC_VLD_FLAGS=-DMSVC_USE_VLD=1 -I$(MSVC_VLD_DIR)\include
!IFDEF WIN64
MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win64
!ELSE
MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win32
!ENDIF
!ENDIF
!ENDIF

###############################################################################
# Include directories

GEOS_INCLUDE = -I..\include -I..\capi

!MESSAGE *** Setting GEOS_INCLUDE $(GEOS_INCLUDE)
!MESSAGE *** Setting INCLUDE $(INCLUDE)

###############################################################################
# Compilation flags for Release and Debug modes

GEOS_CPPFLAGS = /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI"
GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "GEOS_DLL_EXPORT" $(MSVC_VLD_FLAGS)

!IF "$(BUILD_DEBUG)" == "YES"
BUILD_PREFIX=_d
GEOS_CFLAGS = /nologo /MDd /GR /Od /W4 /Zi
GEOS_CPPFLAGS = /D "DEBUG" /D "_DEBUG" $(GEOS_CPPFLAGS)
!ELSE
GEOS_CFLAGS = /nologo /MD /GR /O2 /W3
GEOS_CPPFLAGS = /D "NDEBUG" $(GEOS_CPPFLAGS)
!ENDIF

# Compiler version specific flags
!IF $(GEOS_MSC) >= 1400
GEOS_CFLAGS = $(GEOS_CFLAGS) /EHs
GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE"
!ELSE
GEOS_CFLAGS = $(GEOS_CFLAGS) /GX
!ENDIF

# For Visual C++ 9.0+ use multiple process build
!IF "$(BUILD_BATCH)" == "YES"
!IF $(GEOS_MSC) > 1400
MPFLAGS = /MP
!MESSAGE *** Setting /MP flag to number of effective processors
!ENDIF
!ENDIF

!IF "$(ENABLE_INLINE)" == "YES"
GEOS_CFLAGS = /D "GEOS_INLINE"
!ENDIF

!MESSAGE *** Using GEOS_CFLAGS $(GEOS_CFLAGS)
!MESSAGE *** Using GEOS_CPPFLAGS $(GEOS_CPPFLAGS)

CFLAGS=$(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)

!MESSAGE *** Complete CFLAGS $(CFLAGS)

###############################################################################
# Output location

LIBNAME = geos$(BUILD_PREFIX).lib
DLLNAME = geos$(BUILD_PREFIX).dll
SLIBNAME = geos_i$(BUILD_PREFIX).lib
CDLLNAME = geos_c$(BUILD_PREFIX).dll
CLIBNAME = geos_c_i$(BUILD_PREFIX).lib

###############################################################################
# Building toolset programs

MAKE = nmake
CC = cl
RM = del
CP = copy

# Linker executable
# - Dynamic-Linked Libraries
# $(LINK) /dll
# - Static Libraries (use of lib.exe wrapper is not portable, see VC++ Toolkit 2003)
# $(LINK) /lib
LINK = link.exe
LINKER_FLAGS = $(MSVC_VLD_LIB)

!MESSAGE **********************************************************************
# EOF