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