forked from libgeos/geos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnmake.opt
182 lines (150 loc) · 5.34 KB
/
nmake.opt
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
#
# 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)
###############################################################################
# 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
!ELSE
GEOS_MSVC = 0.0
GEOS_MSC = 0
!ENDIF
!IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
!MESSAGE *** Cannot determined 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
###############################################################################
# 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"
!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 CFLAGS $(GEOS_CFLAGS)
!MESSAGE *** Using CPPFLAGS $(GEOS_CPPFLAGS)
CFLAGS= $(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)
###############################################################################
# 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
!MESSAGE **********************************************************************
# EOF