More Windows compiler flag cleanups. Fix a problem with my last commit
[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=3
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.6.3-1
240 GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-2.6.4-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 requires IPv6 definitions that don't ship with Visual C++ 6.0.
334 # However, the Microsoft Platform SDK for Windows Server 2003 R2 provides
335 # these definitions. The SDK's SetEnv.bat script defines INETSDK.
336 !IF "$(MSVC_VARIANT)" != "MSVC6" || DEFINED(INETSDK)
337 GEOIP_DIR=$(WIRESHARK_LIBS)\GeoIP-1.4.5ws
338 !ENDIF
339
340 ##### Tools #####
341
342 # Set the following mandatory commands to find the tools.
343 # The easiest way is to use the corresponding packages from cygwin.
344
345 # Set up the path to the cygwin binaries
346 CYGWIN_PATH=c:\cygwin\bin
347
348 # command for a shell (cygwin's bash package recommended)
349 SH_PROG=bash
350
351 # bash versions after 3.1.6 need the 'igncr' shell option to be able to
352 #  process scripts in windows 'native format' (dos crlf format).
353 # The following !IF results in the option being used only if it is available
354 #  since using it on bash version 3.1.6 (or earlier) is not required and
355 #  will cause an error message.
356 !if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
357 SH_FLAGS=-o igncr
358 !endif
359
360 SH=$(SH_PROG) $(SH_FLAGS)
361
362
363 # command for perl (cygwin's perl package recommended)
364 PERL=perl
365
366 # command for pod2man and pod2html
367 # (part of the perl package, usually leave these unchanged)
368 POD2MAN=$(SH) pod2man
369 POD2HTML=$(SH) pod2html
370
371 # Command for native Windows Python (recommended)
372 # V2.4 to V2.6 should work
373
374 # If you want to specify your Python settings, uncomment the lines below.
375 #PYTHON="C:\Python26\python.exe"
376 #PATH=c:\Python26;$(PATH)
377
378 # Command for Cygwin's Python (not recommended)
379 #PYTHON=env python
380
381 # Otherwise, find Python automatically.
382 !IF !DEFINED(PYTHON)
383 !IF EXIST(c:\Python26\python.exe)
384 PYTHON="C:\Python26\python.exe"
385 PATH=c:\Python26;$(PATH)
386 !ELSE IF EXIST(c:\Python25\python.exe)
387 PYTHON="C:\Python25\python.exe"
388 PATH=c:\Python25;$(PATH)
389 !ELSE IF EXIST(c:\Python24\python.exe)
390 PYTHON="C:\Python24\python.exe"
391 PATH=c:\Python24;$(PATH)
392 !ENDIF
393 !ENDIF
394
395 # command for lex/flexx (cygwin's flex recommended)
396 LEX=flex
397
398 # command for yacc/bison (cygwin's bison recommended)
399 YACC=bison
400
401 #
402 # Optional: To build the NSIS installer.
403 #
404 # If you have the NSIS package, set this to the NSIS executable.
405 #
406 # If you don't have NSIS, comment this line out, so that MAKENSIS
407 # isn't defined.
408 #
409 MAKENSIS="$(PROGRAM_FILES)\nsis\makensis.exe"
410
411 #
412 # Optional: To build the developers API documentation with doxygen and dot.
413 # Currently experimental, outdated and incomplete.
414 #
415 # You will have to download and install:
416 # Doxygen from: http://www.doxygen.org
417 # Graphviz from: http://www.research.att.com/sw/tools/graphviz/
418 #
419 # If you have doxygen, set this to the doxygen executable.
420 #
421 # If you don't want the developers documentation (or don't have the tools),
422 # comment this line out, so that DOXYGEN isn't defined.
423 #
424 #DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
425
426 #
427 # Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
428 #
429 # The required htmlhelp.h and htmlhelp.lib should be included in MSVC_VARIANT > MSVC6.
430 #
431 # For MSVC_VARIANT == MSVC6 you will have to download and install the html help workshop from:
432 #
433 # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html
434 # /hwMicrosoftHTMLHelpDownloads.asp
435 #
436 # Then point HHC_DIR to the html help dir (where hhc.exe resides).
437 #
438 # If you don't want the online help (or don't have the tools),
439 # comment this line out, so that HHC_DIR isn't defined.
440 #
441 HHC_DIR=$(PROGRAM_FILES)/HTML Help Workshop
442
443 #
444 # Optional: To reduce the size of dlls and exes, which is especially useful for USB device distributions (U3, PortableApps)
445 #
446 # If you have the UPX package, set this to the upx.exe executable.
447 #
448 # UPX can be downloaded from:
449 #   http://upx.sourceforge.net/
450 #
451 # If you don't have UPX, or don't want to pack exes and dlls,
452 # comment this line out, so that UPX isn't defined.
453 #
454
455 UPX=$(WIRESHARK_LIBS)\upx301w\upx.exe
456
457 ##### Flags, PATHs and Miscellaneous #####
458
459 # "convert" the MSVC variant into the required MSC compiler version
460 !IF "$(MSVC_VARIANT)" == "MSVC6"
461 MSC_VER_REQUIRED=1200
462 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10"
463 MSC_VER_REQUIRED=1300
464 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
465 MSC_VER_REQUIRED=1310
466 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
467 MSC_VER_REQUIRED=1400
468 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008" ||  "$(MSVC_VARIANT)" == "MSVC2008EE"
469 MSC_VER_REQUIRED=1500
470 !ELSE
471 !ERROR MSVC_VARIANT unknown
472 !ENDIF
473
474 # Compiler flags:
475 # /W3  warning level 3 (0 less - 4 most, 1 default)
476 # /Zi  create .pdb file for debugging
477 # /MD  use "Multithreading Debug" libraries
478 # /D_CRT_SECURE_NO_DEPRECATE        Don't warn for "insecure" calls, see MSDN "Security Enhancements in the CRT"
479 # /D_CRT_NONSTDC_NO_DEPRECATE       Don't warn for "Deprecated CRT Functions" as MSDN calls this
480 # /D_BIND_TO_CURRENT_CRT_VERSION=1  Make sure our CRT and manifest versions match (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
481 # /DWIN32_LEAN_AND_MEAN             Don't include unnecessary Windows include files (see windows.h)
482 # /MP [<number of processes>]       [MSVC2008]: Compiles multiple source files by using multiple processes 
483 #                                               Add if desired for compile speedup on machines with 2 or more "effective processors"
484 # /MANIFEST:no                      Don't create a SxS manifest. Makes sure our plugins don't load a second copy of the CRT.
485 #
486 !IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
487 LOCAL_CFLAGS=/Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED)
488 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
489 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
490 !ELSE
491 !ERROR MSVC_VARIANT unknown
492 !ENDIF
493
494 # Linker flags:
495 # /DEBUG  generate debug info
496 # /PROFILE generate map file(s) for profiling
497 # /DEFAULTLIB:xxx use xxx as the standard C library
498 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
499 #
500 LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE)
501 DLL_LDFLAGS = 
502 !IF $(MSC_VER_REQUIRED) >= 1400
503 DLL_LDFLAGS = /MANIFEST:no
504 !ENDIF
505
506 PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
507
508 #
509 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
510 # XCOPY under Windows NT doesn't support the "/Y" flag.  This works
511 # around that bug.
512 # XXX - This apparently doesn't work for some versions of nmake:
513 # http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
514 # It looks like we'll have to call "set copycmd=/y" before we run xcopy.
515 COPYCMD=/y
516
517 #
518 # If you don't want to build libwireshark.dll, you should comment out the
519 # following line. (Note: for plugin support this option must stay activated)
520 ENABLE_LIBWIRESHARK=USE
521
522 #
523 # install (debug) directory for Wireshark (relative to your source dir)
524 INSTALL_DIR=wireshark-gtk2
525
526
527
528 ##### C-Runtime Redistributable #####
529 #
530 # The C-Runtime since Version 7 must be shipped together with
531 # the program installer, to avoid missing msvcr*.dll files on
532 # the target machine.
533 #
534 # The location of these files differ on the various compiler
535 # packages, the following will use the default paths depending
536 # on the package version.
537 #
538 !IF "$(MSVC_VARIANT)" == "MSVC6"
539 # msvcrt.dll will already be available on target machines - nothing additional to install
540
541 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2002"
542 # you probably need to tweak this directory if you don't use the professional edition!
543 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET\Visual Studio .NET Professional - English\msvcr70.dll
544
545 !ELSEIF "$(MSVC_VARIANT)" == "DOTNET10"
546 # no redistributable available for this package!
547
548 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2003"
549 # you probably need to tweak this directory if you don't use the professional edition!
550 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET 2003\Visual Studio .NET Professional 2003 - English\msvcr71.dll
551
552 !ELSEIF "$(MSVC_VARIANT)" == "DOTNET11"
553 # no redistributable available for this package!
554
555 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
556 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\*.*
557
558 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
559 # you need to download the redistributable package vcredist_x86.exe from Microsoft first,
560 # and copy it to the lib folder!!!
561 VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
562
563 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008"
564 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*
565
566 !ELSE
567 !ERROR MSVC_VARIANT unknown
568 !ENDIF
569
570
571
572 ##### Advanced: Docbook/XML documentation generation #####
573 # If you want to generate the Docbook/XML based docs (User's and Developer's
574 # Guide, ...), you'll need some additional tools / libraries compared to the
575 # rest of the build process.
576 #
577 # FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\readme.txt.
578 #
579 # If you don't call the Makefile.nmake in the docbook dir to generate the
580 # docs, the following settings in this section will have no effect.
581
582 # formatting objects processor executable
583 # Comment this out if you don't have fop installed or you don't want the docs
584 # in PDF format.
585 !IFNDEF FOP
586 FOP=fop-0.20.5\fop.bat
587 !ENDIF
588
589 # Additional options to fop.
590 FOP_OPTS=-Xmx256m
591
592 # html help compiler
593 # Comment this out if you don't have hhc.exe or you don't want the docs in
594 # .chm format.
595 #
596 # Beware: hhc.exe is NOT part of the MSVC packages in HHC_DIR mentioned above,
597 # so you'll need to install the HTML Help Workshop for this.
598 HHC_EXE="$(HHC_DIR)\hhc.exe"
599
600 # html to text converter for text version of release notes, e.g. elinks.
601 # This could also be "lynx", or "true" if neither elinks nor lynx is installed
602 # (cygwin: lynx works, elinks not available, links and true doesn't produce output)
603 #HTML2TXT=elinks -dump -dump-width 72
604 #HTML2TXT=links -dump -width 72
605 #HTML2TXT=lynx -dump -width=72 -nolist -stdin
606
607 !IFNDEF HTML2TXT
608 HTML2TXT=$(PYTHON) $(TOOLS_DIR)\html2text.py --width=72 --no-links
609 !ENDIF
610
611 # the XSL processor (part of cygwin's libxslt package)
612 XSLTPROC="xsltproc"
613
614 # the XML validator (part of cygwin's libxml2 package)
615 XMLLINT="xmllint"
616
617
618
619 ##############################################################################
620 #
621 # You should not have to change anything below this comment.
622 # If you do, it's a deficiency in the Makefile.nmake files;
623 # either tell wireshark-dev@wireshark.org about it, including
624 # details of why you had to change it, or fix config.nmake
625 # and any Makefile.nmake files that need to be changed, and
626 # send us the patches, along with details of why the change
627 # was necessary.
628 #
629 ##############################################################################
630
631 #
632 # The RC_VERSION should be comma-separated, not dot-separated,
633 # as per Graham Bloice's message in
634 #
635 #       http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
636 #
637 # "The RC_VERSION variable in config.nmake should be comma separated.
638 # This allows the resources to be built correctly and the version
639 # number to be correctly displayed in the explorer properties dialog
640 # for the executables, and XP's tooltip, rather than 0.0.0.0."
641 #
642
643 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
644 RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO),$(VERSION_BUILD)
645
646 WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
647 RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
648
649
650 GLIB_CFLAGS=/I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
651         /I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
652 GCC_GLIB_CFLAGS=-I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
653         -I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
654 GLIB_LIBS=$(GLIB_DIR)\lib\glib-$(GLIB_VERSION).lib \
655         $(GLIB_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
656         $(GLIB_DIR)\lib\gobject-$(GLIB_VERSION).lib
657
658 # GTK+
659 GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-2.0 \
660         /I$(GTK_DIR)\lib\gtk-2.0\include \
661         /I$(GTK_DIR)\include\atk-1.0 \
662         /I$(GTK_DIR)\include\cairo \
663         /I$(GTK_DIR)\include\pango-1.0
664 GTK_LIBS=$(GTK_DIR)\lib\gtk-win32-2.0.lib \
665         $(GTK_DIR)\lib\gdk-win32-2.0.lib \
666         $(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
667         $(GTK_DIR)\lib\pango-1.0.lib \
668         $(GLIB_LIBS)
669
670 !IF "$(GTK_INST_VERSION)" == "2.14"
671 GTK_LIB_DIR=2.10.0
672 NEED_LIBPNG_DLL=USE
673 NEED_LIBJPEG_DLL=USE
674 NEED_LIBTIFF_DLL=USE
675 NEED_CAIRO_DLL=USE
676 GTK_WIMP_DLLSRC_DIR=$(GTK_DIR)\lib\gtk-2.0\2.10.0\engines
677 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.10.0\engines
678 GTK_WIMP_RCSRC_DIR=$(GTK_DIR)\share\themes\MS-Windows\gtk-2.0
679 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
680 !ELSEIF "$(GTK_INST_VERSION)" == "2.12"
681 GTK_LIB_DIR=2.10.0
682 NEED_LIBPNG_DLL=USE
683 NEED_LIBJPEG_DLL=USE
684 NEED_LIBTIFF_DLL=USE
685 NEED_CAIRO_DLL=USE
686 GTK_WIMP_DLLSRC_DIR=$(GTK_DIR)\lib\gtk-2.0\2.10.0\engines
687 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.10.0\engines
688 GTK_WIMP_RCSRC_DIR=$(GTK_DIR)\share\themes\MS-Windows\gtk-2.0
689 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
690 !ELSE
691 !ERROR ? Unknown or invalid GTK_INST_VERSION
692 !ENDIF
693
694 !IF "$(PANGO_INST_VERSION)" == "1.22"
695 PANGO_LIB_DIR=1.5.0
696 !ELSEIF "$(PANGO_INST_VERSION)" == "1.18"
697 PANGO_LIB_DIR=1.5.0
698 !ELSEIF "$(PANGO_INST_VERSION)" == "1.16"
699 PANGO_LIB_DIR=1.5.0
700 !ELSE
701 !ERROR ? Unknown or invalid PANGO_INST_VERSION
702 !ENDIF
703
704 !IFDEF AIRPCAP_DIR
705 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
706 AIRPDCAP_CONFIG=^#define HAVE_AIRPDCAP 1
707 #AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
708 !ELSE
709 AIRPCAP_CONFIG=
710 AIRPDCAP_CONFIG=
711 !ENDIF
712
713 !IFDEF PCAP_DIR
714 # Nmake uses carets to escape special characters
715 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
716 PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
717 PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
718 PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
719 # PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
720 PCAP_BREAKLOOP_CONFIG=
721 WPCAP_CONSTIFIED_CONFIG=^#define WPCAP_CONSTIFIED 1
722 !ELSE
723 # no WpdPack installed
724 WINPCAP_CONFIG=
725 PCAP_FINDALLDEVS_CONFIG=
726 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
727 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
728 PCAP_BREAKLOOP_CONFIG=
729 WPCAP_CONSTIFIED=
730 !ENDIF
731
732 PCAP_LIST_DATALINKS_CONFIG=^#define HAVE_PCAP_LIST_DATALINKS 1
733 PCAP_SET_DATALINK_CONFIG=^#define HAVE_PCAP_SET_DATALINK 1
734
735 !IF DEFINED(PCAP_DIR) && DEFINED(PCAP_REMOTE)
736 PCAP_HAVE_REMOTE_CONFIG=^#define HAVE_REMOTE 1
737 PCAP_REMOTE_CONFIG=^#define HAVE_PCAP_REMOTE 1
738 PCAP_OPEN_CONFIG=^#define HAVE_PCAP_OPEN 1
739 PCAP_FINDALLDEVS_EX_CONFIG=^#define HAVE_PCAP_FINDALLDEVS_EX 1
740 PCAP_CREATESRCSTR_CONFIG=^#define HAVE_PCAP_CREATESRCSTR 1
741 PCAP_SETSAMPLING_CONFIG=^#define HAVE_PCAP_SETSAMPLING 1
742 !ELSE
743 PCAP_HAVE_REMOTE_CONFIG=
744 PCAP_REMOTE_CONFIG=
745 PCAP_OPEN_CONFIG=
746 PCAP_FINDALLDEVS_EX_CONFIG=
747 PCAP_CREATESRCSTR_CONFIG=
748 PCAP_SETSAMPLING_CONFIG=
749 !ENDIF
750
751 !IFDEF ZLIB_DIR
752 ZLIB_PATH=$(ZLIB_DIR)
753 ZLIB_CFLAGS=/I$(ZLIB_DIR)\include
754 ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
755 ZLIB_DLL=$(ZLIB_DIR)\zlib1.dll
756 # Nmake uses carets to escape special characters
757 ZLIB_CONFIG=^#define HAVE_LIBZ 1
758 !else
759 ZLIB_CFLAGS=
760 ZLIB_LIBS=
761 ZLIB_DLL=
762 ZLIB_CONFIG=
763 !ENDIF
764
765 !IFDEF C_ARES_DIR
766 !UNDEF ADNS_DIR
767 C_ARES_CFLAGS=/I$(C_ARES_DIR)
768 C_ARES_LIBS=$(C_ARES_DIR)\cares.lib
769 C_ARES_DLL=$(C_ARES_DIR)\cares.dll
770 # Nmake uses carets to escape special characters
771 C_ARES_CONFIG=^#define HAVE_C_ARES 1
772 !else
773 C_ARES_CFLAGS=
774 C_ARES_LIBS=
775 C_ARES_CONFIG=
776 !IFDEF ADNS_DIR
777 ADNS_PATH=$(ADNS_DIR)\adns_win32\lib
778 ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
779 ADNS_LIBS=$(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns\adns_dll.lib
780 ADNS_DLL=$(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns\adns_dll.dll
781 # Nmake uses carets to escape special characters
782 ADNS_CONFIG=^#define HAVE_GNU_ADNS 1
783 !else
784 ADNS_CFLAGS=
785 ADNS_LIBS=
786 ADNS_CONFIG=
787 !ENDIF # ADNS
788 !ENDIF # C_ARES
789
790 !IFDEF KFW_DIR
791 KFW_PATH=$(KFW_DIR)\bin
792 KFW_CFLAGS=/I$(KFW_DIR)\inc
793 KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
794 # Nmake uses carets to escape special characters
795 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
796 !else
797 KFW_CFLAGS=
798 KFW_LIBS=
799 KFW_CONFIG=
800 !ENDIF
801
802 !IFDEF PCRE_DIR
803 PCRE_PATH=$(PCRE_DIR)\bin
804 PCRE_CFLAGS=/I$(PCRE_DIR)\include
805 PCRE_LIBS=$(PCRE_DIR)\lib\pcre.lib
806 # Nmake uses carets to escape special characters
807 PCRE_CONFIG=^#define HAVE_LIBPCRE 1
808 !else
809 PCRE_CFLAGS=
810 PCRE_LIBS=
811 PCRE_CONFIG=
812 !ENDIF
813
814 !IFDEF NETTLE_DIR
815 NETTLE_CFLAGS=/I$(NETTLE_DIR)
816 NETTLE_LIBS=$(NETTLE_DIR)\libnettle.lib
817 # Nmake uses carets to escape special characters
818 NETTLE_CONFIG=^#define HAVE_LIBNETTLE 1
819 !else
820 NETTLE_CFLAGS=
821 NETTLE_LIBS=
822 NETTLE_CONFIG=
823 !ENDIF
824
825 !IFDEF GNUTLS_DIR
826 GNUTLS_PATH=$(GNUTLS_DIR)
827 # /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
828 GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
829 GNUTLS_LIBS=\
830         $(GNUTLS_DIR)\bin\libtasn1-3.lib        \
831         $(GNUTLS_DIR)\bin\libgpg-error-0.lib    \
832         $(GNUTLS_DIR)\bin\libgcrypt-11.lib      \
833         $(GNUTLS_DIR)\bin\libgnutls-26.lib
834 # Nmake uses carets to escape special characters
835 GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
836 LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
837 !else
838 GNUTLS_CFLAGS=
839 GNUTLS_LIBS=
840 GNUTLS_CONFIG=
841 LIBGCRYPT_CONFIG=
842 !ENDIF
843
844 !IFDEF LUA_DIR
845 LUA_CFLAGS=/I$(LUA_DIR)\include
846 LUA_LIBS=$(LUA_DIR)\lua5.1.lib
847 # Nmake uses carets to escape special characters
848 LUA_CONFIG=^#define HAVE_LUA 1
849 LUA_VERSION=^#define HAVE_LUA_5_1 1
850 !else
851 LUA_CFLAGS=
852 LUA_LIBS=
853 LUA_CONFIG=
854 !ENDIF
855
856 !IFDEF PORTAUDIO_DIR
857 # Nmake uses carets to escape special characters
858 PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
859 !IF "$(PORTAUDIO_VERSION)" == "18"
860 # V18 uses API version 1 and v19 API version 2
861 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
862 PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
863 !ELSE
864 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common /I$(PORTAUDIO_DIR)\src\os\win /DPA_NO_DS /DPA_NO_ASIO
865 !ENDIF
866 !ELSE
867 PORTAUDIO_CFLAGS=
868 PORTAUDIO_CONFIG=
869 !ENDIF
870
871 !IFDEF HHC_DIR
872 !IF "$(MSVC_VARIANT)" == "MSVC6"
873 HHC_CFLAGS=/I"$(HHC_DIR)\include" -DHHC_DIR
874 HHC_LIBS="$(HHC_DIR)\lib\htmlhelp.lib"
875 !ELSE
876 HHC_CFLAGS=-DHHC_DIR
877 HHC_LIBS=htmlhelp.lib
878 !ENDIF
879 !ELSE
880 HHC_CFLAGS=
881 HHC_LIBS=
882 !ENDIF
883
884 !IFDEF SMI_DIR
885 SMI_CONFIG=^#define HAVE_LIBSMI 1
886 SMI_CFLAGS=/I$(SMI_DIR)\include
887 SMI_LIBS=$(SMI_DIR)\lib\smi.lib
888 !ELSE
889 SMI_LIBS=
890 SMI_CFLAGS=
891 SMI_CONFIG=
892 !ENDIF
893
894 !IFDEF GEOIP_DIR
895 GEOIP_CONFIG=^#define HAVE_GEOIP 1
896 GEOIP_CFLAGS=/I$(GEOIP_DIR)\libGeoIP
897 GEOIP_LIBS=$(GEOIP_DIR)\libGeoIP\GeoIP.lib
898 !ELSE
899 GeoIP_LIBS=
900 GeoIP_CFLAGS=
901 GeoIP_CONFIG=
902 !ENDIF
903
904 !IFDEF ENABLE_LIBWIRESHARK
905 LIBWIRESHARK_CONFIG=^#define HAVE_LIBWIRESHARKDLL 1
906 # Link plugins with the import library of libwireshark.dll
907 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
908 !ELSE
909 LIBWIRESHARK_CONFIG=
910 !ENDIF
911
912 # Construct the path
913 !IFDEF ICONV_DIR
914 PATH=$(PATH);$(CYGWIN_PATH);$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ICONV_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
915 !ELSE
916 PATH=$(PATH);$(CYGWIN_PATH);$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
917 !ENDIF
918
919 # We can't use a lot of IPv6 code with plain Visual C++ 6.0
920 !IF "$(MSVC_VARIANT)" == "MSVC6" && !DEFINED(MSSDK)
921 INET6_CONFIG=
922 !ELSE
923 INET6_CONFIG=^#define INET6 1
924 !ENDIF