Remove trailing whitespace (see #556)
[xapian.git] / xapian-maintainer-tools / win32msvc / config.mak
blob4e24b3934f789c3270527d07702a3fe4abac95dd
1 # Makefile configuration for Microsoft Visual C++ 7.0 (or compatible)
2 # Thanks to Ulrik Petersen
3 # Modified by Charlie Hull, Lemur Consulting Ltd.
4 # www.lemurconsulting.com
6 # Modify this file to set any extra Xapian build flags
8 # HINT: Instead of modifying this file, consider passing new values
9 # on the command-line. For example:
10 # % nmake PERL_DIR=c:\perl\bin SWIG=c:\something\swig.exe
11 # would override the variables without requiring you change anything...
13 !IF "$(OS)" == "Windows_NT"
14 NULL=
15 !ELSE
16 NULL=nul
17 !ENDIF
18 # ----------------------------------------------
19 # Xapian paths
20 # ----------------------------------------------
22 # EDIT THESE to match where your applications and bindings are, if you are compiling them
23 # Also edit:
24 # win32_applications_omega.mak
25 # win32_bindings_python.mak
26 # and any other bindings mak files
27 XAPIAN_APPLICATIONS=..\..\xapian-applications\omega
28 XAPIAN_BINDINGS=..\..\xapian-bindings
30 # ------------- Perl settings-------------
31 # Perl folder
32 PERL_DIR=C:\Perl\bin
33 # Perl executable
34 PERL_EXE=$(PERL_DIR)\perl.exe
35 # -------------end Perl settings-------------
38 # -------------Python settings-------------
39 # Note that you should only use a Windows Python built using Visual C++, i.e. the standard Windows
40 # binary distribution
42 # Python folder for 2.4
43 PYTHON_DIR_24=c:\Python24
44 # Python executable
45 PYTHON_EXE_24=$(PYTHON_DIR_24)\python.exe
46 #PYTHON_INCLUDE : Set this to the directory that contains python.h
47 PYTHON_INCLUDE_24=$(PYTHON_DIR_24)\include
48 #A 'PC' directory is also included for people building from a source tree.
49 PYTHON_INCLUDE_2_24=$(PYTHON_DIR_24)\PC
51 # PYTHON_LIB_DIR : Set this to the directory containing python*.lib
52 # It should only be necessary to change this for source builds of Python,
53 # where the files are in 'PCBuild' rather than 'libs' (this magically works
54 # as Python uses a #pragma to reference the library base name - which
55 # includes any version numbers and debug suffixes ('_d'))
56 PYTHON_LIB_DIR_24=$(PYTHON_DIR_24)\libs
58 # Python folder for 2.5
59 PYTHON_DIR_25=c:\Python25
60 # Python executable
61 PYTHON_EXE_25=$(PYTHON_DIR_25)\python.exe
62 #PYTHON_INCLUDE : Set this to the directory that contains python.h
63 PYTHON_INCLUDE_25=$(PYTHON_DIR_25)\include
64 #A 'PC' directory is also included for people building from a source tree.
65 PYTHON_INCLUDE_2_25=$(PYTHON_DIR_25)\PC
67 # PYTHON_LIB_DIR : Set this to the directory containing python*.lib
68 # It should only be necessary to change this for source builds of Python,
69 # where the files are in 'PCBuild' rather than 'libs' (this magically works
70 # as Python uses a #pragma to reference the library base name - which
71 # includes any version numbers and debug suffixes ('_d'))
72 PYTHON_LIB_DIR_25=$(PYTHON_DIR_25)\libs
74 # Python folder for 2.6
75 PYTHON_DIR_26=c:\Python26
76 # Python executable
77 PYTHON_EXE_26=$(PYTHON_DIR_26)\python.exe
78 #PYTHON_INCLUDE : Set this to the directory that contains python.h
79 PYTHON_INCLUDE_26=$(PYTHON_DIR_26)\include
80 #A 'PC' directory is also included for people building from a source tree.
81 PYTHON_INCLUDE_2_26=$(PYTHON_DIR_26)\PC
83 # PYTHON_LIB_DIR : Set this to the directory containing python*.lib
84 # It should only be necessary to change this for source builds of Python,
85 # where the files are in 'PCBuild' rather than 'libs' (this magically works
86 # as Python uses a #pragma to reference the library base name - which
87 # includes any version numbers and debug suffixes ('_d'))
88 PYTHON_LIB_DIR_26=$(PYTHON_DIR_26)\libs
90 # Python folder for 2.7
91 PYTHON_DIR_27=c:\Python27
92 # Python executable
93 PYTHON_EXE_27=$(PYTHON_DIR_27)\python.exe
94 #PYTHON_INCLUDE : Set this to the directory that contains python.h
95 PYTHON_INCLUDE_27=$(PYTHON_DIR_27)\include
96 #A 'PC' directory is also included for people building from a source tree.
97 PYTHON_INCLUDE_2_27=$(PYTHON_DIR_27)\PC
99 # PYTHON_LIB_DIR : Set this to the directory containing python*.lib
100 # It should only be necessary to change this for source builds of Python,
101 # where the files are in 'PCBuild' rather than 'libs' (this magically works
102 # as Python uses a #pragma to reference the library base name - which
103 # includes any version numbers and debug suffixes ('_d'))
104 PYTHON_LIB_DIR_27=$(PYTHON_DIR_27)\libs
106 # Python folder for 3.0
107 PYTHON_DIR_30=c:\Python30
108 # Python executable
109 !if "$(DEBUG)"=="1"
110 PYTHON_EXE_30=$(PYTHON_DIR_30)\python_d.exe
111 !else
112 PYTHON_EXE_30=$(PYTHON_DIR_30)\python.exe
113 !endif
114 #PYTHON_INCLUDE : Set this to the directory that contains python.h
115 PYTHON_INCLUDE_30=$(PYTHON_DIR_30)\include
116 #A 'PC' directory is also included for people building from a source tree.
117 PYTHON_INCLUDE_2_30=$(PYTHON_DIR_30)\PC
119 # PYTHON_LIB_DIR : Set this to the directory containing python*.lib
120 # It should only be necessary to change this for source builds of Python,
121 # where the files are in 'PCBuild' rather than 'libs' (this magically works
122 # as Python uses a #pragma to reference the library base name - which
123 # includes any version numbers and debug suffixes ('_d'))
124 PYTHON_LIB_DIR_30=$(PYTHON_DIR_30)\libs
126 # -------------end Python settings-------------
129 # -------------PHP settings-------------
130 # PHP source folder
131 PHP52_SRC_DIR=C:\work\php-5.2.1
133 PHP52_INCLUDE_CPPFLAGS= \
134 -I "$(PHP52_SRC_DIR)" -I "$(PHP52_SRC_DIR)\tsrm" -I "$(PHP52_SRC_DIR)\Zend" -I "$(PHP52_SRC_DIR)\main" -I "$(PHP52_SRC_DIR)\regex" \
135 -D ZTS=1 -D ZEND_WIN32=1 -D PHP_WIN32=1 -D ZEND_WIN32_FORCE_INLINE -D HAVE_WIN32STD=1
137 # PHP_EXE_DIR: Set this to the folder where the PHP executable is
138 # PHP_LIB : Set this to the path to the PHP library
139 !if "$(DEBUG)"=="1"
140 PHP52_EXE_DIR=C:\php-5.2.1\Debug_TS
141 PHP52_LIB=$(PHP52_EXE_DIR)\php5ts_debug.lib
142 PHP52_DEBUG_OR_RELEASE= /D "ZEND_DEBUG=1"
143 !else
144 PHP52_EXE_DIR=C:\work\php-5.2.1-win32
145 PHP52_LIB=$(PHP52_EXE_DIR)\dev\php5ts.lib
146 PHP52_DEBUG_OR_RELEASE= /D "ZEND_DEBUG=0"
147 !endif
149 # PHP executable
150 PHP52_EXE=$(PHP52_EXE_DIR)\PHP.exe
152 # PHP 5.3.0 only -----------------
153 # We need to build separate bindings for PHP 5.3.0 as the module API has changed
155 # PHP source folder - built from a snapshot according to http://wiki.php.net/internals/windows/stepbystepbuild
156 PHP53_SRC_DIR=C:\php-sdk\php53dev\vc9\x86\php5.3-201009020830
158 PHP53_INCLUDE_CPPFLAGS= \
159 -I "$(PHP53_SRC_DIR)" -I "$(PHP53_SRC_DIR)\tsrm" -I "$(PHP53_SRC_DIR)\Zend" -I "$(PHP53_SRC_DIR)\main" \
160 -D ZTS=1 -D ZEND_WIN32=1 -D PHP_WIN32=1 -D ZEND_WIN32_FORCE_INLINE -D HAVE_WIN32STD=1
161 #-I "$(PHP53_SRC_DIR)\regex" \
163 # PHP_EXE_DIR: Set this to the folder where the PHP executable is
164 # PHP_LIB : Set this to the path to the PHP library
165 !if "$(DEBUG)"=="1"
166 PHP53_EXE_DIR=$(PHP53_SRC_DIR)\Debug_TS
167 PHP53_LIB=$(PHP53_EXE_DIR)\php5ts_debug.lib
168 PHP53_DEBUG_OR_RELEASE= /D "ZEND_DEBUG=1"
169 !else
170 PHP53_EXE_DIR=$(PHP53_SRC_DIR)\Release_TS
171 PHP53_LIB=$(PHP53_EXE_DIR)\php5ts.lib
172 PHP53_DEBUG_OR_RELEASE= /D "ZEND_DEBUG=0"
173 !endif
175 # PHP executable
176 PHP53_EXE=$(PHP53_EXE_DIR)\PHP.exe
177 # end PHP 5.3.0 only -----------------
179 # ------------- end PHP settings-------------
181 # -------------Ruby settings-------------
182 # Tested with ruby 1.8.6 (the one that is installed using the one click installer 'ruby186-26.exe').
183 # You have to change the "!=" in first line of RUBY_DIR\lib\ruby\1.8\i386-mswin32\config.h
184 # to "<=" if using a Visual C++ older than 5.0
186 # Ruby folder
187 RUBY_DIR=c:\Ruby
188 # Ruby executable
189 RUBY_EXE=$(RUBY_DIR)\bin\ruby.exe
190 # RUBY_INCLUDE : Set this to the directory that contains ruby.h
191 RUBY_INCLUDE=$(RUBY_DIR)\lib\ruby\1.8\i386-mswin32
192 # RUBY_SO_DIR : Where to install the dll file
193 RUBY_SO_DIR=$(RUBY_INCLUDE)
194 # RUBY_RB_DIR : Where to install the .rb file
195 RUBY_RB_DIR=$(RUBY_INCLUDE)\..
196 # RUBY_LIB_DIR : Set this to the directory containing msvcrt-ruby18*.lib
197 RUBY_LIB_DIR=$(RUBY_DIR)\lib
198 # -------------end Ruby settings-------------
200 # ------------- Java settings ------------
202 JAVA_DIR=C:\Program Files\Java\jdk1.6.0_05\bin
203 JAVA_INCLUDE_DIR=C:\Program Files\Java\jdk1.6.0_05\include
204 JAVA="$(JAVA_DIR)\java.exe"
205 JAVAC="$(JAVA_DIR)\javac.exe"
206 JAR="$(JAVA_DIR)\jar.exe"
207 JAVA_PATHSEP=/
209 # ------------- end Java settings-------------
211 # ------------- C# settings ------------
213 CSC="C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe"
214 SN="C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sn.exe"
216 # ------------- end C# settings ------------
218 # ------------SWIG settings-------------
219 # Swig executable
220 SWIG=\work\xapian\xapian-git\swig\swig.exe
221 SWIG_FLAGS= -Werror
222 # ------------end SWIG settings-------------
224 # ------------ Misc external libraries we depend on -------------
225 ZLIB_DIR=C:\gnu\zlib123-dll
226 # If you installed a binary version, the following 3 lines are probably
227 # correct. If you build from sources, adjust accordingly.
228 ZLIB_INCLUDE_DIR=$(ZLIB_DIR)\include
229 ZLIB_LIB_DIR=$(ZLIB_DIR)\lib
230 ZLIB_BIN_DIR=$(ZLIB_DIR)
232 PCRE_DIR=C:\Program Files\GnuWin32
233 PCRE_INCLUDE_DIR=$(PCRE_DIR)\include
234 PCRE_LIB_DIR=$(PCRE_DIR)\lib
238 #--------------------------------------
239 # Visual C++ Compiler and linker programs, and flags for these
240 #--------------------------------------
241 LIB32=link.exe -lib
242 LIB32_FLAGS=-nologo
243 LINK32=link.exe
244 LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
245 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib rpcrt4.lib\
246 wsock32.lib Ws2_32.lib odbccp32.lib -subsystem:console -debug -nologo \
247 "$(ZLIB_LIB_DIR)\zdll.lib"
249 CPP=cl.exe
250 RSC=rc.exe
251 MANIFEST=mt.exe /manifest
253 # make sure inference rules work with all source files
254 .SUFFIXES : .cc .java
256 # xapdep is a tool to turn compiler output (using the -showIncludes option) into dependency lists
257 DEPEND=xapdep.exe
259 # We build with the following compiler options:
260 # /W3 Set warning level to 3
261 # /O2 Optimisations:Maximise speed
262 # /EHc extern "C" defaults to nothrow
263 # /EHs enable C++ EH (no SEH exceptions)
264 # /c compile, don't link
265 # /MD Link multithreaded dynamic libraries
267 # Common stuff
268 # Note we enable debug flags for a release build - this means that
269 # even in release builds, a .pdb file is generated with basic
270 # stackframe information, meaning basic debugging on release builds
271 # is still possible (so long as the .pdb files are in place - it is
272 # assumed these files will *not* ship with a default binary build)
273 CPPFLAGS_COMMON=-nologo -c -Zi -I.. -I..\include -I..\common -I..\win32 -W3 -EHsc \
274 -DWIN32 -D__WIN32__ -D_WIN32 -D_WINDOWS \
275 -D "HAVE_VSNPRINTF" -D "HAVE_STRDUP" -D "_USE_32BIT_TIME_T" \
276 -D_CRT_SECURE_NO_DEPRECATE \
277 -I"$(ZLIB_INCLUDE_DIR)"
279 # The various parts of Xapian (but *not* the test suite or treecheck libs)
280 XAPIAN_LIBS = \
281 "$(OUTLIBDIR)\libcommon.lib" \
282 "$(OUTLIBDIR)\libbackend.lib" \
283 "$(OUTLIBDIR)\libexpand.lib" \
284 "$(OUTLIBDIR)\libbrass.lib" \
285 "$(OUTLIBDIR)\libchert.lib" \
286 "$(OUTLIBDIR)\libflint.lib" \
287 "$(OUTLIBDIR)\libinmemory.lib" \
288 "$(OUTLIBDIR)\libmulti.lib" \
289 "$(OUTLIBDIR)\libmatcher.lib" \
290 "$(OUTLIBDIR)\libnet.lib" \
291 "$(OUTLIBDIR)\liblanguages.lib" \
292 "$(OUTLIBDIR)\libapi.lib" \
293 "$(OUTLIBDIR)\libremote.lib" \
294 "$(OUTLIBDIR)\libunicode.lib" \
295 "$(OUTLIBDIR)\libweight.lib" \
296 "$(OUTLIBDIR)\libqueryparser.lib"
298 !IF "$(DEBUG)" == "1"
299 # Debug build
300 CPPFLAGS_EXTRA=$(CPPFLAGS_COMMON) -Od -MDd -D DEBUG -D _DEBUG -D XAPIAN_DEBUG
301 XAPIAN_DEBUG_OR_RELEASE=Debug
302 !ELSE
303 # Release build
304 CPPFLAGS_EXTRA=$(CPPFLAGS_COMMON) -O2 -MD -D NDEBUG
305 XAPIAN_DEBUG_OR_RELEASE=Release
306 !ENDIF
308 #----------------end Visual C++----------------------