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).
6 ##### Target platform #####
7 # Only "win32" and "win64" are valid (for now).
8 # This can be defined in the system environment.
9 !IFNDEF WIRESHARK_TARGET_PLATFORM
10 WIRESHARK_TARGET_PLATFORM=win32
15 # The current Wireshark version
16 # It's highly recommended to leave MAJOR/MINOR/MICRO unchanged
21 # It's recommended to change VERSION_EXTRA for your own custom builds
25 # The version of the wiretap library (recommended: leave unchanged)
32 ##### Directories #####
35 # Base directory, where your libraries reside, which are needed to
36 # compile the sources. This setting is used only inside this file.
38 WIRESHARK_LIBS=C:\wireshark-$(WIRESHARK_TARGET_PLATFORM)-libs
41 # Base directory, where your programs reside.
42 # This setting is used only inside this file.
44 PROGRAM_FILES=$(PROGRAMFILES)
47 # Location of the "tools" directory. This affects HTML2TXT below and should
48 # be overridden by makefiles in any subdirectories that use HTML2TXT.
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 "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
62 !else if "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
67 !error Your mysterious moon-man architecture "$(WIRESHARK_TARGET_PLATFORM)" frightens and confuses us.
71 ##### Microsoft Visual C / Studio Variant #####
72 # for the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
73 # only one of the following MSVC_VARIANT settings should be used
74 # BTW: The "Microsoft Visual C++ Toolkit 2003" DOESN'T WORK for WS!
76 # "Microsoft Visual Studio 6.0"
77 # Visual C++ 6.0, _MSC_VER 1200, msvcrt.dll (version 6)
80 # "Microsoft Visual Studio .NET (2002)"
81 # Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
82 #MSVC_VARIANT=MSVC2002
84 # "Microsoft .Net Framework SDK Version 1.0"
85 # needs additional Platform SDK installation
86 # Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
87 #MSVC_VARIANT=DOTNET10
89 # "Microsoft Visual Studio .NET 2003"
90 # Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
91 #MSVC_VARIANT=MSVC2003
93 # "Microsoft .Net Framework SDK Version 1.1"
94 # needs additional Platform SDK installation
95 # Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
96 #MSVC_VARIANT=DOTNET11
98 # "Microsoft Visual Studio 2005"
99 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
100 #MSVC_VARIANT=MSVC2005
102 # "Microsoft Visual C++ 2005 Express Edition"
103 # needs additional Platform SDK installation
104 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
105 #MSVC_VARIANT=MSVC2005EE
107 # "Microsoft .Net Framework 2.0 SDK"
108 # needs additional Platform SDK installation
109 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
110 #MSVC_VARIANT=DOTNET20
112 # "Microsoft Visual Studio 2008"
113 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
114 MSVC_VARIANT=MSVC2008
116 # "Microsoft Visual C++ 2008 Express Edition"
117 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
118 #MSVC_VARIANT=MSVC2008EE
121 # Optional: To compile some time critical code from assembler instead of C
123 # If you have the NASM compiler, set this to the NASM executable.
124 # http://nasm.sourceforge.net/
126 # If you don't have NASM, comment this line out, so that NASM
129 NASM=$(WIRESHARK_LIBS)\nasm-2.02\nasm.exe
132 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
133 ##### Win32 Libraries #####
135 # Mandatory: GLib settings
137 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
141 ##### To Use new packet list uncomment this line ####
142 ### Warning Experimental - work in progress
143 NEW_PACKET_LIST_CONFIG=^#define NEW_PACKET_LIST 1
146 # Mandatory: GLib, GTK & related library settings
148 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
150 # If you want building with GTK+, set GTK_DIR to the pathname of the
151 # directory in which the "include" and "lib" directories reside.
153 GTK_DIR=$(WIRESHARK_LIBS)\gtk2
154 # These macros are used by the nsis installer script and by the install target.
155 TIFF_DLL=libtiff-3.dll
156 JPEG_DLL=libjpeg-7.dll
157 FREETYPE_DLL=freetype6.dll
158 FONTCONFIG_DLL=libfontconfig-1.dll
159 EXPAT_DLL=libexpat-1.dll
161 # This macro is used by the setup target.
162 GTK_PKG=2.16.6-20091013
165 # Mandatory: Version numbers of GTK and pango.
167 # (MAJOR + MINOR Version number but without MICRO version number)
168 # These macros are used by the nsis installer script and by the setup target.
170 # GTK 2.12 is the mainline since Wireshark 0.99.7
171 GTK_INST_VERSION=2.16
174 # Optional: WinPcap developer's pack to capture network traffic.
176 # If you have the WinPcap developer's pack (at least version 3.0),
177 # set this to the directory in which the WinPcap developer's pack resides.
179 # If you don't have the WPdpack, comment this line out, so that
180 # PCAP_DIR isn't defined.
182 PCAP_DIR=$(WIRESHARK_LIBS)\WPdpack
183 # This macro is used by the nsis installer script, by the u3/portable apps and by the setup target.
187 # Optional: WinPcap remote capture support and new API
188 # (pcap_open(), pcap_findalldevs_ex(), etc.)
193 # Optional: The ZLib enables unzipping of gzip compressed capture files
196 # If you have Zlib, set this to directory in which the Zlib headers
197 # and .lib file are stored.
199 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
202 ZLIB_DIR=$(WIRESHARK_LIBS)\zlib123
205 # Optional: the ADNS library enables asynchronous (nonblocking) DNS
208 # If you have GNU ADNS, set this to the directory in which the GNU ADNS
209 # .lib file is stored.
211 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
214 # If C_ARES_DIR is defined below, it will override this setting.
216 #ADNS_DIR=$(WIRESHARK_LIBS)\adns-1.0-win32-05ws
219 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
222 # If you have c-ares, set this to the directory in which the c-ares
223 # .lib file is stored. Setting this will override ADNS_DIR above. You
226 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
227 # defines socklen_t, such as Windows Server 2003 PSDK.
229 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
232 C_ARES_DIR=$(WIRESHARK_LIBS)\c-ares-1.6.0ws
235 # Optional: the PCRE (Perl Compatible Regular Expressions) library
236 # enables regular expressions for display filters.
238 # If you have the PCRE library, set this to the directory in which
239 # the GNUWIN32 pcre-lib package is stored.
241 # If you don't have PCRE, comment this line out, so that PCRE_DIR
244 PCRE_DIR=$(WIRESHARK_LIBS)\pcre-7.0
247 # Optional: the GNUTLS library enables ssl decryption.
249 # If you have the GNUTLS library, set this to the directory where
250 # the lib and include files are stored.
252 # If you don't have GNUTLS, comment this line out, so that GNUTLS_DIR
255 # Platform SDK conflicts with openssl.h header
256 GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-2.8.5-1
259 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
261 # If you have the kerberos for windows (mit) library, set this to the
262 # directory where the kfw package is stored.
264 # If you don't have KFW, comment this line out, so that KFW_DIR
267 KFW_DIR=$(WIRESHARK_LIBS)\kfw-3.2.2-ws1
270 # Optional: the Nettle library enables ??? decryption.
272 # If you have the Nettle encryption library, set this to the
273 # directory in which the nettle package is stored.
275 # If you don't have Nettle, comment this line out, so that NETTLE_DIR
278 # NETTLE_DIR=$(WIRESHARK_LIBS)\nettle-1.10
281 # Optional: the LUA library enables scripting support.
283 # If you have the LUA library, set this to the directory in which
284 # the LUA package is stored.
286 # If you don't have LUA, comment this line out, so that LUA_DIR
289 LUA_DIST=5_1_4_Win32_dll6
290 LUA_DIR=$(WIRESHARK_LIBS)\lua5.1.4
293 # Optional: the PORTAUDIO library enables audio output for RTP streams.
295 # If you have the PORTAUDIO library (used for rtp_player), set this to
296 # the directory in which the PORTAUDIO library is stored.
298 # If you don't have PORTAUDIO, comment this line out, so that
299 # PORTAUDIO_DIR isn't defined.
301 #PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v18_1
302 PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v19_2
305 # Version number of PortAudio
307 #PORTAUDIO_VERSION=18
311 # Optional: AirPcap developer's pack to capture wireless network traffic
312 # incl. 802.11 management frames.
314 # If you have the AirPcap developer's pack, set this to the directory
315 # in which the AirPcap developer's pack resides.
317 # If you don't have the AirPcap developer's pack, comment this line out,
318 # so that AIRPCAP_DIR isn't defined.
320 AIRPCAP_DIR=$(WIRESHARK_LIBS)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
323 # Optional: LIBSMI, System Management Interface
325 # Used for oid-name resolution for SNMP and other protocols
327 SMI_DIR=$(WIRESHARK_LIBS)\libsmi-0.4.8
330 # Optional: GeoIP, IP address database lookups
332 # Used to map IP addresses to MaxMind GeoIP database entries
334 # GeoIP requires IPv6 definitions that don't ship with Visual C++ 6.0.
335 # However, the Microsoft Platform SDK for Windows Server 2003 R2 provides
336 # these definitions. The SDK's SetEnv.bat script defines INETSDK.
337 !IF "$(MSVC_VARIANT)" != "MSVC6" || DEFINED(INETSDK)
338 GEOIP_DIR=$(WIRESHARK_LIBS)\GeoIP-1.4.5ws
342 ##### Win64 Libraries #####
344 # Mandatory: GLib settings
346 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
350 ##### To Use new packet list uncomment this line ####
351 ### Warning Experimental - work in progress
352 NEW_PACKET_LIST_CONFIG=^#define NEW_PACKET_LIST 1
355 # Mandatory: GLib, GTK & related library settings
357 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
359 # If you want building with GTK+, set GTK_DIR to the pathname of the
360 # directory in which the "include" and "lib" directories reside.
362 GTK_DIR=$(WIRESHARK_LIBS)\gtk2
363 # These macros are used by the nsis installer script and by the install target.
364 TIFF_DLL=libtiff-3.dll
365 JPEG_DLL=libjpeg-7.dll
366 FREETYPE_DLL=libfreetype-6.dll
367 FONTCONFIG_DLL=libfontconfig-1.dll
368 EXPAT_DLL=libexpat-1.dll
369 INTL_DLL=libintl-8.dll
371 # These macros are used by the setup target.
372 GTK_PKG=2.16.6-20090912
375 # Mandatory: Version numbers of GTK and pango.
377 # (MAJOR + MINOR Version number but without MICRO version number)
378 # These macros are used by the nsis installer script and by the setup target.
380 GTK_INST_VERSION=2.16
383 # Optional: WinPcap developer's pack to capture network traffic.
385 # If you have the WinPcap developer's pack (at least version 3.0),
386 # set this to the directory in which the WinPcap developer's pack resides.
388 # If you don't have the WPdpack, comment this line out, so that
389 # PCAP_DIR isn't defined.
391 PCAP_DIR=$(WIRESHARK_LIBS)\WPdpack
392 # This macro is used by the nsis installer script, by the u3/portable apps and by the setup target.
396 # Optional: WinPcap remote capture support and new API
397 # (pcap_open(), pcap_findalldevs_ex(), etc.)
402 # Optional: The ZLib enables unzipping of gzip compressed capture files
405 # If you have Zlib, set this to directory in which the Zlib headers
406 # and .lib file are stored.
408 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
411 ZLIB_DIR=$(WIRESHARK_LIBS)\zlib123
414 # Optional: the ADNS library enables asynchronous (nonblocking) DNS
417 # If you have GNU ADNS, set this to the directory in which the GNU ADNS
418 # .lib file is stored.
420 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
423 # If C_ARES_DIR is defined below, it will override this setting.
425 #ADNS_DIR=$(WIRESHARK_LIBS)\adns-1.0-win32-05ws
428 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
431 # If you have c-ares, set this to the directory in which the c-ares
432 # .lib file is stored. Setting this will override ADNS_DIR above. You
435 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
436 # defines socklen_t, such as Windows Server 2003 PSDK.
438 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
441 #C_ARES_DIR=$(WIRESHARK_LIBS)\c-ares-1.5.2ws
444 # Optional: the PCRE (Perl Compatible Regular Expressions) library
445 # enables regular expressions for display filters.
447 # If you have the PCRE library, set this to the directory in which
448 # the GNUWIN32 pcre-lib package is stored.
450 # If you don't have PCRE, comment this line out, so that PCRE_DIR
453 #PCRE_DIR=$(WIRESHARK_LIBS)\pcre-7.0
456 # Optional: the GNUTLS library enables ssl decryption.
458 # If you have the GNUTLS library, set this to the directory where
459 # the lib and include files are stored.
461 # If you don't have GNUTLS, comment this line out, so that GNUTLS_DIR
464 # Platform SDK conflicts with openssl.h header
465 #GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-2.8.1-1
468 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
470 # If you have the kerberos for windows (mit) library, set this to the
471 # directory where the kfw package is stored.
473 # If you don't have KFW, comment this line out, so that KFW_DIR
476 #KFW_DIR=$(WIRESHARK_LIBS)\kfw-3.2.2-ws1
479 # Optional: the Nettle library enables ??? decryption.
481 # If you have the Nettle encryption library, set this to the
482 # directory in which the nettle package is stored.
484 # If you don't have Nettle, comment this line out, so that NETTLE_DIR
487 # NETTLE_DIR=$(WIRESHARK_LIBS)\nettle-1.10
490 # Optional: the LUA library enables scripting support.
492 # If you have the LUA library, set this to the directory in which
493 # the LUA package is stored.
495 # If you don't have LUA, comment this line out, so that LUA_DIR
498 LUA_DIST=5_1_4_Win64_dll9
499 LUA_DIR=$(WIRESHARK_LIBS)\lua5.1.4
502 # Optional: the PORTAUDIO library enables audio output for RTP streams.
504 # If you have the PORTAUDIO library (used for rtp_player), set this to
505 # the directory in which the PORTAUDIO library is stored.
507 # If you don't have PORTAUDIO, comment this line out, so that
508 # PORTAUDIO_DIR isn't defined.
510 #PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v18_1
511 PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v19_2
514 # Version number of PortAudio
516 #PORTAUDIO_VERSION=18
520 # Optional: AirPcap developer's pack to capture wireless network traffic
521 # incl. 802.11 management frames.
523 # If you have the AirPcap developer's pack, set this to the directory
524 # in which the AirPcap developer's pack resides.
526 # If you don't have the AirPcap developer's pack, comment this line out,
527 # so that AIRPCAP_DIR isn't defined.
529 AIRPCAP_DIR=$(WIRESHARK_LIBS)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
532 # Optional: LIBSMI, System Management Interface
534 # Used for oid-name resolution for SNMP and other protocols
536 #SMI_DIR=$(WIRESHARK_LIBS)\libsmi-0.4.8
539 # Optional: GeoIP, IP address database lookups
541 # Used to map IP addresses to MaxMind GeoIP database entries
543 # GeoIP requires IPv6 definitions that don't ship with Visual C++ 6.0.
544 # However, the Microsoft Platform SDK for Windows Server 2003 R2 provides
545 # these definitions. The SDK's SetEnv.bat script defines INETSDK.
546 !IF "$(MSVC_VARIANT)" != "MSVC6" || DEFINED(INETSDK)
547 #GEOIP_DIR=$(WIRESHARK_LIBS)\GeoIP-1.4.5ws
554 # Set the following mandatory commands to find the tools.
555 # The easiest way is to use the corresponding packages from cygwin.
557 # Set up the path to the cygwin binaries
558 CYGWIN_PATH=c:\cygwin\bin
560 # command for a shell (cygwin's bash package recommended)
563 # bash versions after 3.1.6 need the 'igncr' shell option to be able to
564 # process scripts in windows 'native format' (dos crlf format).
565 # The following !IF results in the option being used only if it is available
566 # since using it on bash version 3.1.6 (or earlier) is not required and
567 # will cause an error message.
568 !if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
572 SH=$(SH_PROG) $(SH_FLAGS)
575 # command for perl (cygwin's perl package recommended)
578 # command for pod2man and pod2html
579 # (part of the perl package, usually leave these unchanged)
580 POD2MAN=$(SH) pod2man
581 POD2HTML=$(SH) pod2html
583 # Command for native Windows Python (recommended)
584 # V2.4 to V2.6 should work
586 # If you want to specify your Python settings, uncomment the lines below.
587 #PYTHON="C:\Python26\python.exe"
588 #PATH=c:\Python26;$(PATH)
590 # Command for Cygwin's Python (not recommended)
593 # Otherwise, find Python automatically.
595 !IF EXIST(c:\Python26\python.exe)
596 PYTHON="C:\Python26\python.exe"
597 PATH=c:\Python26;$(PATH)
598 !ELSE IF EXIST(c:\Python25\python.exe)
599 PYTHON="C:\Python25\python.exe"
600 PATH=c:\Python25;$(PATH)
601 !ELSE IF EXIST(c:\Python24\python.exe)
602 PYTHON="C:\Python24\python.exe"
603 PATH=c:\Python24;$(PATH)
607 # command for lex/flexx (cygwin's flex recommended)
610 # command for yacc/bison (cygwin's bison recommended)
614 # Optional: To build the NSIS installer.
616 # If you have the NSIS package, set this to the NSIS executable.
618 # If you don't have NSIS, comment this line out, so that MAKENSIS
621 MAKENSIS="$(PROGRAM_FILES)\nsis\makensis.exe"
624 # Optional: To build the developers API documentation with doxygen and dot.
625 # Currently experimental, outdated and incomplete.
627 # You will have to download and install:
628 # Doxygen from: http://www.doxygen.org
629 # Graphviz from: http://www.research.att.com/sw/tools/graphviz/
631 # If you have doxygen, set this to the doxygen executable.
633 # If you don't want the developers documentation (or don't have the tools),
634 # comment this line out, so that DOXYGEN isn't defined.
636 #DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
639 # Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
641 # The required htmlhelp.h and htmlhelp.lib should be included in MSVC_VARIANT > MSVC6.
643 # For MSVC_VARIANT == MSVC6 you will have to download and install the html help workshop from:
645 # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html
646 # /hwMicrosoftHTMLHelpDownloads.asp
648 # Then point HHC_DIR to the html help dir (where hhc.exe resides).
650 # If you don't want the online help (or don't have the tools),
651 # comment this line out, so that HHC_DIR isn't defined.
653 HHC_DIR=$(PROGRAM_FILES)/HTML Help Workshop
656 # Optional: To reduce the size of dlls and exes, which is especially useful for USB device distributions (U3, PortableApps)
658 # If you have the UPX package, set this to the upx.exe executable.
660 # UPX can be downloaded from:
661 # http://upx.sourceforge.net/
663 # If you don't have UPX, or don't want to pack exes and dlls,
664 # comment this line out, so that UPX isn't defined.
667 UPX=$(WIRESHARK_LIBS)\upx303w\upx.exe
669 ##### Flags, PATHs and Miscellaneous #####
671 # "convert" the MSVC variant into the required MSC compiler version
672 !IF "$(MSVC_VARIANT)" == "MSVC6"
673 MSC_VER_REQUIRED=1200
674 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10"
675 MSC_VER_REQUIRED=1300
676 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
677 MSC_VER_REQUIRED=1310
678 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
679 MSC_VER_REQUIRED=1400
680 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
681 MSC_VER_REQUIRED=1500
683 !ERROR MSVC_VARIANT unknown
687 # /W3 warning level 3 (0 less - 4 most, 1 default)
688 # /Zi create .pdb file for debugging
689 # /MD use "Multithreading Debug" libraries
690 # /D_CRT_SECURE_NO_DEPRECATE Don't warn for "insecure" calls, see MSDN "Security Enhancements in the CRT"
691 # /D_CRT_NONSTDC_NO_DEPRECATE Don't warn for "Deprecated CRT Functions" as MSDN calls this
692 # /D_BIND_TO_CURRENT_CRT_VERSION=1 Make sure our CRT and manifest versions match (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
693 # /DWIN32_LEAN_AND_MEAN Don't include unnecessary Windows include files (see windows.h)
694 # /MANIFEST:no Don't create a SxS manifest. Makes sure our plugins don't load a second copy of the CRT.
696 !IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
697 LOCAL_CFLAGS=/Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED)
698 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
699 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)
700 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
701 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
704 !ERROR MSVC_VARIANT unknown
707 # http://msdn.microsoft.com/en-us/library/bb385193.aspx
708 # /MP Compiles multiple source files by using multiple processes
709 # /MP[processMax] If you omit the processMax argument, the compiler retrieves the number of effective processors
710 # on your computer from the operating system, and creates a process for each processor.
712 # The following compiler options and language features that are incompatible with the /MP option:
714 # * #import preprocessor directive
720 !IF "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
721 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /MP
724 # /DEBUG generate debug info
725 # /PROFILE generate map file(s) for profiling
726 # /DEFAULTLIB:xxx use xxx as the standard C library
727 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
729 LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE)
731 !IF $(MSC_VER_REQUIRED) >= 1400
732 DLL_LDFLAGS = /MANIFEST:no
735 PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
738 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
739 # XCOPY under Windows NT doesn't support the "/Y" flag. This works
741 # XXX - This apparently doesn't work for some versions of nmake:
742 # http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
743 # It looks like we'll have to call "set copycmd=/y" before we run xcopy.
747 # If you don't want to build libwireshark.dll, you should comment out the
748 # following line. (Note: for plugin support this option must stay activated)
749 ENABLE_LIBWIRESHARK=USE
752 # install (debug) directory for Wireshark (relative to your source dir)
753 INSTALL_DIR=wireshark-gtk2
757 ##### C-Runtime Redistributable #####
759 # The C-Runtime since Version 7 must be shipped together with
760 # the program installer, to avoid missing msvcr*.dll files on
761 # the target machine.
763 # The location of these files differ on the various compiler
764 # packages, the following will use the default paths depending
765 # on the package version.
767 !IF "$(MSVC_VARIANT)" == "MSVC6"
768 # msvcrt.dll will already be available on target machines - nothing additional to install
770 !ELSEIF "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
771 # We're not creating portable packages and therefore don't have to worry about
772 # "deploying using xcopy"
773 VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_$(TARGET_MACHINE).exe
775 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2002"
776 # you probably need to tweak this directory if you don't use the professional edition!
777 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET\Visual Studio .NET Professional - English\msvcr70.dll
779 !ELSEIF "$(MSVC_VARIANT)" == "DOTNET10"
780 # no redistributable available for this package!
782 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2003"
783 # you probably need to tweak this directory if you don't use the professional edition!
784 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET 2003\Visual Studio .NET Professional 2003 - English\msvcr71.dll
786 !ELSEIF "$(MSVC_VARIANT)" == "DOTNET11"
787 # no redistributable available for this package!
789 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
790 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 8\VC\redist\$(VCREDIST_DLL)\Microsoft.VC80.CRT\*.*
792 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
793 # you need to download the redistributable package vcredist_x86.exe from Microsoft first,
794 # and copy it to the lib folder!!!
795 VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_$(TARGET_MACHINE).exe
797 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008"
798 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 9.0\VC\redist\$(VCREDIST_DLL)\Microsoft.VC90.CRT\*.*
801 !ERROR MSVC_VARIANT unknown
804 !IF DEFINED(VCREDIST_EXE) && ! EXIST("$(VCREDIST_EXE)")
805 !ERROR Can't find $(VCREDIST_EXE). Have you downloaded it from Microsoft? \
806 See the developer's guide section "C-Runtime "Redistributable" files" for details how to get it
809 ##### Advanced: Docbook/XML documentation generation #####
810 # If you want to generate the Docbook/XML based docs (User's and Developer's
811 # Guide, ...), you'll need some additional tools / libraries compared to the
812 # rest of the build process.
814 # FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\README.txt.
816 # If you don't call the Makefile.nmake in the docbook dir to generate the
817 # docs, the following settings in this section will have no effect.
819 # formatting objects processor executable
820 # Comment this out if you don't have fop installed or you don't want the docs
823 # You may want to install the FOP hyphenation patterns from
824 # http://offo.sourceforge.net/hyphenation/
829 # Additional options to fop.
833 # Comment this out if you don't have hhc.exe or you don't want the docs in
836 # Beware: hhc.exe is NOT part of the MSVC packages in HHC_DIR mentioned above,
837 # so you'll need to install the HTML Help Workshop for this.
838 HHC_EXE="$(HHC_DIR)\hhc.exe"
840 # html to text converter for text version of release notes, e.g. elinks.
841 # This could also be "lynx", or "true" if neither elinks nor lynx is installed
842 # (cygwin: lynx works, elinks not available, links and true doesn't produce output)
843 #HTML2TXT=elinks -dump -dump-width 72
844 #HTML2TXT=links -dump -width 72
845 #HTML2TXT=lynx -dump -width=72 -nolist -stdin
848 HTML2TXT=$(PYTHON) $(TOOLS_DIR)\html2text.py --width=72 --no-links
851 # the XSL processor (part of cygwin's libxslt package)
854 # the XML validator (part of cygwin's libxml2 package)
859 ##############################################################################
861 # You should not have to change anything below this comment.
862 # If you do, it's a deficiency in the Makefile.nmake files;
863 # either tell wireshark-dev@wireshark.org about it, including
864 # details of why you had to change it, or fix config.nmake
865 # and any Makefile.nmake files that need to be changed, and
866 # send us the patches, along with details of why the change
869 ##############################################################################
872 # The RC_VERSION should be comma-separated, not dot-separated,
873 # as per Graham Bloice's message in
875 # http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
877 # "The RC_VERSION variable in config.nmake should be comma separated.
878 # This allows the resources to be built correctly and the version
879 # number to be correctly displayed in the explorer properties dialog
880 # for the executables, and XP's tooltip, rather than 0.0.0.0."
883 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
884 RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO),$(VERSION_BUILD)
886 WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
887 RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
890 GLIB_CFLAGS=/I$(GTK_DIR)\include\glib-$(GLIB_VERSION) \
891 /I$(GTK_DIR)\lib\glib-$(GLIB_VERSION)\include
892 GLIB_LIBS=$(GTK_DIR)\lib\glib-$(GLIB_VERSION).lib \
893 $(GTK_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
894 $(GTK_DIR)\lib\gobject-$(GLIB_VERSION).lib
895 GTHREAD_LIBS=$(GTK_DIR)\lib\gthread-$(GLIB_VERSION).lib
898 GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-2.0 \
899 /I$(GTK_DIR)\lib\gtk-2.0\include \
900 /I$(GTK_DIR)\include\atk-1.0 \
901 /I$(GTK_DIR)\include\cairo \
902 /I$(GTK_DIR)\include\pango-1.0
903 GTK_LIBS=$(GTK_DIR)\lib\gtk-win32-2.0.lib \
904 $(GTK_DIR)\lib\gdk-win32-2.0.lib \
905 $(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
906 $(GTK_DIR)\lib\pango-1.0.lib \
910 !IF "$(GTK_INST_VERSION)" == "2.16" || "$(GTK_INST_VERSION)" == "2.14" || "$(GTK_INST_VERSION)" == "2.12"
917 # Pango >=1.24.5 Needs these:
918 NEED_FREETYPE_DLL=USE
919 NEED_FONTCONFIG_DLL=USE
922 GTK_WIMP_DLLSRC_DIR=$(GTK_DIR)\lib\gtk-2.0\2.10.0\engines
923 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.10.0\engines
924 GTK_WIMP_RCSRC_DIR=$(GTK_DIR)\share\themes\MS-Windows\gtk-2.0
925 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
927 !ERROR ? Unknown or invalid GTK_INST_VERSION
932 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
933 AIRPDCAP_CONFIG=^#define HAVE_AIRPDCAP 1
934 #AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
941 # Nmake uses carets to escape special characters
942 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
943 PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
944 PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
945 PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
946 # PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
947 PCAP_BREAKLOOP_CONFIG=
949 # no WpdPack installed
951 PCAP_FINDALLDEVS_CONFIG=
952 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
953 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
954 PCAP_BREAKLOOP_CONFIG=
957 PCAP_LIST_DATALINKS_CONFIG=^#define HAVE_PCAP_LIST_DATALINKS 1
958 PCAP_SET_DATALINK_CONFIG=^#define HAVE_PCAP_SET_DATALINK 1
960 !IF DEFINED(PCAP_DIR) && DEFINED(PCAP_REMOTE)
961 PCAP_HAVE_REMOTE_CONFIG=^#define HAVE_REMOTE 1
962 PCAP_REMOTE_CONFIG=^#define HAVE_PCAP_REMOTE 1
963 PCAP_OPEN_CONFIG=^#define HAVE_PCAP_OPEN 1
964 PCAP_SETSAMPLING_CONFIG=^#define HAVE_PCAP_SETSAMPLING 1
966 PCAP_HAVE_REMOTE_CONFIG=
969 PCAP_SETSAMPLING_CONFIG=
973 ZLIB_PATH=$(ZLIB_DIR)
974 ZLIB_CFLAGS=/I$(ZLIB_DIR)\include
975 ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
976 ZLIB_DLL=$(ZLIB_DIR)\zlib1.dll
977 # Nmake uses carets to escape special characters
978 ZLIB_CONFIG=^#define HAVE_LIBZ 1
988 C_ARES_CFLAGS=/I$(C_ARES_DIR)
989 C_ARES_LIBS=$(C_ARES_DIR)\cares.lib
990 C_ARES_DLL=$(C_ARES_DIR)\cares.dll
991 # Nmake uses carets to escape special characters
992 C_ARES_CONFIG=^#define HAVE_C_ARES 1
998 ADNS_PATH=$(ADNS_DIR)\adns_win32\lib
999 ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
1000 ADNS_LIBS=$(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns\adns_dll.lib
1001 ADNS_DLL=$(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns\adns_dll.dll
1002 # Nmake uses carets to escape special characters
1003 ADNS_CONFIG=^#define HAVE_GNU_ADNS 1
1012 KFW_PATH=$(KFW_DIR)\bin
1013 KFW_CFLAGS=/I$(KFW_DIR)\include
1014 KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
1015 # Nmake uses carets to escape special characters
1016 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
1024 PCRE_PATH=$(PCRE_DIR)\bin
1025 PCRE_CFLAGS=/I$(PCRE_DIR)\include
1026 PCRE_LIBS=$(PCRE_DIR)\lib\pcre.lib
1027 # Nmake uses carets to escape special characters
1028 PCRE_CONFIG=^#define HAVE_LIBPCRE 1
1036 NETTLE_CFLAGS=/I$(NETTLE_DIR)
1037 NETTLE_LIBS=$(NETTLE_DIR)\libnettle.lib
1038 # Nmake uses carets to escape special characters
1039 NETTLE_CONFIG=^#define HAVE_LIBNETTLE 1
1047 GNUTLS_PATH=$(GNUTLS_DIR)
1048 # /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
1049 GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
1051 $(GNUTLS_DIR)\bin\libtasn1-3.lib \
1052 $(GNUTLS_DIR)\bin\libgpg-error-0.lib \
1053 $(GNUTLS_DIR)\bin\libgcrypt-11.lib \
1054 $(GNUTLS_DIR)\bin\libgnutls-26.lib
1055 # Nmake uses carets to escape special characters
1056 GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
1057 LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
1066 LUA_CFLAGS=/I$(LUA_DIR)\include
1067 LUA_LIBS=$(LUA_DIR)\lua5.1.lib
1068 # Nmake uses carets to escape special characters
1069 LUA_CONFIG=^#define HAVE_LUA 1
1070 LUA_VERSION=^#define HAVE_LUA_5_1 1
1077 !IFDEF PORTAUDIO_DIR
1078 # Nmake uses carets to escape special characters
1079 PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
1080 !IF "$(PORTAUDIO_VERSION)" == "18"
1081 # V18 uses API version 1 and v19 API version 2
1082 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
1083 PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
1085 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common /I$(PORTAUDIO_DIR)\src\os\win /DPA_NO_DS /DPA_NO_ASIO
1093 !IF "$(MSVC_VARIANT)" == "MSVC6"
1094 HHC_CFLAGS=/I"$(HHC_DIR)\include" -DHHC_DIR
1095 HHC_LIBS="$(HHC_DIR)\lib\htmlhelp.lib"
1097 HHC_CFLAGS=-DHHC_DIR
1098 HHC_LIBS=htmlhelp.lib
1106 SMI_CONFIG=^#define HAVE_LIBSMI 1
1107 SMI_CFLAGS=/I$(SMI_DIR)\include
1108 SMI_LIBS=$(SMI_DIR)\lib\smi.lib
1116 GEOIP_CONFIG=^#define HAVE_GEOIP 1
1117 GEOIP_CFLAGS=/I$(GEOIP_DIR)\libGeoIP
1118 GEOIP_LIBS=$(GEOIP_DIR)\libGeoIP\GeoIP.lib
1125 !IFDEF ENABLE_LIBWIRESHARK
1126 LIBWIRESHARK_CONFIG=^#define HAVE_LIBWIRESHARKDLL 1
1127 # Link plugins with the import library of libwireshark.dll
1128 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
1130 LIBWIRESHARK_CONFIG=
1133 # Construct the path
1134 PATH=$(PATH);$(CYGWIN_PATH);$(GTK_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
1136 # We can't use a lot of IPv6 code with plain Visual C++ 6.0
1137 !IF "$(MSVC_VARIANT)" == "MSVC6" && !DEFINED(MSSDK)
1140 INET6_CONFIG=^#define INET6 1
1143 !IF "$(MSVC_VARIANT)" == "MSVC6" && !DEFINED(MSSDK)
1146 NTDDNDIS_CONFIG=^#define HAVE_NTDDNDIS_H 1