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