as discussed on the list:
[obnox/wireshark/wip.git] / config.nmake
1 # $Id$
2
3 # Some more informations about the settings in this file, can be found 
4 # in the file README.win32 and the Developer's Guide (available online).
5
6
7
8 ##### Versions #####
9
10 # The current Wireshark version
11 # It's highly recommended to leave MAJOR/MINOR/MICRO unchanged
12 VERSION_MAJOR=0
13 VERSION_MINOR=99
14 VERSION_MICRO=6
15 # It's recommended to change VERSION_EXTRA for your own custom builds
16 # e.g. "-SVN-12345"
17 VERSION_EXTRA=
18
19 # The version of the wiretap library (recommended: leave unchanged)
20 WTAP_VERSION_MAJOR=0
21 WTAP_VERSION_MINOR=3
22 WTAP_VERSION_MICRO=1
23
24
25
26 ##### Directories #####
27
28
29 # Base directory, where your libraries reside, which are needed to 
30 # compile the sources. This setting is used only inside this file.
31 #
32 WIRESHARK_LIBS=C:\wireshark-win32-libs
33
34
35 # Base directory, where your programs reside. 
36 # This setting is used only inside this file.
37 #
38 PROGRAM_FILES=C:/Program Files
39
40
41
42 ##### Microsoft Visual C / Studio Variant #####
43 # for the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
44 # only one of the following MSVC_VARIANT settings should be used
45 # BTW: The "Microsoft Visual C++ Toolkit 2003" DOESN'T WORK for WS!
46
47 # "Microsoft Visual Studio 6.0" - RECOMMENDED
48 # Visual C++ 6.0, _MSC_VER 1200, msvcrt.dll (version 6)
49 MSVC_VARIANT=MSVC6
50
51 # "Microsoft Visual Studio .NET (2002)" - WORKS
52 # Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
53 #MSVC_VARIANT=MSVC2002
54
55 # "Microsoft .Net Framework SDK Version 1.0" - WORKS
56 # needs additional Platform SDK installation
57 # Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
58 #MSVC_VARIANT=DOTNET10
59
60 # "Microsoft Visual Studio .NET 2003" - WORKS
61 # Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
62 #MSVC_VARIANT=MSVC2003
63
64 # "Microsoft .Net Framework SDK Version 1.1" - WORKS
65 # needs additional Platform SDK installation
66 # Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
67 #MSVC_VARIANT=DOTNET11
68
69 # "Microsoft Visual Studio 2005" - WORKS
70 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
71 #MSVC_VARIANT=MSVC2005
72
73 # "Microsoft Visual C++ 2005 Express Edition" - WORKS
74 # needs additional Platform SDK installation
75 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
76 #MSVC_VARIANT=MSVC2005EE
77
78 # "Microsoft .Net Framework 2.0 SDK" - WORKS
79 # needs additional Platform SDK installation
80 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
81 #MSVC_VARIANT=DOTNET20
82
83
84
85 ##### Libraries #####
86
87 #
88 # Mandatory: GLib settings
89 #
90 # Current versions of GTK+ 1.3 require GLib 2.0.  Earlier versions of
91 # GTK+ 1.3 are buggy; we don't recommend using them, and we don't
92 # support them.  Upgrade to at least GLib 2.0.
93 #
94 GLIB_VERSION=2.0
95 GLIB_DIR=$(WIRESHARK_LIBS)\glib
96
97 #
98 # Mandatory: GTK (& related) settings
99 #
100 # It's possible, to build both GTK version 1 and 2 at the same time,
101 # or only one of the versions. GTK version 2 is recommended.
102
103 # If you want building with GTK+ 1.3, set GTK1_DIR to the pathname of the 
104 # "gtk+" directory; if you want building with GTK+ 2.x, set GTK2_DIR to 
105 # the pathname of the directory in which the "include" and "lib" directories 
106 # reside.
107 #
108 GTK1_DIR=$(WIRESHARK_LIBS)\gtk+
109 GTK2_DIR=$(WIRESHARK_LIBS)\gtk2
110
111 #
112 # Mandatory for GTK >= 2: Version numbers of gtk2 and pango.
113 #
114 # (MAJOR + MINOR Version number but without MICRO version number) 
115 # These macros are used by the nsis installer script and by the setup target.
116 #
117 # GTK 2.6 is the old mainline since Ethereal 0.10.14
118 #GTK2_INST_VERSION=2.6
119 #PANGO_INST_VERSION=1.8
120 # Support for GTK 2.8 
121 #GTK2_INST_VERSION=2.8
122 #PANGO_INST_VERSION=1.14
123 # GTK 2.10 is the mainline since Wireshark 0.99.5
124 GTK2_INST_VERSION=2.10
125 PANGO_INST_VERSION=1.14
126
127 #
128 # If you have GTK-Wimp, set this to the pathname of the directory in
129 # which the files are stored.
130 #
131 # If you don't have GTK-Wimp, comment this line out, so that GTK-Wimp isn't
132 # defined.
133 #
134 # Please note: GTK 2.8 (and later?) includes GTK-Wimp
135 # (in this case these GTK-Wimp related settings will have no effect)
136 #
137 GTK_WIMP_DIR=$(WIRESHARK_LIBS)\gtk-wimp\gtk-wimp-0.7.0-bin
138
139 #
140 # Optional: WinPcap developer's pack to capture network traffic.
141 #
142 # If you have the WinPcap developer's pack (at least version 3.0), 
143 # set this to the directory in which the WinPcap developer's pack resides.
144 #
145 # If you don't have the WPdpack, comment this line out, so that 
146 # PCAP_DIR isn't defined.
147 #
148 PCAP_DIR=$(WIRESHARK_LIBS)\WPdpack
149
150 #
151 # Optional: The ZLib enables unzipping of gzip compressed capture files 
152 # "on the fly".
153 #
154 # If you have Zlib, set this to directory in which the Zlib headers 
155 # and .lib file are stored.
156 #
157 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
158 # defined.
159 #
160 # ZLIB must be recompiled on none MSVC 6 compilers, otherwise C runtime 
161 # lib (msvcr)version conflicts appear.
162 !IF "$(MSVC_VARIANT)" == "MSVC6" 
163 ZLIB_DIR=$(WIRESHARK_LIBS)\zlib123-dll
164 !ELSE
165 ZLIB_DIR=$(WIRESHARK_LIBS)\zlib123
166 !ENDIF
167
168 #
169 # Optional: The Net-SNMP library enables SNMP OID to name resolvings
170 # for the MIBs available.
171 #
172 # If you have Net-SNMP, set this to the pathname of the directory in
173 # which the Net-SNMP headers and .lib file are stored.
174 #
175 # If you don't have Net-SNMP, comment this line out, so that NET_SNMP_DIR
176 # isn't defined.
177 #
178 NET_SNMP_DIR=$(WIRESHARK_LIBS)\net-snmp-5.4
179
180 #
181 # Optional: the ADNS library enables asynchronous (nonblocking) DNS 
182 # name resolvings.
183 #
184 # If you have GNU ADNS, set this to the directory in which the GNU ADNS 
185 # .lib file is stored.
186 #
187 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
188 # isn't defined.
189 #
190 ADNS_DIR=$(WIRESHARK_LIBS)\adns-1.0-win32-05
191
192 #
193 # Optional: the PCRE (Perl Compatible Regular Expressions) library 
194 # enables regular expressions for display filters.
195 #
196 # If you have the PCRE library, set this to the directory in which 
197 # the GNUWIN32 pcre-lib package is stored.
198 #
199 # If you don't have PCRE, comment this line out, so that PCRE_DIR
200 # isn't defined.
201 #
202 PCRE_DIR=$(WIRESHARK_LIBS)\pcre-6.4
203
204 #
205 # Optional: the GNUTLS library enables ssl decryption.
206 #
207 # If you have the GNUTLS library, set this to the directory where 
208 # the lib and include files are stored.
209 #
210 # If you don't have GNUTLS, comment this line out, so that GNUTLS_DIR
211 # isn't defined.
212 #
213 # Platform SDK conflicts with openssl.h header
214 GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-1.6.1-1
215
216 #
217 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
218 #
219 # If you have the kerberos for windows (mit) library, set this to the 
220 # directory where the kfw package is stored.
221 #
222 # If you don't have KFW, comment this line out, so that KFW_DIR
223 # isn't defined.
224 #
225 KFW_DIR=$(WIRESHARK_LIBS)\kfw-2.5
226
227 #
228 # Optional: the Nettle library enables ??? decryption.
229 #
230 # If you have the Nettle encryption library, set this to the 
231 # directory in which the nettle package is stored.
232 #
233 # If you don't have Nettle, comment this line out, so that NETTLE_DIR
234 # isn't defined.
235 #
236 # NETTLE_DIR=$(WIRESHARK_LIBS)\nettle-1.10
237
238 #
239 # Optional: the LUA library enables scripting support.
240 #
241 # If you have the LUA library, set this to the directory in which 
242 # the LUA package is stored.
243 #
244 # If you don't have LUA, comment this line out, so that LUA_DIR
245 # isn't defined.
246 #
247 LUA_DIR=$(WIRESHARK_LIBS)\lua5.1
248
249 #
250 # Optional: the PORTAUDIO library enables audio output for RTP streams.
251 #
252 # If you have the PORTAUDIO library (used for rtp_player), set this to 
253 # the directory in which the PORTAUDIO library is stored.
254 #
255 # If you don't have PORTAUDIO, comment this line out, so that 
256 # PORTAUDIO_DIR isn't defined.
257 #
258 #PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v18_1
259 PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v19
260
261 #
262 # Version number of PortAudio
263
264 #PORTAUDIO_VERSION=18
265 PORTAUDIO_VERSION=19
266
267 #
268 # Mandatory for GTK >= 2: Iconv
269 #
270 # Set ICONV_DIR to the directory in which the
271 # ICONV include files and library resides.
272 #
273 ICONV_DIR=$(WIRESHARK_LIBS)\libiconv-1.9.1.bin.woe32
274
275 #
276 # Mandatory for GTK >= 2: Gettext
277 #
278 # Set GETTEXT_DIR to the directory in which the
279 # GETTEXT include files and library resides.
280 #
281 #GETTEXT_DIR=$(WIRESHARK_LIBS)\gettext-runtime-0.13.1
282 GETTEXT_DIR=$(WIRESHARK_LIBS)\gettext-0.14.5
283
284 #
285 # Optional: AirPcap developer's pack to capture wireless network traffic 
286 # incl. 802.11 management frames.
287 #
288 # If you have the AirPcap developer's pack, set this to the directory 
289 # in which the AirPcap developer's pack resides.
290 #
291 # If you don't have the AirPcap developer's pack, comment this line out, 
292 # so that AIRPCAP_DIR isn't defined.
293 #
294 AIRPCAP_DIR=$(WIRESHARK_LIBS)\AirPcap_Devpack_1_0_0_594\AirPcap_Devpack
295
296
297
298 ##### Tools #####
299
300 # Set the following mandatory commands to find the tools.
301 # The easiest way is to use the corresponding packages from cygwin.
302
303 # Set up the path to the cygwin binaries
304 CYGWIN_PATH=c:\cygwin\bin
305
306 # command for a shell (cygwin's bash package recommended)
307 SH_PROG=bash
308
309 # bash versions after 3.1.6 need the 'igncr' shell option to be able to
310 #  process scripts in windows 'native format' (dos crlf format). 
311 # The following !IF results in the option being used only if it is available
312 #  since using it on bash version 3.1.6 (or earlier) is not required and
313 #  will cause an error message.
314 !if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
315 SH_FLAGS=-o igncr
316 !endif
317
318 SH=$(SH_PROG) $(SH_FLAGS)
319
320
321 # command for perl (cygwin's perl package recommended)
322 PERL=perl
323
324 # command for pod2man and pod2html 
325 # (part of the perl package, usually leave these unchanged)
326 POD2MAN=$(SH) pod2man
327 POD2HTML=$(SH) pod2html
328
329 # command for native windows python (recommended)
330 PYTHON="C:/python24/python.exe"
331 # add native python to the path (not needed if cygwin's python is used)
332 PATH=c:\python24;$(PATH)
333
334 # command for python (cygwin's python package, not recommended)
335 #PYTHON=env python
336
337 # command for lex/flexx (cygwin's flex recommended)
338 LEX=flex
339
340 # command for yacc/bison (cygwin's bison recommended)
341 YACC=bison
342
343 #
344 # Optional: To build the NSIS installer.
345 #
346 # If you have the NSIS package, set this to the NSIS executable.
347 #
348 # If you don't have NSIS, comment this line out, so that MAKENSIS
349 # isn't defined.
350 #
351 MAKENSIS="$(PROGRAM_FILES)\nsis\makensis.exe"
352
353 #
354 # Optional: To build the developers documentation with doxygen and dot.
355 # Currently experimental only.
356 #
357 # You will have to download and install:
358 # Doxygen from: www.doxygen.org
359 # Graphviz from: http://www.research.att.com/sw/tools/graphviz/
360 #
361 # If you have doxygen, set this to the doxygen executable.
362 #
363 # If you don't want the developers documentation (or don't have the tools),
364 # comment this line out, so that DOXYGEN isn't defined.
365 #
366 #DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
367
368 #
369 # Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
370 #
371 # The required htmlhelp.h and htmlhelp.lib should be included in MSVC_VARIANT > MSVC6.
372 #
373 # For MSVC_VARIANT == MSVC6 you will have to download and install the html help workshop from:
374 #
375 # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html
376 # /hwMicrosoftHTMLHelpDownloads.asp 
377 #
378 # Then point HHC_DIR to the html help dir (where hhc.exe resides).
379 #
380 # If you don't want the online help (or don't have the tools),
381 # comment this line out, so that HHC_DIR isn't defined.
382 #
383 HHC_DIR=$(PROGRAM_FILES)/HTML Help Workshop
384
385
386 ##### Flags, PATHs and Miscellaneous #####
387
388 # Compiler flags:
389 # /W3  warning level 3 (0 less - 4 most, 1 default)
390 # /Zi  create .pdb file for debugging
391 # /MD  use "Multithreading Debug" libraries
392 # /D_CRT_SECURE_NO_DEPRECATE don't warn for "insecure" calls, see MSDN "Security Enhancements in the CRT"
393 # /D_CRT_NONSTDC_NO_DEPRECATE don't warn for "Deprecated CRT Functions" as MSDN calls this
394 #
395 !IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
396 LOCAL_CFLAGS=/Zi /W3 /MD
397 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
398 LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
399 !ELSE
400 !ERROR MSVC_VARIANT unknown
401 !ENDIF
402
403 # Linker flags:
404 # /DEBUG  generate debug info
405 # /PROFILE generate map file(s) for profiling
406 # /DEFAULTLIB:xxx use xxx as the standard C library
407 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
408
409 LOCAL_LDFLAGS=/DEBUG 
410
411 PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
412
413 #
414 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
415 # XCOPY under Windows NT doesn't support the "/Y" flag.  This works
416 # around that bug.
417 # XXX - This apparently doesn't work for some versions of nmake:
418 # http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
419 # It looks like we'll have to call "set copycmd=/y" before we run xcopy.
420 COPYCMD=/y
421
422 #
423 # If you don't want to build libwireshark.dll, you should comment out the
424 # following line. (Note: for plugin support this option must stay activated)
425 ENABLE_LIBWIRESHARK=USE
426
427 #
428 # install (debug) directory for Wireshark GTK1 version (relative to your source dir)
429 INSTALL1_DIR=wireshark-gtk1
430
431 #
432 # install (debug) directory for Wireshark GTK2 version (relative to your source dir)
433 INSTALL2_DIR=wireshark-gtk2
434
435
436
437 ##### C-Runtime Redistributable #####
438 #
439 # The C-Runtime since Version 7 must be shipped together with 
440 # the program installer, to avoid missing msvcr*.dll files on
441 # the target machine.
442 #
443 # The location of these files differ on the various compiler 
444 # packages, the following will use the default paths depending
445 # on the package version.
446 #
447 !IF "$(MSVC_VARIANT)" == "MSVC6"
448 # msvcrt.dll will already be available on target machines - nothing additional to install
449
450 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2002"
451 # you probably need to tweak this directory if you don't use the professional edition!
452 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET\Visual Studio .NET Professional - English\msvcr70.dll
453
454 !ELSEIF "$(MSVC_VARIANT)" == "DOTNET10"
455 # no redistributable available for this package!
456
457 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2003"
458 # you probably need to tweak this directory if you don't use the professional edition!
459 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET 2003\Visual Studio .NET Professional 2003 - English\msvcr71.dll
460
461 !ELSEIF "$(MSVC_VARIANT)" == "DOTNET11"
462 # no redistributable available for this package!
463
464 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
465 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\*.*
466
467 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE"
468 # you need to download the redistributable package vcredist_x86.exe from Microsoft first,
469 # and copy it to the lib folder!!!
470 VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
471
472 !ELSEIF "$(MSVC_VARIANT)" == "DOTNET20"
473 # you need to download the redistributable package vcredist_x86.exe from Microsoft first,
474 # and copy it to the lib folder!!!
475 VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
476
477 !ELSE
478 !ERROR MSVC_VARIANT unknown
479 !ENDIF
480
481
482
483 ##### Advanced: Docbook/XML documentation generation #####
484 # If you want to generate the Docbook/XML based docs (User's and Developer's 
485 # Guide, ...), you'll need some additional tools / libraries compared to the 
486 # rest of the build process. 
487 #
488 # FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\readme.txt.
489 #
490 # If you don't call the Makefile.nmake in the docbook dir to generate the 
491 # docs, the following settings in this section will have no effect.
492
493 # formatting objects processor executable
494 # Comment this out if you don't have fop installed or you don't want the docs 
495 # in PDF format.
496 !IFNDEF FOP
497 FOP=fop-0.20.5\fop.bat
498 !ENDIF
499
500 # Additional options to fop.
501 FOP_OPTS=-Xmx256m
502
503 # html help compiler
504 # Comment this out if you don't have hhc.exe or you don't want the docs in 
505 # .chm format.
506 #
507 # Beware: hhc.exe is NOT part of the MSVC packages in HHC_DIR mentioned above,
508 # so you'll need to install the HTML Help Workshop for this.
509 HHC_EXE="$(HHC_DIR)\hhc.exe"
510
511 # html to text converter for text version of release notes, e.g. elinks.
512 # This could also be "lynx", or "true" if neither elinks nor lynx is installed
513 # (cygwin: lynx works, elinks not available, links and true doesn't produce output)
514 #HTML2TXT=elinks -dump -dump-width 72
515 #HTML2TXT=links -dump -width 72
516 HTML2TXT=lynx -dump -width=72 -nolist -stdin
517 #HTML2TXT="true"
518
519 # the XSL processor (part of cygwin's libxslt package)
520 XSLTPROC="xsltproc"
521
522 # the XML validator (part of cygwin's libxml2 package)
523 XMLLINT="xmllint"
524
525
526
527 ##############################################################################
528 #
529 # You should not have to change anything below this comment.
530 # If you do, it's a deficiency in the Makefile.nmake files;
531 # either tell wireshark-dev@wireshark.org about it, including
532 # details of why you had to change it, or fix config.nmake
533 # and any Makefile.nmake files that need to be changed, and
534 # send us the patches, along with details of why the change
535 # was necessary.
536 #
537 ##############################################################################
538
539 !IFDEF ENABLE_LIBWIRESHARK
540 # Uncomment next line to link plugins with the import library of libwireshark.dll 
541 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
542 !ENDIF
543
544 #
545 # The RC_VERSION should be comma-separated, not dot-separated, 
546 # as per Graham Bloice's message in
547 #
548 #       http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
549 #
550 # "The RC_VERSION variable in config.nmake should be comma separated. 
551 # This allows the resources to be built correctly and the version
552 # number to be correctly displayed in the explorer properties dialog
553 # for the executables, and XP's tooltip, rather than 0.0.0.0."
554 #
555
556 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
557 RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO)
558
559 WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
560 RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
561
562
563 GLIB_CFLAGS=/I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
564         /I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
565 GCC_GLIB_CFLAGS=-I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
566         -I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
567 GLIB_LIBS=$(GLIB_DIR)\lib\glib-$(GLIB_VERSION).lib \
568         $(GLIB_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
569         $(GLIB_DIR)\lib\gobject-$(GLIB_VERSION).lib
570
571 # GTK+ 1.3
572 GTK1_CFLAGS=$(GLIB_CFLAGS) /I$(GTK1_DIR)\include /I$(GTK1_DIR)\include\gdk \
573         /I$(GTK1_DIR)\lib\gtk+\include
574 GTK1_LIBS=$(GTK1_DIR)\lib\gtk.lib \
575         $(GTK1_DIR)\lib\gdk.lib \
576         $(GLIB_LIBS)
577
578 # GTK+ 2.x
579 GTK2_CFLAGS=$(GLIB_CFLAGS) /I$(GTK2_DIR)\include\gtk-2.0 \
580         /I$(GTK2_DIR)\lib\gtk-2.0\include \
581         /I$(GTK2_DIR)\include\atk-1.0 \
582         /I$(GTK2_DIR)\include\cairo \
583         /I$(GTK2_DIR)\include\pango-1.0
584 GTK2_LIBS=$(GTK2_DIR)\lib\gtk-win32-2.0.lib \
585         $(GTK2_DIR)\lib\gdk-win32-2.0.lib \
586         $(GTK2_DIR)\lib\gdk_pixbuf-2.0.lib \
587         $(GTK2_DIR)\lib\pango-1.0.lib \
588         $(GLIB_LIBS)
589
590 !IF "$(GTK2_INST_VERSION)" == "2.10"
591 GTK2_LIB_DIR=2.10.0
592 NEED_LIBPNG_DLL=USE
593 NEED_CAIRO_DLL=USE
594 GTK_WIMP_DIR=DUMMY_TO_USE_WIMP
595 GTK_WIMP_DLLSRC_DIR=$(GTK2_DIR)\lib\gtk-2.0\2.10.0\engines
596 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.10.0\engines
597 GTK_WIMP_RCSRC_DIR=$(GTK2_DIR)\share\themes\MS-Windows\gtk-2.0
598 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
599 !ELSEIF "$(GTK2_INST_VERSION)" == "2.8"
600 # the lib dir of GTK2.6 didn't changed since 2.4.0
601 GTK2_LIB_DIR=2.4.0
602 NEED_LIBPNG_DLL=USE
603 NEED_CAIRO_DLL=USE
604 GTK_WIMP_DIR=DUMMY_TO_USE_WIMP
605 GTK_WIMP_DLLSRC_DIR=$(GTK2_DIR)\lib\gtk-2.0\2.4.0\engines
606 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.4.0\engines
607 GTK_WIMP_RCSRC_DIR=$(GTK2_DIR)\share\themes\MS-Windows\gtk-2.0
608 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
609 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
610 GTK2_LIB_DIR=2.4.0
611 GTK_WIMP_DLLSRC_DIR=$(GTK_WIMP_DIR)
612 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.4.0\engines
613 GTK_WIMP_RCSRC_DIR=$(GTK_WIMP_DIR)\Theme\gtk-2.0
614 GTK_WIMP_RCDST_DIR=share\themes\Default\gtk-2.0
615 GTK_THEME_DIR=$(GTK_WIMP_DIR)\Theme\gtk-2.0
616 !ENDIF
617
618 # the lib dir of PANGO changed in 1.12
619 !IF "$(PANGO_INST_VERSION)" == "1.14"
620 PANGO_LIB_DIR=1.5.0
621 !ELSEIF "$(PANGO_INST_VERSION)" == "1.10"
622 PANGO_LIB_DIR=1.4.0
623 !ELSEIF "$(PANGO_INST_VERSION)" == "1.8"
624 PANGO_LIB_DIR=1.4.0
625 !ELSEIF "$(PANGO_INST_VERSION)" == "1.4"
626 PANGO_LIB_DIR=1.4.0
627 !ELSEIF "$(PANGO_INST_VERSION)" == "1.2"
628 PANGO_LIB_DIR=1.2.0
629 !ENDIF
630
631 !IFDEF AIRPCAP_DIR
632 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
633 AIRPDCAP_CONFIG=^#define HAVE_AIRPDCAP 1
634 !ELSE
635 AIRPCAP_CONFIG=
636 AIRPDCAP_CONFIG=
637 !ENDIF
638
639 !IFDEF PCAP_DIR
640 # Nmake uses carets to escape special characters
641 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
642 PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
643 PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
644 PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
645 # PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
646 PCAP_BREAKLOOP_CONFIG=
647 WPCAP_CONSTIFIED_CONFIG=^#define WPCAP_CONSTIFIED 1
648 !ELSE
649 # no WpdPack installed
650 WINPCAP_CONFIG=
651 PCAP_FINDALLDEVS_CONFIG=
652 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
653 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
654 PCAP_BREAKLOOP_CONFIG=
655 WPCAP_CONSTIFIED=
656 !ENDIF
657
658 !IFDEF ZLIB_DIR
659 ZLIB_PATH=$(ZLIB_DIR)
660 ZLIB_CFLAGS=/I$(ZLIB_DIR)\include
661 ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
662 # Nmake uses carets to escape special characters
663 ZLIB_CONFIG=^#define HAVE_LIBZ 1
664 !else
665 ZLIB_CFLAGS=
666 ZLIB_LIBS=
667 ZLIB_CONFIG=
668 !ENDIF
669
670 !IFDEF NET_SNMP_DIR
671 NET_SNMP_CFLAGS=/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32
672 NET_SNMP_LIBS=$(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib
673 # Nmake uses carets to escape special characters
674 NET_SNMP_CONFIG=^#define HAVE_NET_SNMP 1
675 !else
676 NET_SNMP_CFLAGS=
677 NET_SNMP_LIBS=
678 NET_SNMP_CONFIG=
679 !ENDIF
680
681 !IFDEF ADNS_DIR
682 ADNS_PATH=$(ADNS_DIR)\adns_win32\lib
683 ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
684 ADNS_LIBS=$(ADNS_DIR)\adns_win32\lib\adns_dll.lib
685 # Nmake uses carets to escape special characters
686 ADNS_CONFIG=^#define HAVE_GNU_ADNS 1
687 !else
688 ADNS_CFLAGS=
689 ADNS_LIBS=
690 ADNS_CONFIG=
691 !ENDIF
692
693 !IFDEF KFW_DIR
694 KFW_PATH=$(KFW_DIR)\bin
695 KFW_CFLAGS=/I$(KFW_DIR)\inc
696 KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
697 # Nmake uses carets to escape special characters
698 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
699 !else
700 KFW_CFLAGS=
701 KFW_LIBS=
702 KFW_CONFIG=
703 !ENDIF
704
705 !IFDEF PCRE_DIR
706 PCRE_PATH=$(PCRE_DIR)\bin
707 PCRE_CFLAGS=/I$(PCRE_DIR)\include
708 PCRE_LIBS=$(PCRE_DIR)\lib\pcre.lib
709 # Nmake uses carets to escape special characters
710 PCRE_CONFIG=^#define HAVE_LIBPCRE 1
711 !else
712 PCRE_CFLAGS=
713 PCRE_LIBS=
714 PCRE_CONFIG=
715 !ENDIF
716
717 !IFDEF NETTLE_DIR
718 NETTLE_CFLAGS=/I$(NETTLE_DIR)
719 NETTLE_LIBS=$(NETTLE_DIR)\libnettle.lib
720 # Nmake uses carets to escape special characters
721 NETTLE_CONFIG=^#define HAVE_LIBNETTLE 1
722 !else
723 NETTLE_CFLAGS=
724 NETTLE_LIBS=
725 NETTLE_CONFIG=
726 !ENDIF
727
728 !IFDEF GNUTLS_DIR
729 GNUTLS_PATH=$(GNUTLS_DIR)
730 # /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
731 GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT
732 GNUTLS_LIBS=\
733         $(GNUTLS_DIR)\bin\libtasn1-3.lib        \
734         $(GNUTLS_DIR)\bin\libgpg-error-0.lib    \
735         $(GNUTLS_DIR)\bin\libgcrypt-11.lib      \
736         $(GNUTLS_DIR)\bin\libgnutls-13.lib
737 # Nmake uses carets to escape special characters
738 GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
739 LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
740 !else
741 GNUTLS_CFLAGS=
742 GNUTLS_LIBS=
743 GNUTLS_CONFIG=
744 LIBGCRYPT_CONFIG=
745 !ENDIF
746
747 !IFDEF LUA_DIR
748 LUA_CFLAGS=/I$(LUA_DIR)\include
749 LUA_LIBS=$(LUA_DIR)\lib\dll\lua5.1.lib
750 # Nmake uses carets to escape special characters
751 LUA_CONFIG=^#define HAVE_LUA 1
752 LUA_VERSION=^#define HAVE_LUA_5_1 1
753 !else
754 LUA_CFLAGS=
755 LUA_LIBS=
756 LUA_CONFIG=
757 !ENDIF
758
759 !IFDEF PORTAUDIO_DIR
760 # Nmake uses carets to escape special characters
761 PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
762 !IF "$(PORTAUDIO_VERSION)" == "18"
763 # V18 uses API version 1 and v19 API version 2
764 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
765 PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
766 !ELSE
767 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common
768 !ENDIF
769
770 !else
771 PORTAUDIO_CFLAGS=
772 PORTAUDIO_CONFIG=
773 !ENDIF
774
775 !IFDEF HHC_DIR
776 !IF "$(MSVC_VARIANT)" == "MSVC6"
777 HHC_CFLAGS=/I"$(HHC_DIR)\include" -DHHC_DIR
778 HHC_LIBS="$(HHC_DIR)\lib\htmlhelp.lib"
779 !ELSE
780 HHC_CFLAGS=-DHHC_DIR
781 HHC_LIBS=htmlhelp.lib
782 !ENDIF
783 !ELSE
784 HHC_CFLAGS=
785 HHC_LIBS=
786 !ENDIF
787
788 !IFDEF ENABLE_LIBWIRESHARK
789 LIBWIRESHARK_CONFIG=^#define HAVE_LIBWIRESHARKDLL 1
790 !ELSE
791 LIBWIRESHARK_CONFIG=
792 !ENDIF
793
794 # Construct the path
795 PATH=$(PATH);$(CYGWIN_PATH);$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ICONV_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
796
797
798 # "convert" the MSVC variant into the required MSC compiler version
799 !IF "$(MSVC_VARIANT)" == "MSVC6"
800 MSC_VER_REQUIRED=1200
801 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10"
802 MSC_VER_REQUIRED=1300
803 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
804 MSC_VER_REQUIRED=1310
805 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
806 MSC_VER_REQUIRED=1400
807 !ELSE
808 !ERROR MSVC_VARIANT unknown
809 !ENDIF