3 # Some more information about the settings in this file can be found in
4 # the file README.windows 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 SVN revision of our build. Updated by make-version.pl
18 # The current Wireshark version. Recommended: Leave unchanged.
19 # Updated by make-version.pl
23 VERSION_BUILD=$(SVN_REVISION)
25 # Local build information. Recommended: Unique string for your
26 # environment, e.g. "-JackStackBarbecue". Updated by make-version.pl
30 # The version of the wiretap library. Recommended: Leave unchanged.
31 WTAP_VERSION_MAJOR=$(VERSION_MAJOR)
32 WTAP_VERSION_MINOR=$(VERSION_MINOR)
35 ##### Directories #####
38 # Base directory, where your libraries reside, which are needed to
39 # compile the sources. This setting is used only inside this file.
40 # This can be defined in the system environment.
42 !IFNDEF WIRESHARK_LIB_DIR
43 WIRESHARK_LIB_DIR=C:\wireshark-$(WIRESHARK_TARGET_PLATFORM)-libs
47 # Base directory, where your programs reside.
48 # This setting is used only inside this file.
50 PROGRAM_FILES=$(PROGRAMFILES)
53 # Location of the "tools" directory. This affects HTML2TXT below and should
54 # be overridden by makefiles in any subdirectories that use HTML2TXT.
60 # Machine type for the compiler and linker
61 # TARGET_MACHINE (Used for link /MACHINE) should be one of "X86" or "X64"
62 # (sorry ARM, Alpha, MIPS, and Itanium fans).
63 # CPU (Used by win32.mak) should be one of "i386" or "AMD64".
64 # PROCESSOR_ARCHITECTURE (Used for redistributable packages and
65 # manifests) should be one of "x86" or "amd64".
66 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
69 PROCESSOR_ARCHITECTURE=x86
70 !else if "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
73 PROCESSOR_ARCHITECTURE=amd64
75 !error Your mysterious moon-man architecture "$(WIRESHARK_TARGET_PLATFORM)" frightens and confuses us.
79 ##### Microsoft Visual C / Studio Variant #####
80 # For the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
81 # Only one of the following MSVC_VARIANT settings should be used
83 # "Microsoft Visual Studio 2005"
84 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
85 #MSVC_VARIANT=MSVC2005
87 # "Microsoft Visual C++ 2005 Express Edition"
88 # needs additional Platform SDK installation
89 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
90 #MSVC_VARIANT=MSVC2005EE
92 # "Microsoft .Net Framework 2.0 SDK"
93 # needs additional Platform SDK installation
94 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
95 #MSVC_VARIANT=DOTNET20
97 # "Microsoft Visual Studio 2008"
98 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
99 #MSVC_VARIANT=MSVC2008
101 # "Microsoft Visual C++ 2008 Express Edition"
102 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
103 #MSVC_VARIANT=MSVC2008EE
105 # "Microsoft Visual Studio 2010"
106 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
107 #MSVC_VARIANT=MSVC2010
109 # "Microsoft Visual C++ 2010 Express Edition"
110 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
111 #MSVC_VARIANT=MSVC2010EE
113 # The default if we haven't set a system environment variable or
114 # uncommented an entry above.
116 MSVC_VARIANT=MSVC2008
120 # Optional: To compile some time critical code from assembler instead of C
122 # If you have the NASM compiler, set this to the NASM executable.
123 # http://nasm.sourceforge.net/
125 # If you don't have NASM, comment this line out, so that NASM
128 NASM=$(WIRESHARK_LIB_DIR)\nasm-2.09.08\nasm.exe
131 # Optional: the Python library enables scripting support.
133 # If you don't have the Python library, comment this line out, so that
134 # PYTHON_EMBED isn't defined.
136 # NOTE: The Python library must have been compiled with the same
137 # compiler (MSVC_VARIANT) as Wireshark. Known python.org Python
140 # Python version CRT (32-bit) CRT (64-bit)
147 # If you versions of Python and Visual C++ use different CRTs
150 # XXX The DLL path in epan/wspython/wspy_libws.py likely needs to
151 # be fixed before this is enabled by default.
155 # Optional: the Python interpreter is used as part of the buildsystem
157 # This will override the automatic detection below.
159 #PYTHON_DIR=C:\Python$(PYTHON_VER)
162 # If you don't have the native Python package installed, you can use
163 # the Cygwin version (not recommended)
167 # Santity check: native vs Cygwin Python options
168 !IF DEFINED(PYTHON) && DEFINED(PYTHON_DIR)
169 !ERROR PYTHON and PYTHON_DIR cannot be specified at the same time
172 # Find native Python automatically if PYTHON(_DIR) wasn't defined
173 !IF !DEFINED(PYTHON) && !DEFINED(PYTHON_DIR)
174 !IF EXIST(c:\Python27\python.exe)
176 !ELSE IF EXIST(c:\Python26\python.exe)
178 !ELSE IF EXIST(c:\Python25\python.exe)
180 !ELSE IF EXIST(c:\Python24\python.exe)
184 !IF DEFINED(PYTHON_VER)
185 PYTHON_DIR=C:\Python$(PYTHON_VER)
189 !IF DEFINED(PYTHON_DIR)
190 PYTHON="$(PYTHON_DIR)\python.exe"
191 PATH=$(PYTHON_DIR);$(PATH)
194 #### Save files as pcap-ng by default. Comment out to use pcap instead. ####
195 PCAP_NG_DEFAULT=^#define PCAP_NG_DEFAULT 1
197 ##### To Use packet editor uncomment this line ####
198 ### Warning Experimental - work in progress
199 #WANT_PACKET_EDITOR=^#define WANT_PACKET_EDITOR 1
201 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
202 ##### Win32 Libraries #####
204 # Mandatory: GLib settings
206 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
211 # Mandatory: GLib, GTK & related library settings
213 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
215 # If you want building with GTK+, set GTK_DIR to the pathname of the
216 # directory in which the "include" and "lib" directories reside.
218 GTK_DIR=$(WIRESHARK_LIB_DIR)\gtk2
219 # These macros are used by the nsis installer script and by the install target.
220 PNG_DLL=libpng14-14.dll
221 FREETYPE_DLL=freetype6.dll
222 FONTCONFIG_DLL=libfontconfig-1.dll
223 EXPAT_DLL=libexpat-1.dll
225 # This macro is used by the setup target.
226 #GTK_PKG=2.16.6-20100912
227 GTK_PKG=2.22.1-20101227
230 # Mandatory: Version numbers of GTK and pango.
232 # (MAJOR + MINOR Version number but without MICRO version number)
233 # These macros are used by the nsis installer script and by the setup target.
235 #GTK_INST_VERSION=2.16
236 GTK_INST_VERSION=2.22
239 # Optional: WinPcap developer's pack to capture network traffic.
241 # If you have the WinPcap developer's pack (at least version 3.0),
242 # set this to the directory in which the WinPcap developer's pack resides.
244 # If you don't have the WPdpack, comment this line out, so that
245 # PCAP_DIR isn't defined.
247 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
248 # This macro is used by the nsis installer script, by the u3/portable apps and by the setup target.
252 # Optional: WinPcap remote capture support and new API
253 # (pcap_open(), pcap_findalldevs_ex(), etc.)
258 # Optional: The ZLib enables unzipping of gzip compressed capture files
261 # If you have Zlib, set this to directory in which the Zlib headers
262 # and .lib file are stored.
264 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
266 # EXperimental only use zlib 1.2.5 on win32 for now
267 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib125
270 # Optional: the ADNS library enables asynchronous (nonblocking) DNS
273 # If you have GNU ADNS, set this to the directory in which the GNU ADNS
274 # .lib file is stored.
276 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
279 # If C_ARES_DIR is defined below, it will override this setting.
281 #ADNS_DIR=$(WIRESHARK_LIB_DIR)\adns-1.0-win32-05ws
284 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
287 # If you have c-ares, set this to the directory in which the c-ares
288 # .lib file is stored. Setting this will override ADNS_DIR above. You
291 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
292 # defines socklen_t, such as Windows Server 2003 PSDK.
294 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
300 # Optional: the GNUTLS library enables ssl decryption.
302 # If you have the GNUTLS library, set this to the package version.
304 # If you don't have GNUTLS, comment this line out, so that GNUTLS_PKG
307 # Platform SDK conflicts with openssl.h header
308 GNUTLS_PKG=2.10.3-1.11
311 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
313 # If you have the kerberos for windows (mit) library, set this to the
314 # directory where the kfw package is stored.
316 # If you don't have KFW, comment this line out, so that KFW_DIR
319 KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3-2-2-i386-ws-vc6
322 # Optional: the Nettle library enables ??? decryption.
324 # If you have the Nettle encryption library, set this to the
325 # directory in which the nettle package is stored.
327 # If you don't have Nettle, comment this line out, so that NETTLE_DIR
330 # NETTLE_DIR=$(WIRESHARK_LIB_DIR)\nettle-1.10
333 # Optional: the LUA library enables scripting support.
335 # If you have the LUA library, set this to the directory in which
336 # the LUA package is stored.
338 # If you don't have LUA, comment this line out, so that LUA_DIR
341 LUA_DIST=5_1_4_Win32_dll6
342 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.1.4
345 # Optional: the PORTAUDIO library enables audio output for RTP streams.
347 # If you have the PORTAUDIO library (used for rtp_player), set this to
348 # the directory in which the PORTAUDIO library is stored.
350 # If you don't have PORTAUDIO, comment this line out, so that
351 # PORTAUDIO_DIR isn't defined.
353 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
354 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
357 # Version number of PortAudio
359 #PORTAUDIO_VERSION=18
363 # Optional: AirPcap developer's pack to capture wireless network traffic
364 # incl. 802.11 management frames.
366 # If you have the AirPcap developer's pack, set this to the directory
367 # in which the AirPcap developer's pack resides.
369 # If you don't have the AirPcap developer's pack, comment this line out,
370 # so that AIRPCAP_DIR isn't defined.
372 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
375 # Optional: LIBSMI, System Management Interface
377 # Used for oid-name resolution for SNMP and other protocols
382 # Optional: GeoIP, IP address database lookups
384 # Used to map IP addresses to MaxMind GeoIP database entries
386 GEOIP_DIR=$(WIRESHARK_LIB_DIR)\GeoIP-1.4.6-win32ws\libGeoIP
389 ##### Win64 Libraries #####
391 # Mandatory: GLib settings
393 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
398 # Mandatory: GLib, GTK & related library settings
400 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
402 # If you want building with GTK+, set GTK_DIR to the pathname of the
403 # directory in which the "include" and "lib" directories reside.
405 GTK_DIR=$(WIRESHARK_LIB_DIR)\gtk2
406 # These macros are used by the nsis installer script and by the install target.
407 PNG_DLL=libpng14-14.dll
408 #TIFF_DLL=libtiff-3.dll
409 #JPEG_DLL=libjpeg-7.dll
410 FREETYPE_DLL=libfreetype-6.dll
411 FONTCONFIG_DLL=libfontconfig-1.dll
412 EXPAT_DLL=libexpat-1.dll
413 INTL_DLL=libintl-8.dll
415 # These macros are used by the setup target.
416 #GTK_PKG=2.16.6-20100912
417 GTK_PKG=2.22.1-20101229
420 # Mandatory: Version numbers of GTK and pango.
422 # (MAJOR + MINOR Version number but without MICRO version number)
423 # These macros are used by the nsis installer script and by the setup target.
425 #GTK_INST_VERSION=2.16
426 GTK_INST_VERSION=2.22
429 # Optional: WinPcap developer's pack to capture network traffic.
431 # If you have the WinPcap developer's pack (at least version 3.0),
432 # set this to the directory in which the WinPcap developer's pack resides.
434 # If you don't have the WPdpack, comment this line out, so that
435 # PCAP_DIR isn't defined.
437 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
438 # This macro is used by the nsis installer script, by the u3/portable apps and by the setup target.
442 # Optional: WinPcap remote capture support and new API
443 # (pcap_open(), pcap_findalldevs_ex(), etc.)
448 # Optional: The ZLib enables unzipping of gzip compressed capture files
451 # If you have Zlib, set this to directory in which the Zlib headers
452 # and .lib file are stored.
454 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
457 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib125
460 # Optional: the ADNS library enables asynchronous (nonblocking) DNS
463 # If you have GNU ADNS, set this to the directory in which the GNU ADNS
464 # .lib file is stored.
466 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
469 # If C_ARES_DIR is defined below, it will override this setting.
471 #ADNS_DIR=$(WIRESHARK_LIB_DIR)\adns-1.0-win32-05ws
474 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
477 # If you have c-ares, set this to the directory in which the c-ares
478 # .lib file is stored. Setting this will override ADNS_DIR above. You
481 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
482 # defines socklen_t, such as Windows Server 2003 PSDK.
484 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
490 # Optional: the GNUTLS library enables ssl decryption.
492 # If you have the GNUTLS library, set this to the package version.
494 # If you don't have GNUTLS, comment this line out, so that GNUTLS_PKG
497 # Platform SDK conflicts with openssl.h header
498 GNUTLS_PKG=2.10.3-1.7
501 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
503 # If you have the kerberos for windows (mit) library, set this to the
504 # directory where the kfw package is stored.
506 # If you don't have KFW, comment this line out, so that KFW_DIR
509 #KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3.2.2-ws1
512 # Optional: the Nettle library enables ??? decryption.
514 # If you have the Nettle encryption library, set this to the
515 # directory in which the nettle package is stored.
517 # If you don't have Nettle, comment this line out, so that NETTLE_DIR
520 # NETTLE_DIR=$(WIRESHARK_LIB_DIR)\nettle-1.10
523 # Optional: the LUA library enables scripting support.
525 # If you have the LUA library, set this to the directory in which
526 # the LUA package is stored.
528 # If you don't have LUA, comment this line out, so that LUA_DIR
531 LUA_DIST=5_1_4_Win64_dll9
532 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.1.4
535 # Optional: the PORTAUDIO library enables audio output for RTP streams.
537 # If you have the PORTAUDIO library (used for rtp_player), set this to
538 # the directory in which the PORTAUDIO library is stored.
540 # If you don't have PORTAUDIO, comment this line out, so that
541 # PORTAUDIO_DIR isn't defined.
543 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
544 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
547 # Version number of PortAudio
549 #PORTAUDIO_VERSION=18
553 # Optional: AirPcap developer's pack to capture wireless network traffic
554 # incl. 802.11 management frames.
556 # If you have the AirPcap developer's pack, set this to the directory
557 # in which the AirPcap developer's pack resides.
559 # If you don't have the AirPcap developer's pack, comment this line out,
560 # so that AIRPCAP_DIR isn't defined.
562 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
565 # Optional: LIBSMI, System Management Interface
567 # Used for oid-name resolution for SNMP and other protocols
572 # Optional: GeoIP, IP address database lookups
574 # Used to map IP addresses to MaxMind GeoIP database entries
576 GEOIP_DIR=$(WIRESHARK_LIB_DIR)\GeoIP-1.4.6-win64ws\libGeoIP
582 # Set the following mandatory commands to find the tools.
583 # The easiest way is to use the corresponding packages from cygwin.
585 # Set up the path to the cygwin binaries
586 CYGWIN_PATH=c:\cygwin\bin
588 # command for a shell (cygwin's bash package recommended)
591 # bash versions after 3.1.6 need the 'igncr' shell option to be able to
592 # process scripts in windows 'native format' (dos crlf format).
593 # The following !IF results in the option being used only if it is available
594 # since using it on bash version 3.1.6 (or earlier) is not required and
595 # will cause an error message.
596 !if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
600 SH=$(SH_PROG) $(SH_FLAGS)
603 # command for perl (cygwin's perl package recommended)
606 # command for pod2man and pod2html
607 # (part of the perl package, usually leave these unchanged)
608 POD2MAN=$(SH) pod2man
609 POD2HTML=$(SH) pod2html
611 # command for lex/flexx (cygwin's flex recommended)
614 # command for yacc/bison (cygwin's bison recommended)
617 # Commands to convert UNIX line endings to DOS/Windows
619 TEXTIFY=$(SH) $(TOOLS_DIR)/textify.sh
622 # Optional: To build the NSIS installer.
624 # If you have the NSIS package, set this to the NSIS executable.
626 # If you don't have NSIS, comment this line out, so that MAKENSIS
629 MAKENSIS="$(PROGRAM_FILES)\NSIS\makensis.exe"
632 # Optional: To build the NSIS PortableApps installer.
634 # If you have the NSIS Unicode package, set this to the NSIS Unicode executable.
636 # If you don't have NSIS Unicode, comment this line out, so that
637 # MAKENSIS_UNICODE isn't defined.
639 MAKENSIS_UNICODE="$(PROGRAM_FILES)\NSIS\Unicode\makensis.exe"
642 # Optional: To build the developers API documentation with doxygen and dot.
643 # Currently experimental, outdated and incomplete.
645 # You will have to download and install:
646 # Doxygen from: http://www.doxygen.org
647 # Graphviz from: http://www.research.att.com/sw/tools/graphviz/
649 # If you have doxygen, set this to the doxygen executable.
651 # If you don't want the developers documentation (or don't have the tools),
652 # comment this line out, so that DOXYGEN isn't defined.
654 #DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
657 # Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
659 # The required htmlhelp.h and htmlhelp.lib should be included in versions of MSVC supported by Wireshark
661 # If you don't want the online help (or don't have the tools),
662 # comment this line out, so that HHC_DIR isn't defined.
664 HHC_DIR=$(PROGRAM_FILES)/HTML Help Workshop
667 # Optional: To reduce the size of dlls and exes, which is especially useful for USB device distributions (U3, PortableApps)
669 # If you have the UPX package, set this to the upx.exe executable.
671 # UPX can be downloaded from:
672 # http://upx.sourceforge.net/
674 # If you don't have UPX, or don't want to pack exes and dlls,
675 # comment this line out, so that UPX isn't defined.
678 UPX=$(WIRESHARK_LIB_DIR)\upx303w\upx.exe
680 ##### Flags, PATHs and Miscellaneous #####
682 # Santity check: Python embedding requires a valid PYTHON_DIR
683 !IF DEFINED(PYTHON_EMBED) && !DEFINED(PYTHON_DIR)
684 !ERROR PYTHON_EMBED requires that PYTHON_DIR is defined
687 # "convert" the MSVC variant into the required MSC compiler version
688 !IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
689 MSC_VER_REQUIRED=1400
690 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
691 MSC_VER_REQUIRED=1500
692 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010" || "$(MSVC_VARIANT)" == "MSVC2010EE"
693 MSC_VER_REQUIRED=1600
695 !ERROR MSVC_VARIANT unknown
698 ## Manifest processing is not needed for VC10 (Visual Studio 2010 C)
699 ## See: http://msdn.microsoft.com/en-us/library/dd293574.aspx
700 !IF ($(MSC_VER_REQUIRED) >= 1400) && ($(MSC_VER_REQUIRED) < 1600)
701 MANIFEST_INFO_REQUIRED=1
705 # /W3 Warning level 3 (0 less - 4 most, 1 default)
706 # /Zi Create .pdb file for debugging
707 # /MD Use "multithread- and DLL-specific version" of run-time libraries
708 # msvc documentation states that /MD causes _MT and _DLL to be defined
709 # See: http://msdn.microsoft.com/en-us/library/2kzt1wy3%28v=VS.90%29.aspx
710 # /D_CRT_SECURE_NO_DEPRECATE Don't warn for "insecure" calls,
711 # see MSDN "Security Enhancements in the CRT"
712 # /D_CRT_NONSTDC_NO_DEPRECATE Don't warn for "Deprecated CRT Functions" as MSDN calls this
713 # /D_BIND_TO_CURRENT_CRT_VERSION=1 Make sure our CRT and manifest versions match
714 # (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
715 # /DWIN32_LEAN_AND_MEAN Don't include unnecessary Windows include files (see windows.h)
716 # /MANIFEST:no Don't create a SxS manifest. Makes sure our plugins don't load
717 # a second copy of the CRT.
719 ##Note: LOCAL_CFLAGS are flags used for *all* compilations
720 ## STANDARD_CFLAGS (see below) are flags used just for *Wireshark* compilations
721 !IF "$(MSVC_VARIANT)" == "MSVC2005" || \
722 "$(MSVC_VARIANT)" == "MSVC2005EE" || \
723 "$(MSVC_VARIANT)" == "DOTNET20" || \
724 "$(MSVC_VARIANT)" == "MSVC2008" || \
725 "$(MSVC_VARIANT)" == "MSVC2008EE" || \
726 "$(MSVC_VARIANT)" == "MSVC2010" || \
727 "$(MSVC_VARIANT)" == "MSVC2010EE"
728 LOCAL_CFLAGS=/Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
729 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
731 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
732 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
735 # Additional compiler warnings to be treated as "Level 3"
736 # when compiling Wireshark sources. (Selected from "level 4" warnings).
737 ## 4295: array is too small to include a terminating null character
738 WARNINGS_CFLAGS=/w34295
741 !ERROR MSVC_VARIANT unknown
744 # http://msdn.microsoft.com/en-us/library/bb385193.aspx
745 # /MP Compiles multiple source files by using multiple processes
746 # /MP[processMax] If you omit the processMax argument, the compiler retrieves the number of effective processors
747 # on your computer from the operating system, and creates a process for each processor.
749 # The following compiler options and language features that are incompatible with the /MP option:
751 # * #import preprocessor directive
757 !IF "$(MSVC_VARIANT)" == "MSVC2008" || \
758 "$(MSVC_VARIANT)" == "MSVC2008EE" || \
759 "$(MSVC_VARIANT)" == "MSVC2010" || \
760 "$(MSVC_VARIANT)" == "MSVC2010EE"
761 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /MP
764 # Optional: Static analysis. Only supported in the full-frontal MSVC editions.
765 # http://msdn.microsoft.com/en-us/library/ms182025.aspx
767 !IFDEF ENABLE_CODE_ANALYSIS
768 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /analyze:WX-
771 #STANDARD_CFLAGS are flags used for *Wireshark* compiles (not stuff like lemon, etc)
772 STANDARD_CFLAGS=-DHAVE_CONFIG_H -D_U_="" $(LOCAL_CFLAGS) $(WARNINGS_CFLAGS)
774 #Comment out the following if warnings are not to be treated as errors
775 WARNINGS_ARE_ERRORS=-WX
777 ## XXX: _MT and _DLL are defined when /MD is used so CVARSDLL is apparently unneeded
778 ##CVARSDLL=-D_MT -D_DLL
781 # /DEBUG generate debug info
782 # /PROFILE generate map file(s) for profiling
783 # /DEFAULTLIB:xxx use xxx as the standard C library
784 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
786 LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE)
788 !IFDEF MANIFEST_INFO_REQUIRED
789 DLL_LDFLAGS = /MANIFEST:no
792 # Enable Safe Exception Handler.
793 # http://msdn.microsoft.com/en-us/magazine/cc337897.aspx
794 !IF $(MSC_VER_REQUIRED) >= 1300
795 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /GS
796 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
797 LOCAL_LDFLAGS= $(LOCAL_LDFLAGS) /SafeSEH
801 # Enable ASLR. Requires VS2008 or later.
802 # http://blogs.msdn.com/b/vcblog/archive/2009/05/21/dynamicbase-and-nxcompat.aspx
803 # DEP (/NXCompat) is handled in init_process_policies() via SetProcessDEPPolicy.
805 # ASLR http://msdn.microsoft.com/en-us/library/bb384887.aspx
806 !IF $(MSC_VER_REQUIRED) >= 1500
807 LOCAL_LDFLAGS= $(LOCAL_LDFLAGS) /DYNAMICBASE /FIXED:no
810 PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
813 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
814 # XCOPY under Windows NT doesn't support the "/Y" flag. This works
816 # XXX - This apparently doesn't work for some versions of nmake:
817 # http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
818 # It looks like we'll have to call "set copycmd=/y" before we run xcopy.
822 # If you don't want to build libwireshark.dll, you should comment out the
823 # following line. (Note: for plugin support this option must stay activated)
824 ENABLE_LIBWIRESHARK=USE
827 # install (debug) directory for Wireshark (relative to your source dir)
828 INSTALL_DIR=wireshark-gtk2
832 ##### C-Runtime Redistributable #####
834 # The C-Runtime since Version 7 must be shipped together with
835 # the program installer, to avoid missing msvcr*.dll files on
836 # the target machine.
838 # The location of these files differ on the various compiler
839 # packages, the following will use the default paths depending
840 # on the package version.
842 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
843 # We're not creating portable packages and therefore don't have to worry about
844 # "deploying using xcopy"
845 VCREDIST_EXE=$(WIRESHARK_LIB_DIR)\vcredist_$(TARGET_MACHINE).exe
847 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
848 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 8\VC\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC80.CRT\*.*
850 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
851 # you need to download the redistributable package vcredist_x86.exe from Microsoft first,
852 # and copy it to the lib folder!!!
853 VCREDIST_EXE=$(WIRESHARK_LIB_DIR)\vcredist_$(TARGET_MACHINE).exe
855 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008"
856 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 9.0\VC\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC90.CRT\*.*
858 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010EE"
859 # you need to download the redistributable package vcredist_x86.exe from Microsoft first,
860 # and copy it to the lib folder!!!
861 VCREDIST_EXE=$(WIRESHARK_LIB_DIR)\vcredist_$(TARGET_MACHINE).exe
862 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010"
863 MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 10.0\VC\redist\$(TARGET_MACHINE)\Microsoft.VC100.CRT\*.*
866 !ERROR MSVC_VARIANT unknown
869 !IF DEFINED(VCREDIST_EXE) && ! EXIST("$(VCREDIST_EXE)")
870 !ERROR Can't find $(VCREDIST_EXE). Have you downloaded it from Microsoft? \
871 See the developer's guide section "C-Runtime "Redistributable" files" for details how to get it
874 ##### Advanced: Docbook/XML documentation generation #####
875 # If you want to generate the Docbook/XML based docs (User's and Developer's
876 # Guide, ...), you'll need some additional tools / libraries compared to the
877 # rest of the build process.
879 # FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\README.txt.
881 # If you don't call the Makefile.nmake in the docbook dir to generate the
882 # docs, the following settings in this section will have no effect.
884 # formatting objects processor executable
885 # Comment this out if you don't have fop installed or you don't want the docs
888 # You may want to install the FOP hyphenation patterns from
889 # http://offo.sourceforge.net/hyphenation/
894 # Additional options to fop.
898 # Comment this out if you don't have hhc.exe or you don't want the docs in
901 # Beware: hhc.exe is NOT part of the MSVC packages in HHC_DIR mentioned above,
902 # so you'll need to install the HTML Help Workshop for this.
903 HHC_EXE="$(HHC_DIR)\hhc.exe"
905 # html to text converter for text version of release notes, e.g. elinks.
906 # This could also be "lynx", or "true" if neither elinks nor lynx is installed
907 # (cygwin: lynx works, elinks not available, links and true doesn't produce output)
908 #HTML2TXT=elinks -dump -dump-width 72
909 ##HTML2TXT=links -dump -width 72 ## XXX: Fails: For links -dump requires 'url' (filename) arg.
910 #HTML2TXT=lynx -dump -width=72 -nolist -stdin
913 HTML2TXT=$(PYTHON) $(TOOLS_DIR)\html2text.py --width=72 --no-links
916 # the XSL processor (part of cygwin's libxslt package)
919 # the XML validator (part of cygwin's libxml2 package)
924 ##############################################################################
926 # You should not have to change anything below this comment.
927 # If you do, it's a deficiency in the Makefile.nmake files;
928 # either tell wireshark-dev@wireshark.org about it, including
929 # details of why you had to change it, or fix config.nmake
930 # and any Makefile.nmake files that need to be changed, and
931 # send us the patches, along with details of why the change
934 ##############################################################################
937 # The RC_VERSION should be comma-separated, not dot-separated,
938 # as per Graham Bloice's message in
940 # http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
942 # "The RC_VERSION variable in config.nmake should be comma separated.
943 # This allows the resources to be built correctly and the version
944 # number to be correctly displayed in the explorer properties dialog
945 # for the executables, and XP's tooltip, rather than 0.0.0.0."
948 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
949 RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO),$(VERSION_BUILD)
950 PRODUCT_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO).$(VERSION_BUILD)
952 WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
953 RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
956 GLIB_CFLAGS=/I$(GTK_DIR)\include\glib-$(GLIB_VERSION) \
957 /I$(GTK_DIR)\lib\glib-$(GLIB_VERSION)\include \
958 -DG_DISABLE_DEPRECATED
959 GLIB_LIBS=$(GTK_DIR)\lib\glib-$(GLIB_VERSION).lib \
960 $(GTK_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
961 $(GTK_DIR)\lib\gobject-$(GLIB_VERSION).lib
962 GTHREAD_LIBS=$(GTK_DIR)\lib\gthread-$(GLIB_VERSION).lib
965 GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-2.0 \
966 /I$(GTK_DIR)\include\gdk-pixbuf-2.0 \
967 /I$(GTK_DIR)\lib\gtk-2.0\include \
968 /I$(GTK_DIR)\include\atk-1.0 \
969 /I$(GTK_DIR)\include\cairo \
970 /I$(GTK_DIR)\include\pango-1.0 \
971 -DGTK_DISABLE_SINGLE_INCLUDES \
972 -DGTK_DISABLE_DEPRECATED \
974 GTK_LIBS=$(GTK_DIR)\lib\gtk-win32-2.0.lib \
975 $(GTK_DIR)\lib\gdk-win32-2.0.lib \
976 $(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
977 $(GTK_DIR)\lib\cairo.lib \
978 $(GTK_DIR)\lib\pango-1.0.lib \
979 $(GTK_DIR)\lib\pangocairo-1.0.lib \
982 # 2.18 was no good(Theming problem)
983 !IF "$(GTK_INST_VERSION)" == "2.24" || "$(GTK_INST_VERSION)" == "2.22" || "$(GTK_INST_VERSION)" == "2.16" || "$(GTK_INST_VERSION)" == "2.14"
996 # Pango >=1.24.5 Needs these:
997 NEED_FREETYPE_DLL=USE
998 NEED_FONTCONFIG_DLL=USE
1001 GTK_WIMP_DLLSRC_DIR=$(GTK_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\engines
1002 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\$(GTK_LIB_DIR)\engines
1003 GTK_WIMP_RCSRC_DIR=$(GTK_DIR)\share\themes\MS-Windows\gtk-2.0
1004 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
1006 !ERROR ? Unknown or invalid GTK_INST_VERSION
1011 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
1012 #AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
1018 # Nmake uses carets to escape special characters
1019 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
1021 # This requires that, if you're *building* Wireshark, you have
1022 # the most recent WinPcap's development package. If, at *run*
1023 # time, an older version of WinPcap, missing some routines,
1024 # is found, we work around that.
1026 PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
1027 PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
1028 PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
1029 PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
1030 # PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
1031 PCAP_BREAKLOOP_CONFIG=
1032 PCAP_LIST_DATALINKS_CONFIG=^#define HAVE_PCAP_LIST_DATALINKS 1
1033 PCAP_FREE_DATALINKS_CONFIG=^#define HAVE_PCAP_FREE_DATALINKS 1
1034 PCAP_SET_DATALINK_CONFIG=^#define HAVE_PCAP_SET_DATALINK 1
1035 PCAP_OPEN_DEAD_CONFIG=^#define HAVE_PCAP_OPEN_DEAD 1
1036 BPF_IMAGE_CONFIG=^#define HAVE_BPF_IMAGE 1
1038 # no WpdPack installed
1040 PCAP_FINDALLDEVS_CONFIG=
1041 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
1042 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
1043 PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG=
1044 PCAP_BREAKLOOP_CONFIG=
1045 PCAP_LIST_DATALINKS_CONFIG=
1046 PCAP_FREE_DATALINKS_CONFIG=
1047 PCAP_SET_DATALINK_CONFIG=
1048 PCAP_OPEN_DEAD_CONFIG=
1052 !IF DEFINED(PCAP_DIR) && DEFINED(PCAP_REMOTE)
1053 PCAP_HAVE_REMOTE_CONFIG=^#define HAVE_REMOTE 1
1054 PCAP_REMOTE_CONFIG=^#define HAVE_PCAP_REMOTE 1
1055 PCAP_OPEN_CONFIG=^#define HAVE_PCAP_OPEN 1
1056 PCAP_SETSAMPLING_CONFIG=^#define HAVE_PCAP_SETSAMPLING 1
1058 PCAP_HAVE_REMOTE_CONFIG=
1061 PCAP_SETSAMPLING_CONFIG=
1065 ZLIB_PATH=$(ZLIB_DIR)
1066 ZLIB_CFLAGS=/I$(ZLIB_DIR)\include
1067 ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
1068 ZLIB_DLL=$(ZLIB_DIR)\zlib1.dll
1069 # Nmake uses carets to escape special characters
1070 ZLIB_CONFIG=^#define HAVE_LIBZ 1
1080 C_ARES_DIR=$(WIRESHARK_LIB_DIR)\c-ares-$(C_ARES_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1081 C_ARES_CFLAGS=/I$(C_ARES_DIR)/include
1082 C_ARES_LIBS=$(C_ARES_DIR)\lib\libcares-2.lib
1083 C_ARES_DLL=$(C_ARES_DIR)\bin\libcares-2.dll
1084 # Nmake uses carets to escape special characters
1085 C_ARES_CONFIG=^#define HAVE_C_ARES 1
1091 ADNS_PATH=$(ADNS_DIR)\adns_win32\lib
1092 ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
1093 ADNS_LIBS=$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns\adns_dll.lib
1094 ADNS_DLL=$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns\adns_dll.dll
1095 # Nmake uses carets to escape special characters
1096 ADNS_CONFIG=^#define HAVE_GNU_ADNS 1
1105 KFW_PATH=$(KFW_DIR)\bin
1106 KFW_CFLAGS=/I$(KFW_DIR)\include
1107 KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
1108 # Nmake uses carets to escape special characters
1109 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
1117 NETTLE_CFLAGS=/I$(NETTLE_DIR)
1118 NETTLE_LIBS=$(NETTLE_DIR)\libnettle.lib
1119 # Nmake uses carets to escape special characters
1120 NETTLE_CONFIG=^#define HAVE_LIBNETTLE 1
1128 GNUTLS_DIR=$(WIRESHARK_LIB_DIR)\gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1129 GNUTLS_PATH=$(GNUTLS_DIR)
1130 # /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
1131 GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
1132 GCRYPT_LIBS = $(GNUTLS_DIR)\bin\libgcrypt-11.lib
1134 $(GNUTLS_DIR)\bin\libtasn1-3.lib \
1135 $(GNUTLS_DIR)\bin\libgpg-error-0.lib \
1137 $(GNUTLS_DIR)\bin\libgnutls-26.lib
1138 # Nmake uses carets to escape special characters
1139 GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
1140 LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
1149 LUA_CFLAGS=/I$(LUA_DIR)\include
1150 LUA_LIBS=$(LUA_DIR)\lua5.1.lib
1151 # Nmake uses carets to escape special characters
1152 LUA_CONFIG=^#define HAVE_LUA 1
1153 LUA_VERSION=^#define HAVE_LUA_5_1 1
1160 !IF DEFINED(PYTHON_EMBED)
1161 PYTHON_CFLAGS=/I$(PYTHON_DIR)\include
1162 PYTHON_LIBS=$(PYTHON_DIR)\libs\python$(PYTHON_VER).lib
1163 # Nmake uses carets to escape special characters
1164 PYTHON_CONFIG=^#define HAVE_PYTHON 1
1171 !IFDEF PORTAUDIO_DIR
1172 # Nmake uses carets to escape special characters
1173 PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
1174 !IF "$(PORTAUDIO_VERSION)" == "18"
1175 # V18 uses API version 1 and v19 API version 2
1176 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
1177 PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
1179 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common /I$(PORTAUDIO_DIR)\src\os\win /DPA_NO_DS /DPA_NO_ASIO
1187 HHC_CFLAGS=-DHHC_DIR
1188 HHC_LIBS=htmlhelp.lib
1195 SMI_DIR=$(WIRESHARK_LIB_DIR)\libsmi-$(SMI_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1196 SMI_CONFIG=^#define HAVE_LIBSMI 1
1197 SMI_CFLAGS=/I$(SMI_DIR)\include
1198 SMI_LIBS=$(SMI_DIR)\lib\libsmi-2.lib
1207 GEOIP_CONFIG=^#define HAVE_GEOIP 1
1208 GEOIP_V6_CONFIG=^#define HAVE_GEOIP_V6 1
1209 GEOIP_CFLAGS=/I$(GEOIP_DIR)
1210 GEOIP_LIBS=$(GEOIP_DIR)\GeoIP.lib
1218 !IFDEF ENABLE_LIBWIRESHARK
1219 LIBWIRESHARK_CONFIG=^#define HAVE_LIBWIRESHARKDLL 1
1220 # Link plugins with the import library of libwireshark.dll
1221 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
1223 LIBWIRESHARK_CONFIG=
1226 # Construct the path
1227 PATH=$(PATH);$(CYGWIN_PATH);$(GTK_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
1229 INET6_CONFIG=^#define INET6 1
1231 NTDDNDIS_CONFIG=^#define HAVE_NTDDNDIS_H 1