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