forked from MapServer/tinyows
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nmake.opt
214 lines (176 loc) · 7.98 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
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
########################################################################
# nmake.opt - Tinyows configuration for MSVC++
########################################################################
########################################################################
# Section I: Tinyows Compilation Options
########################################################################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Uncomment the following if you are building for 64-bit windows
# (x64). You'll need to have PATH, INCLUDE and LIB set up for 64-bit
# compiles.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#WIN64=YES
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Check compiler version given in command line
# nmake -f makefile.vc MSVC_VER=xxxx
# 1310 = 7.1 (2003) 1400 = 8.0 (2005)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!IFNDEF MSVC_VER
#assume msvc 7.1
MSVC_VER=1310
!ENDIF
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# File locations and where to install things
# ----------------------------------------------------------------------
# If you are using the MapServer Build Kit, almost everything should be
# relative to this directory throughout this option file.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Set the following to point to the directory adjacent to the dependent libs.
!IFNDEF TINY_BASE
TINY_BASE = C:\build\release-1400-dev\tinyows-svn
#TINY_BASE = .
!ENDIF
# Set the following to point to the current (tinyows) directory.
!IFNDEF TINY_CURRENT
TINY_CURRENT = $(TINY_BASE)
!ENDIF
!IFNDEF BINDIR
BINDIR = $(TINY_BASE)\..\bin
!ENDIF
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Optmization, debug, and related compile flags.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!IF $(MSVC_VER) == 1400
# Optimized, with using MSVCRT.
OPTFLAGS = /nologo /Ox /MD $(WARNING_LEVEL) $(DEBUG) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
# Debug with MSVCRT
#OPTFLAGS = /nologo /Zi /MD $(WARNING_LEVEL) $(DEBUG) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
#LDFLAGS = /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /DEBUG
!ELSE
# Optimized, with using MSVCRT.
OPTFLAGS = /nologo /Ox /MD $(WARNING_LEVEL) $(DEBUG) /EHsc
# Debug with MSVCRT
#OPTFLAGS = /nologo /Zi /MDd $(WARNING_LEVEL) $(DEBUG) /EHsc
#LDFLAGS = /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /DEBUG
!ENDIF
# Set the Warning level for the compiler (defaults to W1)
WARNING_LEVEL=/W3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Debugging Options
# ----------------------------------------------------------------------
#NEED_NONBLOCKING_STDERR=-DNEED_NONBLOCKING_STDERR
ENABLE_STDERR_DEBUG=-DENABLE_STDERR_DEBUG
# Set the linker debug option
LDEBUG=/debug
# DEBUG Build flags
# Set the DEBUG flag if you wish to make a debug build
DEBUG=/DDEBUG
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# String methods
# ----------------------------------------------------------------------
# Apparently these aren't as commonplace. Edit the
# following line to reflect the missing functions on your platform.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP
STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT -DNEED_STRRSTR
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Direct connectivity to Postgresql PostGIS.
# ----------------------------------------------------------------------
# To turn on direct connectivity to Postgresql PostGIS uncomment the following
# flag and set the full path name to the project directory for the
# Postgresql native Win32 client library.
# See http://www.postgresql.org for support library.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
POSTGIS =-DUSE_POSTGIS
POSTGIS_DIR =$(TINY_BASE)\..\release-1400\postgresql-8.3.3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# LIBXML: utility library to write xml.
# http://xmlsoft.org/index.html
# WFS, WCS and SOS all need this flag to be activated
# NOTE: ICONV is required when libxml2 is activated
# ----------------------------------------------------------------------
XML2_ENABLED=-DUSE_LIBXML2
LIBXML_DIR=$(TINY_BASE)\..\release-1400
########################################################################
# Section II: Mapserver Rendering Configuration
########################################################################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ICONV
# ----------------------------------------------------------------------
#libiconv support is used for to support double bytes (see bug 911).
#uncomment the following to build with libiconv support.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ICONV=-DUSE_ICONV
ICONV_DIR=$(TINY_BASE)\..\release-1400
########################################################################
# Section VI: Support Libraries.
########################################################################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# REGEX Libary
# ----------------------------------------------------------------------
# VC++ does not include the REGEX library... so we must provide our one.
# The following definitions will try to build GNU regex-0.12 located in the
# regex-0.12 sub-directory.
# If it was not included in the source distribution, then you can get it from:
# ftp://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz
# Provide the full path to the REGEX project directory
# You do not need this library if you are compiling for PHP mapscript.
# In that case the PHP regex library will be used instead
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!IFNDEF PHP_REGEX
REGEX_DIR=$(TINY_BASE)\..\regex-0.12
!ENDIF
########################################################################
# Section VII: Variable Setup
########################################################################
# Should not need to be updated.
########################################################################
TINY_LIB = tiny.lib
#libiconv support
!IFDEF ICONV
ICONV_LIB=$(ICONV_DIR)\lib\iconv.lib
ICONV_INC= -I$(ICONV_DIR)\include
!ENDIF
# LIBXML include and library
!IFDEF XML2_ENABLED
LIBXML_INC = -I$(LIBXML_DIR)/include/libxml
LIBXML_LIB = $(LIBXML_DIR)/lib/libxml2.lib
!ENDIF
# Setup REGEX object and includes
!IFNDEF PHP_REGEX
REGEX_OBJ=$(REGEX_DIR)\regex.obj
REGEX_INC=-I$(REGEX_DIR)
!ELSE
REGEX_OBJ=$(PHP_HOME)\regex\regcomp.obj $(PHP_HOME)\regex\regerror.obj \
$(PHP_HOME)\regex\regexec.obj $(PHP_HOME)\regex\regfree.obj
REGEX_INC=-I$(PHP_HOME)/regex -DPHP_NO_ALIASES
!ENDIF
# REGEX needs some special flags... here they are for VC++ 6.0
REGEX_OPT=-DHAVE_STRING_H -DREGEX_MALLOC
# Setup Postgesql PostGIS includes and libs
!IFDEF POSTGIS
!IFNDEF PHP_BUILD_CALL
# If we're building PHP MapScript, there is a macro conflict
POSTGIS_INC=-I$(POSTGIS_DIR)/src/interfaces/libpq -I$(POSTGIS_DIR)/src/include
!ENDIF
POSTGIS_LIB=$(POSTGIS_DIR)/src/interfaces/libpq/release/libpqdll.lib
!ENDIF
#######################################################################
# Section IX: Collect compiler flags
########################################################################
# Should not need to be updated.
########################################################################
!IFNDEF EXTERNAL_LIBS
EXTERNAL_LIBS=$(POSTGIS_LIB) $(ERR_LIB) $(ICONV_LIB) $(LIBXML_LIB)
!ENDIF
LIBS=$(TINY_LIB) $(EXTERNAL_LIBS)
!IFNDEF INCLUDES
INCLUDES=$(REGEX_INC) $(POSTGIS_INC) $(ICONV_INC) $(LIBXML_INC)
!ENDIF
TINY_DEFS =$(REGEX_OPT) $(STRINGS) $(POSTGIS) $(NEED_NONBLOCKING_STDERR) \
$(ENABLE_STDERR_DEBUG) $(ICONV) $(XML2_ENABLED)
!IFDEF WIN64
TINY_CFLAGS=$(INCLUDES) $(TINY_DEFS) -DWIN32 -D_WIN32 -DUSE_GENERIC_MS_NINT
!ELSE
TINY_CFLAGS=$(INCLUDES) $(TINY_DEFS) -DWIN32 -D_WIN32
!ENDIF