1 # Some more information about the settings in this file can be found in
2 # the file README.windows and the Developer's Guide (available online).
4 ##### Deprecation #####
5 # Support for NMake and QMake will be removed in June 2016.
6 # Uncomment the following line or pass YES_I_KNOW_ABOUT_THE_DEPRECATION=1
7 # on the command line to override.
9 #YES_I_KNOW_ABOUT_THE_DEPRECATION=1
10 !IFNDEF YES_I_KNOW_ABOUT_THE_DEPRECATION
11 !MESSAGE Nmake is being deprecated. Please consider using CMake instead.
12 !MESSAGE See https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html
14 !ERROR Set YES_I_KNOW_ABOUT_THE_DEPRECATION to disable this message.
17 ##### Program name #####
18 # Changing the name is experimental and may break the installer/uninstaller and possibly other stuff.
19 # Application data will still be under the same dir as Wireshark so preference files, profiles, and etc
20 # will be shared with a "normal" Wireshark installation.
21 # Note that support libraries need to be in PROGRAM_NAME-libs...
24 PROGRAM_NAME=Wireshark
27 ##### Target platform #####
29 # Pick up the value from the environment, VS2012 onwards sets PLATFORM via
30 # vcvarsall.bat (it appears for X64 only).
31 # For VS2010 and earlier you'll have to set the value yourself
32 !IF "$(PLATFORM)" == "x64" || "$(PLATFORM)" == "X64"
33 WIRESHARK_TARGET_PLATFORM=win64
36 # Only "win32" and "win64" are valid (for now).
37 # This can be defined in the system environment.
38 !IFNDEF WIRESHARK_TARGET_PLATFORM
39 WIRESHARK_TARGET_PLATFORM=win32
44 # The VCS's description of our build. Updated by make-version.pl
47 # The current Wireshark version. Recommended: Leave unchanged.
48 # Updated by make-version.pl
52 VERSION_BUILD=$(VCS_REVISION)
54 # Local build information. Recommended: Unique string for your
55 # environment, e.g. "-JackStackBarbecue". Updated by make-version.pl
56 # Defaults to the environment variable WIRESHARK_VERSION_EXTRA
58 VERSION_EXTRA=$(WIRESHARK_VERSION_EXTRA)
60 # Banner shown at top right of Qt welcome screen.
61 !IFDEF WIRESHARK_VERSION_FLAVOR
62 VERSION_FLAVOR=$(WIRESHARK_VERSION_FLAVOR)
64 VERSION_FLAVOR=Development Build
67 # The version of the wiretap library. Recommended: Leave unchanged.
68 WTAP_VERSION_MAJOR=$(VERSION_MAJOR)
69 WTAP_VERSION_MINOR=$(VERSION_MINOR)
72 ##### Directories #####
75 # Base directory, where your libraries reside, which are needed to
76 # compile the sources. This setting is used only inside this file.
77 # This can be defined in the system environment.
79 !IFNDEF WIRESHARK_LIB_DIR
80 !IFDEF WIRESHARK_BASE_DIR
81 WIRESHARK_LIB_DIR=$(WIRESHARK_BASE_DIR)\$(PROGRAM_NAME)-$(WIRESHARK_TARGET_PLATFORM)-libs
83 WIRESHARK_LIB_DIR=C:\$(PROGRAM_NAME)-$(WIRESHARK_TARGET_PLATFORM)-libs
88 # Base directory, where your programs reside.
89 # This setting is used only inside this file.
91 PROGRAM_FILES=$(PROGRAMFILES)
92 PROGRAM_FILES_W6432=$(PROGRAMW6432)
95 # Location of the "tools" directory. This affects the path to textify.ps1
101 # Machine type for the compiler and linker
102 # TARGET_MACHINE (Used for link /MACHINE) should be one of "X86" or "X64"
103 # (sorry ARM, Alpha, MIPS, and Itanium fans).
104 # CPU (Used by win32.mak) should be one of "i386" or "AMD64".
105 # PROCESSOR_ARCHITECTURE (Used for redistributable packages and
106 # manifests) should be one of "x86" or "amd64".
107 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
110 PROCESSOR_ARCHITECTURE=x86
111 !else if "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
114 PROCESSOR_ARCHITECTURE=amd64
116 !error Your mysterious moon-man architecture "$(WIRESHARK_TARGET_PLATFORM)" frightens and confuses us.
120 ##### Microsoft Visual C / Studio Variant #####
122 # Pick up the value from the environment, VS2012 onwards sets this via vcvarsall.bat
123 # For VS2010 and earlier you'll have to set the value yourself
124 # Assume that the lack of detection of Express editions doesn't matter
125 !IF "$(VISUALSTUDIOVERSION)" == "10.0"
126 MSVC_VARIANT=MSVC2010
127 !ELSE IF "$(VISUALSTUDIOVERSION)" == "11.0"
128 MSVC_VARIANT=MSVC2012
129 !ELSE IF "$(VISUALSTUDIOVERSION)" == "12.0"
130 MSVC_VARIANT=MSVC2013
131 !ELSE IF "$(VISUALSTUDIOVERSION)" == "14.0"
132 MSVC_VARIANT=MSVC2015
135 # For the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
136 # Only one of the following MSVC_VARIANT settings should be used
138 # "Microsoft Visual Studio 2008"
139 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
140 #MSVC_VARIANT=MSVC2008
142 # "Microsoft Visual C++ 2008 Express Edition"
143 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
144 #MSVC_VARIANT=MSVC2008EE
146 # "Microsoft Visual Studio 2010"
147 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
148 #MSVC_VARIANT=MSVC2010
150 # "Microsoft Visual C++ 2010 Express Edition"
151 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
152 #MSVC_VARIANT=MSVC2010EE
154 # "Microsoft Visual C++ 2012 Express Edition"
155 # Visual C++ 11.0, _MSC_VER 1700, msvcr110.dll
157 ## 1. win32.mak is apparently not part of the MS 2012EE install;
158 ## To build Windows Wireshark, win32.mak must be obtained [*]
159 ## and copied to a dir specified in the Windows Environment
160 ## variable 'include' (or to a dir added to the list in 'include').
161 ## Note that the 'include' environment variable is initialized
162 ## when vcvarsall.bat is called to set up the build environment.
163 ## [*]One possibility: download the Windows 7 Platform SDK and copy
164 ## win32.mak from ...\Microsoft SDKs\Windows\v7.[something]\include
165 ## See: https://ask.wireshark.org/questions/14343/setting-development-project-under-visual-studio-2012
166 ## 2. Dec 28,2012: "VS2012 Update 1" is required to use VS 2012 to build an .exe which
167 ## will run on Windows XP (as well as on later versions of Windows).
168 ## ToDo: It appears that some special setup is required to to do this.
169 ## https://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx
171 #MSVC_VARIANT=MSVC2012EE
173 # "Microsoft Visual Studio 2012"
174 # Visual C++ 11.0, _MSC_VER 1700, msvcr110.dll
175 #MSVC_VARIANT=MSVC2012
177 # "Microsoft Visual Studio 2013"
178 # Visual C++ 12.0, _MSC_VER 1800, msvcr120.dll
179 #MSVC_VARIANT=MSVC2013
181 # "Microsoft Visual Studio 2013 Express Edition"
182 # Visual C++ 12.0, _MSC_VER 1800, msvcr120.dll
184 ## 1. win32.mak is apparently not part of the MS 2013EE install;
185 ## To build Windows Wireshark, win32.mak must be obtained [*]
186 ## and copied to a dir specified in the Windows Environment
187 ## variable 'include' (or to a dir added to the list in 'include').
188 ## Note that the 'include' environment variable is initialized
189 ## when vcvarsall.bat is called to set up the build environment.
190 ## [*]One possibility: download the Windows 7 Platform SDK and copy
191 ## win32.mak from ...\Microsoft SDKs\Windows\v7.[something]\include
192 ## See: https://ask.wireshark.org/questions/14343/setting-development-project-under-visual-studio-2012
193 #MSVC_VARIANT=MSVC2013EE
195 # The default if we haven't set a system environment variable or
196 # uncommented an entry above. We default to the version recommended
197 # in the Developer's Guide, namely MSVC++ 2010 Express Edition.
199 MSVC_VARIANT=MSVC2010EE
203 # Optional: To compile some time critical code from assembler instead of C
205 # If you have the NASM compiler, set this to the NASM executable.
206 # http://nasm.sourceforge.net/
208 # If you don't have NASM, comment this line out, so that NASM
211 NASM=$(WIRESHARK_LIB_DIR)\nasm-2.09.08\nasm.exe
214 # The Python interpreter is used as part of the buildsystem
216 # This will override the automatic detection below.
218 #PYTHON_DIR=C:\Python$(PYTHON_VER)
221 # If you don't have the native Python package installed, you can use
222 # the Cygwin version (not recommended)
226 # Santity check: native vs Cygwin Python options
227 !IF DEFINED(PYTHON) && DEFINED(PYTHON_DIR)
228 !ERROR PYTHON and PYTHON_DIR cannot be specified at the same time
231 # Find native Python automatically if PYTHON(_DIR) wasn't defined
232 !IF !DEFINED(PYTHON) && !DEFINED(PYTHON_DIR)
233 !IF EXIST(c:\tools\python2\python.exe)
235 PYTHON_DIR=C:\tools\python2
236 !ELSE IF EXIST(c:\Python27\python.exe)
238 !ELSE IF EXIST(c:\Python26\python.exe)
240 !ELSE IF EXIST(c:\Python25\python.exe)
242 !ELSE IF EXIST(c:\Python24\python.exe)
246 !IF DEFINED(PYTHON_VER)
247 PYTHON_DIR=C:\Python$(PYTHON_VER)
251 !IF DEFINED(PYTHON_DIR)
252 PYTHON="$(PYTHON_DIR)\python.exe"
253 PATH=$(PYTHON_DIR);$(PATH)
256 # If all else fails, try to find it on the PATH
261 #### Save files as pcap-ng by default. Comment out to use pcap instead. ####
262 PCAP_NG_DEFAULT=^#define PCAP_NG_DEFAULT 1
264 ##### To Use packet editor uncomment this line ####
265 ### Experimental - work in progress
266 WANT_PACKET_EDITOR=^#define WANT_PACKET_EDITOR 1
268 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
269 DOWNLOAD_TAG=2016-04-07
270 ##### Win32 Libraries #####
272 # Mandatory: GLib settings
274 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
279 # Mandatory: GLib, GTK & related library settings
281 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
283 # If you want building with GTK+, set GTK_DIR to the pathname of the
284 # directory in which the "include" and "lib" directories reside.
286 # Set the name to gtk3 if you want to use gtk3
288 GTK_DIR=$(WIRESHARK_LIB_DIR)\$(GTK_NAME)
291 # These macros are used by the nsis installer script and by the install target.
292 #EXPAT_DLL=libexpat-1.dll
294 FONTCONFIG_DLL=libfontconfig-1.dll
295 FREETYPE_DLL=libfreetype-6.dll
296 INTL_DLL=libintl-8.dll
297 HARFBUZZ_DLL=libharfbuzz-0.dll
298 JASPER_DLL=libjasper-1.dll
299 JPEG_DLL=libjpeg-8.dll
300 LZMA_DLL=liblzma-5.dll
301 PIXMAN_DLL=libpixman-1-0.dll
302 PNG_DLL=libpng15-15.dll
303 SJLJ_DLL=libgcc_s_sjlj-1.dll
304 TIFF_DLL=libtiff-5.dll
305 XML_DLL=libxml2-2.dll
307 # This macro is used by the setup target.
308 !IF "$(GTK_NAME)" == "gtk2"
309 GDK_DLL=libgdk-win32-2.0-0.dll
310 GTK_DLL=libgtk-win32-2.0-0.dll
315 GDK_DLL=libgdk-3-0.dll
316 GTK_DLL=libgtk-3-0.dll
323 # Mandatory: Version numbers of GTK and pango.
325 # (MAJOR + MINOR Version number but without MICRO version number)
326 # These macros are used by the nsis installer script and by the setup target.
328 !IF "$(GTK_NAME)" == "gtk2"
329 GTK_INST_VERSION=2.24
332 #GTK_INST_VERSION=3.6
338 # This must point to a top-level Qt directory. QMake should be in
339 # $(QT5_BASE_DIR)\bin
341 # Qt's various paths are hardcoded but with care you can relocate your
342 # installation directory:
343 # http://stackoverflow.com/questions/913642/qmake-and-qt-install-prefix-how-can-i-select-a-new-location-for-qt-library
345 # NOTE> the qmake command given below returns a path with forward slashes,
346 # which will need to be changed to backslashes for things to work properly
347 #QT5_BASE_DIR=output of "qmake -query QT_INSTALL_PREFIX"
348 !IF !DEFINED(QT5_BASE_DIR)
350 !IF EXIST(C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws)
351 QT5_BASE_DIR=C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws
353 !ELSE IF EXIST(C:\Qt\Qt5.1.1\5.1.1\msvc2010)
354 QT5_BASE_DIR=C:\Qt\Qt5.1.1\5.1.1\msvc2010
355 # Qt 5.2.1 web installer default paths
356 !ELSE IF EXIST(C:\Qt\5.2.1\msvc2010)
357 QT5_BASE_DIR=C:\Qt\5.2.1\msvc2010
358 !ELSE IF EXIST(C:\Qt\5.2.1\msvc2012)
359 QT5_BASE_DIR=C:\Qt\5.2.1\msvc2012
360 !ELSE IF EXIST(C:\Qt\5.2.1\msvc2012_64)
361 QT5_BASE_DIR=C:\Qt\5.2.1\msvc2012_64
362 !ELSE IF EXIST(C:\Qt\Qt5.3.0\5.3\msvc2013)
363 QT5_BASE_DIR=C:\Qt\Qt5.3.0\5.3\msvc2013
364 !ELSE IF EXIST(C:\Qt\5.3\msvc2013)
365 QT5_BASE_DIR=C:\Qt\5.3\msvc2013
366 # Digia official, installed in $(WIRESHARK_LIB_DIR)
367 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010)
368 QT5_BASE_DIR=$(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010
373 # Recommended: WinPcap developer's pack to capture network traffic.
375 # If you have the WinPcap developer's pack (at least version 3.0),
376 # set this to the directory in which the WinPcap developer's pack resides.
378 # If you don't have the WPdpack, comment this line out, so that
379 # PCAP_DIR isn't defined.
381 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
382 # This macro is used by the NSIS installer script, PortableApps, and by the
384 WINPCAP_VERSION=4_1_3
388 # Optional: WinPcap remote capture support and new API
389 # (pcap_open(), pcap_findalldevs_ex(), etc.)
394 # Optional: The ZLib enables unzipping of gzip compressed capture files
397 # If you have Zlib, set this to directory in which the Zlib headers
398 # and .lib file are stored.
400 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
402 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib-1.2.8-ws
405 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
408 # If you have c-ares, set this to the directory in which the c-ares
409 # .lib file is stored.
411 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
412 # defines socklen_t, such as Windows Server 2003 PSDK.
414 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
420 # Optional: the GnuTLS library enables ssl decryption.
422 # If you have the GnuTLS library, set this to the package version.
424 # If you don't have GnuTLS, comment this line out, so that GNUTLS_PKG
427 # Platform SDK conflicts with openssl.h header
428 GNUTLS_PKG=3.2.15-2.7
429 GPGERROR_DLL=libgpg-error-0.dll
430 GCC_DLL=libgcc_s_sjlj-1.dll
432 # Optional: libssh library is required for sshdump and ciscodump support
434 # If you don't have libssh, comment this line out so that LIBSSH_DIR
437 LIBSSH_DIR=$(WIRESHARK_LIB_DIR)\libssh-0.7.2-win32ws
440 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
442 # If you have the kerberos for windows (mit) library, set this to the
443 # directory where the kfw package is stored.
445 # If you don't have KFW, comment this line out, so that KFW_DIR
448 KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3-2-2-i386-ws-vc6
449 COMERR_DLL=comerr32.dll
451 K5SPRT_DLL=k5sprt32.dll
453 # Optional: the LUA library enables scripting support.
455 # If you have the LUA library, set this to the directory in which
456 # the LUA package is stored.
458 # If you don't have LUA, comment this line out, so that LUA_DIR
461 !IF "$(MSVC_VARIANT)" == "MSVC2015" || "$(MSVC_VARIANT)" == "MSVC2015CE"
462 LUA_DIST=-5.2.3_Win32_dll14
463 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" || "$(MSVC_VARIANT)" == "MSVC2013EE"
464 LUA_DIST=-5.2.3_Win32_dll12
465 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" || "$(MSVC_VARIANT)" == "MSVC2012EE"
466 LUA_DIST=-5.2.3_Win32_dll11
468 LUA_DIST=-5.2.3_Win32_dll10
470 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3
473 # Optional: the PORTAUDIO library enables audio output for RTP streams.
475 # If you have the PORTAUDIO library (used for rtp_player), set this to
476 # the directory in which the PORTAUDIO library is stored.
478 # If you don't have PORTAUDIO, comment this line out, so that
479 # PORTAUDIO_DIR isn't defined.
481 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
482 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
485 # Version number of PortAudio
487 #PORTAUDIO_VERSION=18
491 # Optional: AirPcap developer's pack to capture wireless network traffic
492 # incl. 802.11 management frames.
494 # If you have the AirPcap developer's pack, set this to the directory
495 # in which the AirPcap developer's pack resides.
497 # If you don't have the AirPcap developer's pack, comment this line out,
498 # so that AIRPCAP_DIR isn't defined.
500 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
503 # Optional: LIBSMI, System Management Interface
505 # Used for oid-name resolution for SNMP and other protocols
510 # Optional: GeoIP, IP address database lookups
512 # Used to map IP addresses to MaxMind GeoIP database entries
516 # Optional: WinSparkle, software updates
518 # Used for automatic software updates
520 WINSPARKLE_PKG=0.3-44-g2c8d9d3-win32ws
523 DOWNLOAD_TAG=2016-04-07
524 ##### Win64 Libraries #####
526 # Mandatory: GLib settings
528 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
533 # Mandatory: GLib, GTK & related library settings
535 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
537 # If you want building with GTK+, set GTK_DIR to the pathname of the
538 # directory in which the "include" and "lib" directories reside.
541 # Set the name to gtk3 if you want to use gtk3 - (experimental ?)
543 GTK_DIR=$(WIRESHARK_LIB_DIR)\$(GTK_NAME)
545 # These macros are used by the nsis installer script and by the install target.
546 #EXPAT_DLL=libexpat-1.dll
548 FONTCONFIG_DLL=libfontconfig-1.dll
549 FREETYPE_DLL=libfreetype-6.dll
550 INTL_DLL=libintl-8.dll
551 HARFBUZZ_DLL=libharfbuzz-0.dll
552 JASPER_DLL=libjasper-1.dll
553 JPEG_DLL=libjpeg-8.dll
554 LZMA_DLL=liblzma-5.dll
555 PIXMAN_DLL=libpixman-1-0.dll
556 PNG_DLL=libpng16-16.dll
557 #SEH_DLL=libgcc_s_seh-1.dll
558 TIFF_DLL=libtiff-5.dll
559 XML_DLL=libxml2-2.dll
561 # These macros are used by the setup target.
562 !IF "$(GTK_NAME)" == "gtk2"
563 GDK_DLL=libgdk-win32-2.0-0.dll
564 GTK_DLL=libgtk-win32-2.0-0.dll
569 GDK_DLL=libgdk-3-0.dll
570 GTK_DLL=libgtk-3-0.dll
577 # Mandatory: Version numbers of GTK and pango.
579 # (MAJOR + MINOR Version number but without MICRO version number)
580 # These macros are used by the nsis installer script and by the setup target.
582 !IF "$(GTK_NAME)" == "gtk2"
583 #GTK_INST_VERSION=2.16
584 GTK_INST_VERSION=2.24
586 #GTK_INST_VERSION=3.4
593 # This must point to a top-level Qt directory. QMake should be in
594 # $(QT5_BASE_DIR)\bin
596 # Qt's various paths are hardcoded but with care you can relocate your
597 # installation directory:
598 # http://stackoverflow.com/questions/913642/qmake-and-qt-install-prefix-how-can-i-select-a-new-location-for-qt-library
600 #QT5_BASE_DIR=output of "qmake -query QT_INSTALL_PREFIX"
601 !IF !DEFINED(QT5_BASE_DIR)
603 !IF EXIST(C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws)
604 QT5_BASE_DIR=C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws
606 !ELSE IF EXIST(C:\Qt\Qt5.1.1\5.1.1\msvc2010)
607 QT5_BASE_DIR=C:\Qt\Qt5.1.1\5.1.1\msvc2010
608 !ELSE IF EXIST(C:\Qt\5.3\msvc2013_64)
609 QT5_BASE_DIR=C:\Qt\5.3\msvc2013_64
610 # Digia official, installed in $(WIRESHARK_LIB_DIR)
611 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010)
612 QT5_BASE_DIR=$(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010
617 # Recommended: WinPcap developer's pack to capture network traffic.
619 # If you have the WinPcap developer's pack (at least version 3.0),
620 # set this to the directory in which the WinPcap developer's pack resides.
622 # If you don't have the WPdpack, comment this line out, so that
623 # PCAP_DIR isn't defined.
625 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
626 # This macro is used by the NSIS installer script, PortableApps, and by the
628 WINPCAP_VERSION=4_1_3
632 # Optional: WinPcap remote capture support and new API
633 # (pcap_open(), pcap_findalldevs_ex(), etc.)
638 # Optional: The ZLib enables unzipping of gzip compressed capture files
641 # If you have Zlib, set this to directory in which the Zlib headers
642 # and .lib file are stored.
644 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
647 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib-1.2.8-ws
650 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
653 # If you have c-ares, set this to the directory in which the c-ares
654 # .lib file is stored.
656 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
657 # defines socklen_t, such as Windows Server 2003 PSDK.
659 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
665 # Optional: the GnuTLS library enables ssl decryption.
667 # If you have the GnuTLS library, set this to the package version.
669 # If you don't have GnuTLS, comment this line out, so that GNUTLS_PKG
672 # Platform SDK conflicts with openssl.h header
673 GNUTLS_PKG=3.2.15-2.9
674 GPGERROR_DLL=libgpg-error6-0.dll
675 GCC_DLL=libgcc_s_seh-1.dll
678 # Optional: libssh library is required for sshdump support
680 # If you don't have libssh, comment this line out so that LIBSSH_DIR
683 LIBSSH_DIR=$(WIRESHARK_LIB_DIR)\libssh-0.7.2-win64ws
686 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
688 # If you have the kerberos for windows (mit) library, set this to the
689 # directory where the kfw package is stored.
691 # If you don't have KFW, comment this line out, so that KFW_DIR
694 KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3-2-2-x64-ws
695 COMERR_DLL=comerr64.dll
697 K5SPRT_DLL=k5sprt64.dll
700 # Optional: the LUA library enables scripting support.
702 # If you have the LUA library, set this to the directory in which
703 # the LUA package is stored.
705 # If you don't have LUA, comment this line out, so that LUA_DIR
708 !IF "$(MSVC_VARIANT)" == "MSVC2015" || "$(MSVC_VARIANT)" == "MSVC2015CE"
709 LUA_DIST=-5.2.3_Win64_dll14
710 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" || "$(MSVC_VARIANT)" == "MSVC2013EE"
711 LUA_DIST=-5.2.3_Win64_dll12
712 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" || "$(MSVC_VARIANT)" == "MSVC2012EE"
713 LUA_DIST=-5.2.3_Win64_dll11
715 LUA_DIST=-5.2.3_Win64_dll10
717 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3
720 # Optional: the PORTAUDIO library enables audio output for RTP streams.
722 # If you have the PORTAUDIO library (used for rtp_player), set this to
723 # the directory in which the PORTAUDIO library is stored.
725 # If you don't have PORTAUDIO, comment this line out, so that
726 # PORTAUDIO_DIR isn't defined.
728 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
729 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
732 # Version number of PortAudio
734 #PORTAUDIO_VERSION=18
738 # Optional: AirPcap developer's pack to capture wireless network traffic
739 # incl. 802.11 management frames.
741 # If you have the AirPcap developer's pack, set this to the directory
742 # in which the AirPcap developer's pack resides.
744 # If you don't have the AirPcap developer's pack, comment this line out,
745 # so that AIRPCAP_DIR isn't defined.
747 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
750 # Optional: LIBSMI, System Management Interface
752 # Used for oid-name resolution for SNMP and other protocols
757 # Optional: GeoIP, IP address database lookups
759 # Used to map IP addresses to MaxMind GeoIP database entries
764 # Optional: WinSparkle, software updates
766 # Used for automatic software updates
768 WINSPARKLE_PKG=0.3-44-g2c8d9d3-win64ws
771 ##### win32 / win64 #####
773 !IF "$(GTK_NAME)" == "gtk2"
774 GTK_ETC_DIR=etc\gtk-2.0
775 GTK_ENGINES_DIR=lib\gtk-2.0\$(GTK_LIB_DIR)\engines
776 GTK_MODULES_DIR=lib\gtk-2.0\modules
777 GTK_THEMES_DIR=share\themes\MS-Windows\gtk-2.0
779 GTK_ETC_DIR=etc\gtk-3.0
780 GTK_SCHEMAS_DIR=\share\glib-2.0\schemas
786 # Set the following mandatory commands to find the tools.
787 # The easiest way is to use the corresponding packages from Cygwin.
789 # Set up the path to the Cygwin binaries
790 # First check whether a 32-bit Cygwin installation exists
791 # If not, check for a 64-bit Cygwin installation
792 !IF EXIST($(CYGWIN_PATH))
794 !ELSE IF EXIST(C:\cygwin\bin)
795 CYGWIN_PATH=C:\cygwin\bin
796 !ELSE IF EXIST(C:\cygwin64\bin)
797 CYGWIN_PATH=C:\cygwin64\bin
798 !ELSE IF EXIST(C:\tools\cygwin\bin)
800 CYGWIN_PATH=C:\tools\cygwin\bin
802 !ERROR Could not locate Cygwin, please set CYGWIN_PATH explicitly in config.nmake
805 # command for a shell (cygwin's bash package recommended)
808 # bash versions after 3.1.6 need the 'igncr' shell option to be able to
809 # process scripts in Windows 'native format' (dos crlf format).
810 # The following !IF results in the option being used only if it is available
811 # since using it on bash version 3.1.6 (or earlier) is not required and
812 # will cause an error message.
813 !if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
817 SH=$(SH_PROG) $(SH_FLAGS)
820 # Compatibility testing (...or should we always force version 2?)
821 #POWERSHELL=powershell -Version 2.0 -executionpolicy bypass -File
823 POWERSHELL=powershell -executionpolicy bypass -File
825 # command for perl (cygwin's perl package recommended)
828 # command for pod2man and pod2html
829 # (part of the perl package, usually leave these unchanged)
830 POD2MAN=$(SH) pod2man
831 POD2HTML=$(SH) pod2html
833 # command for sed (cygwin's sed recommended)
836 # Command for Flex. Cygwin's flex or Chocolatey's win_flex
838 # Absolute or relative paths must be Windows-style
840 #LEX=\custom\path\to\flex
842 # Find flex automatically
844 !IF DEFINED(CHOCOLATEYINSTALL) && EXIST("$(CHOCOLATEYINSTALL)\bin\win_flex.exe")
845 LEX=$(CHOCOLATEYINSTALL)\bin\win_flex
846 !ELSE IF EXIST("$(CYGWIN_PATH)\flex.exe")
847 # We add Cygwin to PATH below.
852 # Command for Bison. Cygwin's bison or Chocolatey's win_bison
854 # Absolute or relative paths must be Windows-style
856 #YACC=\custom\path\to\bison
858 # Find bison automatically
860 !IF DEFINED(CHOCOLATEYINSTALL) && EXIST("$(CHOCOLATEYINSTALL)\bin\win_bison.exe")
861 YACC=$(CHOCOLATEYINSTALL)\bin\win_bison
862 !ELSE IF EXIST("$(CYGWIN_PATH)\bison.exe")
863 # We add Cygwin to PATH below.
868 # Make our text files Windows-native
869 TEXTIFY=$(POWERSHELL) $(TOOLS_DIR)/textify.ps1
872 # Optional: Build the NSIS installer.
874 # If NSIS is installed in a standard location (under Program Files
875 # or Program Files (x86)) you shouldn't have to change anything.
877 # If NSIS is installed in a custom location uncomment the following
878 # line and adjust the path accordingly.
881 #MAKENSIS="\custom\path\to\NSIS\makensis.exe"
883 # Find NSIS automatically
884 !IF !DEFINED(MAKENSIS)
885 !IF EXIST("$(PROGRAM_FILES)\NSIS\makensis.exe")
886 MAKENSIS="$(PROGRAM_FILES)\NSIS\makensis.exe"
887 !ELSE IF EXIST("$(PROGRAM_FILES_W6432)\NSIS\makensis.exe")
888 MAKENSIS="$(PROGRAM_FILES_W6432)\NSIS\makensis.exe"
889 !ELSE IF EXIST("\Program Files (x86)\NSIS\makensis.exe")
890 MAKENSIS="\Program Files (x86)\NSIS\makensis.exe"
895 # Optional: Build the PortableApps package (WiresharkPortable).
897 # If you have the PortableApps.com Platform installed set this to the main
898 # PortableApps directory. In order to build packages you need to install
899 # "PortableApps.com Launcher" and "NSIS Portable (Unicode)" *within* the
900 # PortableApps environment.
902 # If you don't have the PortableApps.com Platform installed comment this line
905 PORTABLEAPPS_DIR="C:\PortableApps"
908 # Optional: To build the developers API documentation with doxygen and dot.
909 # Currently experimental, outdated and incomplete.
911 # You will have to download and install:
912 # Doxygen from: http://www.doxygen.org
913 # Graphviz from: http://www.research.att.com/sw/tools/graphviz/
915 # If you have doxygen, set this to the doxygen executable.
917 # If you don't want the developers documentation (or don't have the tools),
918 # comment this line out, so that DOXYGEN isn't defined.
920 #DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
923 # Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
925 # The required htmlhelp.h and htmlhelp.lib should be included in versions of MSVC supported by Wireshark
927 # If you don't want the online help (or don't have the tools),
928 # comment this line out, so that HHC_DIR isn't defined.
930 HHC_DIR=$(PROGRAM_FILES)\HTML Help Workshop
933 # Optional: To reduce the size of dlls and exes, which is especially useful for
934 # USB device distributions (PortableApps)
936 # If you have the UPX package, set this to the upx.exe executable.
938 # UPX can be downloaded from:
939 # http://upx.sourceforge.net/
941 # If you don't have UPX, or don't want to pack exes and dlls,
942 # comment this line out, so that UPX isn't defined.
945 UPX=$(WIRESHARK_LIB_DIR)\upx303w\upx.exe
947 ##### Flags, PATHs and Miscellaneous #####
949 # "convert" the MSVC variant into the required MSC compiler version
950 !IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
951 MSC_VER_REQUIRED=1400
952 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE"
953 MSC_VER_REQUIRED=1500
954 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010" || "$(MSVC_VARIANT)" == "MSVC2010EE"
955 MSC_VER_REQUIRED=1600
956 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" || "$(MSVC_VARIANT)" == "MSVC2012EE"
957 MSC_VER_REQUIRED=1700
958 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" || "$(MSVC_VARIANT)" == "MSVC2013EE"
959 MSC_VER_REQUIRED=1800
960 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2015" || "$(MSVC_VARIANT)" == "MSVC2015CE"
961 MSC_VER_REQUIRED=1900
963 !ERROR MSVC_VARIANT unknown
966 ## Manifest processing is not needed for VC10 (Visual Studio 2010 C)
967 ## See: http://msdn.microsoft.com/en-us/library/dd293574.aspx
968 !IF ($(MSC_VER_REQUIRED) >= 1400) && ($(MSC_VER_REQUIRED) < 1600)
969 MANIFEST_INFO_REQUIRED=1
972 ## VS2012 (VC11) and later: configure subsystem version
973 ## See: https://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx
974 ## (APPVER used in win32.mak to set subsystem version)
975 !IF ($(MSC_VER_REQUIRED) >= 1700)
976 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
984 # /W3 Warning level 3 (0 less - 4 most, 1 default).
985 # /Zi Create .pdb file for debugging.
986 # /MD Use "multithread- and DLL-specific version" of run-time libraries.
987 # msvc documentation states that /MD causes _MT and _DLL to be defined
988 # See: http://msdn.microsoft.com/en-us/library/2kzt1wy3%28v=VS.90%29.aspx
989 # /D_CRT_SECURE_NO_DEPRECATE Don't warn for "insecure" calls;
990 # see MSDN "Security Enhancements in the CRT".
991 # /D_CRT_NONSTDC_NO_DEPRECATE Don't warn for "Deprecated CRT Functions" as MSDN calls this.
992 # /D_BIND_TO_CURRENT_CRT_VERSION=1 Make sure our CRT and manifest versions match.
993 # (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
994 # /DWIN32_LEAN_AND_MEAN Don't include unnecessary Windows include files (see windows.h).
995 # /MANIFEST:no Don't create a SxS manifest. Makes sure our plugins don't load
996 # a second copy of the CRT.
997 # -DPSAPI_VERSION=1 Programs that must run on earlier versions of Windows as well as Windows 7 and later
998 # versions should always call this function as GetProcessMemoryInfo. To ensure correct
999 # resolution of symbols, add Psapi.lib to the TARGETLIBS macro and compile the program
1000 # with -DPSAPI_VERSION=1.To use run-time dynamic linking, load Psapi.dll.
1001 # http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
1002 # -DBUILD_WINDOWS Starting from VS2013, GetVersionEx is deprecated and we are recommended to use
1003 # VerifyVersionInfo instead
1004 # http://msdn.microsoft.com/en-us/library/windows/desktop/ms724429(v=vs.85).aspx
1005 # http://msdn.microsoft.com/en-us/library/windows/desktop/ms725491(v=vs.85).aspx
1006 # To continue to use GetVersionEx, we can define BUILD_WINDOWS
1007 # -D_ALLOW_KEYWORD_MACROS For VS2012 onwards the, C++ STL does not permit macro redefinitions of keywords
1008 # (see http://msdn.microsoft.com/en-us/library/bb531344(v=vs.110).aspx)
1009 # This definition prevents the complaint about the redefinition of inline by WinPCap
1010 # in pcap-stdinc.h when compiling CPP files, e.g. the QT UI
1011 # /O2 http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx
1012 # Specifying the /O2 compiler option is the same as using the following options:
1013 # /Ob (Inline Function Expansion), where the option parameter is 2 (/Ob2)
1014 # /Og (Global Optimizations)
1015 # /Oi (Generate Intrinsic Functions)
1016 # /Ot (Favor Fast Code)
1017 # /Oy (Frame-Pointer Omission)
1018 # /Gs (Control Stack Checking Calls))
1019 # /GF (Eliminate Duplicate Strings)
1020 # /Gy (Enable Function-Level Linking)
1021 # /Zo Output debug info allowing debuggers to display local values and trace into inline
1022 # functions. For VS2013 Update 3. Assume all VS2013 builds are at least Update 3.
1023 # See http://msdn.microsoft.com/en-us/library/dn785163.aspx
1024 # VS2015: On by default when /Zi or /Z7 used.
1032 ##Note: LOCAL_CFLAGS are flags used for *all* compilations
1033 ## STANDARD_CFLAGS (see below) are flags used just for *Wireshark* compilations
1034 !IF "$(MSVC_VARIANT)" == "MSVC2005" || \
1035 "$(MSVC_VARIANT)" == "MSVC2005EE" || \
1036 "$(MSVC_VARIANT)" == "DOTNET20" || \
1037 "$(MSVC_VARIANT)" == "MSVC2008" || \
1038 "$(MSVC_VARIANT)" == "MSVC2008EE" || \
1039 "$(MSVC_VARIANT)" == "MSVC2010" || \
1040 "$(MSVC_VARIANT)" == "MSVC2010EE" || \
1041 "$(MSVC_VARIANT)" == "MSVC2012" || \
1042 "$(MSVC_VARIANT)" == "MSVC2012EE" || \
1043 "$(MSVC_VARIANT)" == "MSVC2013" || \
1044 "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1045 "$(MSVC_VARIANT)" == "MSVC2015" || \
1046 "$(MSVC_VARIANT)" == "MSVC2015CE"
1047 LOCAL_CFLAGS=/Zi /W3 /MD $(DEBUG_CFLAGS) /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
1048 /D_CRT_SECURE_NO_DEPRECATE -DPSAPI_VERSION=1
1050 !IF "$(MSVC_VARIANT)" == "MSVC2012" || \
1051 "$(MSVC_VARIANT)" == "MSVC2012EE" || \
1052 "$(MSVC_VARIANT)" == "MSVC2013" || \
1053 "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1054 "$(MSVC_VARIANT)" == "MSVC2015" || \
1055 "$(MSVC_VARIANT)" == "MSVC2015CE"
1056 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_ALLOW_KEYWORD_MACROS
1059 !IF "$(MSVC_VARIANT)" == "MSVC2013" || \
1060 "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1061 "$(MSVC_VARIANT)" == "MSVC2015" || \
1062 "$(MSVC_VARIANT)" == "MSVC2015CE"
1063 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /DBUILD_WINDOWS /Zo
1066 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
1067 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
1070 # Additional compiler warnings to be treated as "Level 3"
1071 # when compiling Wireshark sources. (Selected from "level 4" warnings).
1072 ## 4295: array is too small to include a terminating null character
1073 ## 4189: local variable is initialized but not referenced
1074 WARNINGS_CFLAGS=/w34295 /w34189
1077 !ERROR MSVC_VARIANT unknown
1080 # http://msdn.microsoft.com/en-us/library/bb385193.aspx
1081 # /MP Compiles multiple source files by using multiple processes
1082 # /MP[processMax] If you omit the processMax argument, the compiler retrieves the number of effective processors
1083 # on your computer from the operating system, and creates a process for each processor.
1085 # The following compiler options and language features that are incompatible with the /MP option:
1087 # * #import preprocessor directive
1093 !IF "$(MSVC_VARIANT)" == "MSVC2008" || \
1094 "$(MSVC_VARIANT)" == "MSVC2008EE" || \
1095 "$(MSVC_VARIANT)" == "MSVC2010" || \
1096 "$(MSVC_VARIANT)" == "MSVC2010EE" || \
1097 "$(MSVC_VARIANT)" == "MSVC2012" || \
1098 "$(MSVC_VARIANT)" == "MSVC2012EE" || \
1099 "$(MSVC_VARIANT)" == "MSVC2013" || \
1100 "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1101 "$(MSVC_VARIANT)" == "MSVC2015" || \
1102 "$(MSVC_VARIANT)" == "MSVC2015CE"
1103 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /MP
1106 # Optional: Static analysis. Only supported in the full-frontal MSVC editions.
1107 # http://msdn.microsoft.com/en-us/library/ms182025.aspx
1109 !IFDEF ENABLE_CODE_ANALYSIS
1110 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /analyze:WX-
1113 ## Do *not* redefine LOCAL_CFLAGS below this point !!
1115 #STANDARD_CFLAGS are flags used for *Wireshark* compiles (not stuff like lemon, etc)
1116 STANDARD_CFLAGS=/DWINPCAP_VERSION=$(WINPCAP_VERSION) $(LOCAL_CFLAGS) $(WARNINGS_CFLAGS)
1118 #Comment out the following if warnings are not to be treated as errors
1119 WARNINGS_ARE_ERRORS=-WX
1122 # /DEBUG generate debug info
1123 # /PROFILE generate map file(s) for profiling
1124 # /DEFAULTLIB:xxx use xxx as the standard C library
1125 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
1126 # /RELEASE set the checksum in the header, stops debugger complaints
1128 LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE) /RELEASE
1130 !IFDEF MANIFEST_INFO_REQUIRED
1131 DLL_LDFLAGS = /MANIFEST:no
1134 # Enable Safe Exception Handler.
1135 # http://msdn.microsoft.com/en-us/magazine/cc337897.aspx
1136 !IF $(MSC_VER_REQUIRED) >= 1300
1137 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
1138 LOCAL_LDFLAGS= $(LOCAL_LDFLAGS) /SafeSEH
1142 # Enable ASLR. Requires VS2008 or later.
1143 # http://blogs.msdn.com/b/vcblog/archive/2009/05/21/dynamicbase-and-nxcompat.aspx
1144 # DEP (/NXCompat) is handled in init_process_policies() via SetProcessDEPPolicy.
1146 # ASLR http://msdn.microsoft.com/en-us/library/bb384887.aspx
1147 !IF $(MSC_VER_REQUIRED) >= 1500
1148 LOCAL_LDFLAGS= $(LOCAL_LDFLAGS) /DYNAMICBASE /FIXED:no
1151 PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
1154 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
1155 # XCOPY under Windows NT doesn't support the "/Y" flag. This works
1157 # XXX - This apparently doesn't work for some versions of nmake:
1158 # http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
1159 # It looks like we'll have to call "set copycmd=/y" before we run xcopy.
1163 # If you don't want to build libwireshark.dll, you should comment out the
1164 # following line. (Note: for plugin support this option must stay activated)
1165 ENABLE_LIBWIRESHARK=USE
1168 # install (debug) directory for Wireshark (relative to your source dir)
1169 INSTALL_DIR=wireshark-gtk2
1170 INSTALL_DIR_QT=wireshark-qt-release
1172 ##### C-Runtime Redistributable #####
1174 # The C-Runtime since Version 7 must be shipped together with
1175 # the program installer, to avoid missing msvcr*.dll files on
1176 # the target machine.
1178 # The location of these files differ on the various compiler
1179 # packages, the following will use the default paths depending
1180 # on the package version.
1183 # You can either place the redistributable in its own platform-
1184 # and compiler-specific directory or in the top-level library
1186 # Microsoft maintains a list of the latest redistributables in
1187 # KB 20197667: http://support.microsoft.com/kb/2019667
1188 !IF EXIST("$(WIRESHARK_LIB_DIR)\vcredist_$(MSVC_VARIANT)")
1189 VCREDIST_DIR=$(WIRESHARK_LIB_DIR)\vcredist_$(MSVC_VARIANT)
1191 VCREDIST_DIR=$(WIRESHARK_LIB_DIR)
1194 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
1196 # For 64-bit platforms, we don't create portable packages and therefore
1197 # don't have to worry that "Using the Visual C++ Redistributable
1198 # Package" requires that an installer be run to install that package,
1199 # so we use that method to make the C runtime available.
1201 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1203 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
1205 # For MSVC 2005 non-Express Edition, we "Install a particular Visual C++
1206 # assembly as a private assembly for the application", by copying
1207 # the contents of the Microsoft.VC80.CRT folder to the target directory.
1208 # This is done to reduce the size of the installer; it also makes
1209 # a portable version work, as the C runtime doesn't have to be
1210 # installed on the target machine.
1212 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC80.CRT\*.*
1214 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
1216 # For MSVC 2005 Express Edition, for the .NET Framework 2.0 SDK, and
1217 # for MSVC 2008 Express Edition, we "Use the Visual C++ Redistributable
1218 # Package", because they don't provide the Microsoft.VC80.CRT folder.
1220 # They also don't provide the redistributable package, so you need to
1221 # download the appropriate version of the redistributable package,
1222 # vcredist_x86.exe, vcredist_x64.exe, or vcredist_ia64.exe, from
1223 # Microsoft first, and copy it to the lib folder!!!
1225 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1227 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008"
1229 # For MSVC 2008 non-Express Edition, we "Install a particular Visual C++
1230 # assembly as a private assembly for the application", by copying
1231 # the contents of the Microsoft.VC90.CRT folder to the target directory.
1232 # This is done to reduce the size of the installer; it also makes
1233 # a portable version work, as the C runtime doesn't have to be
1234 # installed on the target machine.
1236 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC90.CRT\*.*
1238 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010EE"
1240 # For MSVC 2010 Express Edition, we "Use the Visual C++ Redistributable
1241 # Package", because it doesn't provide the Microsoft.VC80.CRT folder.
1243 # It also doesn't provide the redistributable package, so you need to
1244 # download the appropriate version of the redistributable package,
1245 # vcredist_x86.exe or vcredist_x64.exe, from Microsoft first, and copy
1246 # it to the lib folder!!!
1247 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1249 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010"
1251 # For MSVC 2010 non-Express Edition, we "Install a particular Visual C++
1252 # assembly as a private assembly for the application", by copying
1253 # the contents of the Microsoft.VC100.CRT folder to the target directory.
1254 # This is done to reduce the size of the installer; it also makes
1255 # a portable version work, as the C runtime doesn't have to be
1256 # installed on the target machine.
1258 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1259 # Redistributable Package", rather than "Installing a particular Visual
1260 # C++ assembly as a private assembly for the application", starting
1261 # with Visual Studio 2010.
1263 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC100.CRT\*.*
1264 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" || "$(MSVC_VARIANT)" == "MSVC2012EE"
1266 # EE version added as per bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9227
1268 # For MSVC 2012, we "Install a particular Visual C++
1269 # assembly as a private assembly for the application", by copying
1270 # the contents of the Microsoft.VC110.CRT folder to the target directory.
1271 # This is done to reduce the size of the installer; it also makes
1272 # a portable version work, as the C runtime doesn't have to be
1273 # installed on the target machine.
1275 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1276 # Redistributable Package", rather than "Installing a particular Visual
1277 # C++ assembly as a private assembly for the application", starting
1278 # with Visual Studio 2010.
1280 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC110.CRT\*.*
1281 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" || "$(MSVC_VARIANT)" == "MSVC2013EE"
1283 # EE version added as per bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9227
1285 # For MSVC 2013, we "Install a particular Visual C++
1286 # assembly as a private assembly for the application", by copying
1287 # the contents of the Microsoft.VC120.CRT folder to the target directory.
1288 # This is done to reduce the size of the installer; it also makes
1289 # a portable version work, as the C runtime doesn't have to be
1290 # installed on the target machine.
1292 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1293 # Redistributable Package", rather than "Installing a particular Visual
1294 # C++ assembly as a private assembly for the application", starting
1295 # with Visual Studio 2010.
1297 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC120.CRT\*.*
1298 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2015" || "$(MSVC_VARIANT)" == "MSVC2015CE"
1300 # For MSVC 2015, we "Install a particular Visual C++
1301 # assembly as a private assembly for the application", by copying
1302 # the contents of the Microsoft.VC140.CRT folder to the target directory.
1303 # This is done to reduce the size of the installer; it also makes
1304 # a portable version work, as the C runtime doesn't have to be
1305 # installed on the target machine.
1307 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1308 # Redistributable Package", rather than "Installing a particular Visual
1309 # C++ assembly as a private assembly for the application", starting
1310 # with Visual Studio 2010.
1312 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC140.CRT\*.*
1314 !ERROR MSVC_VARIANT unknown
1317 # This is still optional yet we define it above for all users.
1318 # So, don't check if it exists...
1319 #!IF DEFINED(VCREDIST_EXE) && ! EXIST("$(VCREDIST_EXE)")
1320 #!ERROR Can't find $(VCREDIST_EXE). Have you downloaded it from Microsoft? \
1321 #See the developer's guide section "C-Runtime "Redistributable" files" for details how to get it
1324 ##### Advanced: Docbook/XML documentation generation #####
1325 # If you want to generate the Docbook/XML based docs (User's and Developer's
1326 # Guide, ...), you'll need some additional tools / libraries compared to the
1327 # rest of the build process.
1329 # FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\README.txt.
1331 # If you don't call the Makefile.nmake in the docbook dir to generate the
1332 # docs, the following settings in this section will have no effect.
1334 # formatting objects processor executable
1335 # Comment this out if you don't have fop installed or you don't want the docs
1338 # You may want to install the FOP hyphenation patterns from
1339 # http://offo.sourceforge.net/hyphenation/
1342 !IF EXIST(docbook\fop-1.1\fop.bat)
1344 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\fop-1.1\fop.bat)
1345 FOP=$(WIRESHARK_LIB_DIR)\fop-1.1\fop.bat
1346 !ELSE IF EXIST(docbook\fop-1.0\fop.bat)
1348 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\fop-1.0\fop.bat)
1349 FOP=$(WIRESHARK_LIB_DIR)\fop-1.0\fop.bat
1354 # Additional options to fop.
1357 # the XSL processor (part of cygwin's libxslt package)
1360 # Asciidoc converter (part of cygwin's asciidoc package). In order to build
1361 # the release notes you must have the Cygwin asciidoc and lynx packages
1366 ##############################################################################
1368 # You should not have to change anything below this comment.
1369 # If you do, it's a deficiency in the Makefile.nmake files;
1370 # either tell wireshark-dev@wireshark.org about it, including
1371 # details of why you had to change it, or fix config.nmake
1372 # and any Makefile.nmake files that need to be changed, and
1373 # send us the patches, along with details of why the change
1376 ##############################################################################
1379 # The RC_VERSION should be comma-separated, not dot-separated,
1380 # as per Graham Bloice's message in
1382 # http://www.wireshark.org/lists/ethereal-dev/200303/msg00283.html
1384 # "The RC_VERSION variable in config.nmake should be comma separated.
1385 # This allows the resources to be built correctly and the version
1386 # number to be correctly displayed in the explorer properties dialog
1387 # for the executables, and XP's tooltip, rather than 0.0.0.0."
1390 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
1391 RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO),$(VERSION_BUILD)
1392 PRODUCT_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO).$(VERSION_BUILD)
1394 WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
1395 RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
1396 FTAP_VERSION=$(FTAP_VERSION_MAJOR).$(FTAP_VERSION_MINOR).$(FTAP_VERSION_MICRO)
1397 RC_FTAP_VERSION=$(FTAP_VERSION_MAJOR),$(FTAP_VERSION_MINOR),$(FTAP_VERSION_MICRO)
1400 GLIB_CFLAGS=/I$(GTK_DIR)\include\glib-$(GLIB_VERSION) \
1401 /I$(GTK_DIR)\lib\glib-$(GLIB_VERSION)\include \
1402 -DG_DISABLE_DEPRECATED \
1403 -DG_DISABLE_SINGLE_INCLUDES
1404 GLIB_LIBS=$(GTK_DIR)\lib\glib-$(GLIB_VERSION).lib \
1405 $(GTK_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
1406 $(GTK_DIR)\lib\gobject-$(GLIB_VERSION).lib
1408 PROGRAM_NAME_GTK=$(PROGRAM_NAME)-gtk
1410 # 2.18 was no good(Theming problem)
1411 !IF "$(GTK_INST_VERSION)" == "2.24" || "$(GTK_INST_VERSION)" == "2.22" || "$(GTK_INST_VERSION)" == "2.16" || "$(GTK_INST_VERSION)" == "2.14"
1414 GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-2.0 \
1415 /I$(GTK_DIR)\include\gdk-pixbuf-2.0 \
1416 /I$(GTK_DIR)\lib\gtk-2.0\include \
1417 /I$(GTK_DIR)\include\atk-1.0 \
1418 /I$(GTK_DIR)\include\cairo \
1419 /I$(GTK_DIR)\include\pango-1.0 \
1420 -DGDK_DISABLE_DEPRECATED \
1421 -DGDK_PIXBUF_DISABLE_DEPRECATED \
1422 -DGTK_DISABLE_DEPRECATED \
1423 -DGTK_DISABLE_SINGLE_INCLUDES \
1425 GTK_LIBS=$(GTK_DIR)\lib\gtk-win32-2.0.lib \
1426 $(GTK_DIR)\lib\gdk-win32-2.0.lib \
1427 $(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
1428 $(GTK_DIR)\lib\cairo.lib \
1429 $(GTK_DIR)\lib\pango-1.0.lib \
1430 $(GTK_DIR)\lib\pangocairo-1.0.lib \
1436 NEED_HARFBUZZ_DLL=USE
1454 # Pango >=1.24.5 Needs these:
1457 NEED_FONTCONFIG_DLL=USE
1458 NEED_FREETYPE_DLL=USE
1465 !ELSEIF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1468 ## Note: If Wireshark is ever to be built with Gtk >= 3.10
1469 ## then -DGTK_DISABLE_DEPRECATED must be removed
1470 ## and -DGDK_DISABLE_DEPRECATION_WARNINGS must
1472 ## Wireshark changes to handle Gtk 3.10 deprecated features
1473 ## will not be done since Wireshark is moving to Qt.
1474 GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-3.0 \
1475 /I$(GTK_DIR)\include\gdk-pixbuf-2.0 \
1476 /I$(GTK_DIR)\lib\gtk-3.0\include \
1477 /I$(GTK_DIR)\include\atk-1.0 \
1478 /I$(GTK_DIR)\include\cairo \
1479 /I$(GTK_DIR)\include\pango-1.0 \
1480 -DGDK_DISABLE_DEPRECATED \
1481 -DGDK_PIXBUF_DISABLE_DEPRECATED \
1482 -DGTK_DISABLE_DEPRECATED \
1483 -DGTK_DISABLE_SINGLE_INCLUDES \
1485 GTK_LIBS=$(GTK_DIR)\lib\gtk-3.lib \
1486 $(GTK_DIR)\lib\gdk-3.lib \
1487 $(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
1488 $(GTK_DIR)\lib\cairo.lib \
1489 $(GTK_DIR)\lib\pango-1.0.lib \
1490 $(GTK_DIR)\lib\pangocairo-1.0.lib \
1498 NEED_CAIRO_GOBJECT_DLL=USE
1507 !IFDEF FONTCONFIG_DLL
1508 NEED_FONTCONFIG_DLL=USE
1511 NEED_FREETYPE_DLL=USE
1514 NEED_HARFBUZZ_DLL=USE
1544 !ERROR ? Unknown or invalid GTK_INST_VERSION "$(GTK_INST_VERSION)"
1549 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
1550 #AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
1553 WIRELESS_TOOLBAR_CONFIG=
1557 # Nmake uses carets to escape special characters
1558 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
1560 # This requires that, if you're *building* Wireshark, you have
1561 # the most recent WinPcap's development package. If, at *run*
1562 # time, an older version of WinPcap, missing some routines,
1563 # is found, we work around that.
1565 PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
1566 PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
1567 PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
1568 PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
1569 # PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
1570 PCAP_BREAKLOOP_CONFIG=
1571 PCAP_LIST_DATALINKS_CONFIG=^#define HAVE_PCAP_LIST_DATALINKS 1
1572 PCAP_FREE_DATALINKS_CONFIG=^#define HAVE_PCAP_FREE_DATALINKS 1
1573 PCAP_SET_DATALINK_CONFIG=^#define HAVE_PCAP_SET_DATALINK 1
1574 PCAP_OPEN_DEAD_CONFIG=^#define HAVE_PCAP_OPEN_DEAD 1
1575 BPF_IMAGE_CONFIG=^#define HAVE_BPF_IMAGE 1
1576 PCAP_CREATE_CONFIG=^#define HAVE_PCAP_CREATE 1
1578 # no WpdPack installed
1580 PCAP_FINDALLDEVS_CONFIG=
1581 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
1582 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
1583 PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG=
1584 PCAP_BREAKLOOP_CONFIG=
1585 PCAP_LIST_DATALINKS_CONFIG=
1586 PCAP_FREE_DATALINKS_CONFIG=
1587 PCAP_SET_DATALINK_CONFIG=
1588 PCAP_OPEN_DEAD_CONFIG=
1592 !IF DEFINED(PCAP_DIR) && DEFINED(PCAP_REMOTE)
1593 PCAP_HAVE_REMOTE_CONFIG=^#define HAVE_REMOTE 1
1594 PCAP_REMOTE_CONFIG=^#define HAVE_PCAP_REMOTE 1
1595 PCAP_OPEN_CONFIG=^#define HAVE_PCAP_OPEN 1
1596 PCAP_SETSAMPLING_CONFIG=^#define HAVE_PCAP_SETSAMPLING 1
1598 PCAP_HAVE_REMOTE_CONFIG=
1601 PCAP_SETSAMPLING_CONFIG=
1605 ZLIB_PATH=$(ZLIB_DIR)
1606 ZLIB_CFLAGS=/I$(ZLIB_DIR)
1607 ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
1608 ZLIB_DLL=$(ZLIB_DIR)\zlib1.dll
1609 # Nmake uses carets to escape special characters
1610 ZLIB_CONFIG=^#define HAVE_ZLIB 1
1619 C_ARES_DIR=$(WIRESHARK_LIB_DIR)\c-ares-$(C_ARES_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1620 C_ARES_CFLAGS=/I$(C_ARES_DIR)/include
1621 C_ARES_LIBS=$(C_ARES_DIR)\lib\libcares-2.lib
1622 C_ARES_DLL=$(C_ARES_DIR)\bin\libcares-2.dll
1623 # Nmake uses carets to escape special characters
1624 C_ARES_CONFIG=^#define HAVE_C_ARES 1
1632 KFW_PATH=$(KFW_DIR)\bin
1633 KFW_CFLAGS=/I$(KFW_DIR)\include
1634 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
1635 KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
1637 KFW_LIBS=$(KFW_DIR)\lib\krb5_64.lib
1639 # Nmake uses carets to escape special characters
1640 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
1648 GNUTLS_DIR=$(WIRESHARK_LIB_DIR)\gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1649 GNUTLS_PATH=$(GNUTLS_DIR)
1650 # /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
1651 GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
1652 GCRYPT_LIBS = $(GNUTLS_DIR)\bin\libgcrypt-20.lib
1654 $(GNUTLS_DIR)\bin\libtasn1-6.lib \
1655 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
1656 $(GNUTLS_DIR)\bin\libgpg-error-0.lib \
1658 $(GNUTLS_DIR)\bin\libgpg-error6-0.lib \
1661 $(GNUTLS_DIR)\bin\libgnutls-28.lib
1662 # Nmake uses carets to escape special characters
1663 GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
1664 LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
1673 LIBSSH_CFLAGS=/I$(LIBSSH_DIR)\include
1674 LIBSSH_LIBS=$(LIBSSH_DIR)\lib\ssh.lib
1675 # Nmake uses carets to escape special characters
1676 LIBSSH_CONFIG=^#define HAVE_LIBSSH 1
1677 LIBSSH_VERSION=^#define HAVE_LIBSSH 1
1685 LUA_CFLAGS=/I$(LUA_DIR)\include
1686 LUA_LIBS=$(LUA_DIR)\lua52.lib
1687 # Nmake uses carets to escape special characters
1688 LUA_CONFIG=^#define HAVE_LUA 1
1689 LUA_VERSION=^#define HAVE_LUA 1
1696 !IFDEF PORTAUDIO_DIR
1697 # Nmake uses carets to escape special characters
1698 PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
1699 !IF "$(PORTAUDIO_VERSION)" == "18"
1700 # V18 uses API version 1 and v19 API version 2
1701 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
1702 PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
1704 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common /I$(PORTAUDIO_DIR)\src\os\win /DPA_NO_DS /DPA_NO_ASIO
1712 PATH=$(PATH);$(HHC_DIR)
1714 HHC_CFLAGS=-DHHC_DIR
1715 HHC_LIBS=htmlhelp.lib
1722 SMI_DIR=$(WIRESHARK_LIB_DIR)\libsmi-$(SMI_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1723 SMI_CONFIG=^#define HAVE_LIBSMI 1
1724 SMI_CFLAGS=/I$(SMI_DIR)\include
1725 SMI_LIBS=$(SMI_DIR)\lib\libsmi-2.lib
1729 GEOIP_DIR=$(WIRESHARK_LIB_DIR)\GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1730 GEOIP_CONFIG=^#define HAVE_GEOIP 1
1731 GEOIP_V6_CONFIG=^#define HAVE_GEOIP_V6 1
1732 GEOIP_CFLAGS=/I$(GEOIP_DIR)/include
1733 GEOIP_LIBS=$(GEOIP_DIR)\lib\libGeoIP-1.lib
1736 !IFDEF WINSPARKLE_PKG
1737 WINSPARKLE_DIR=$(WIRESHARK_LIB_DIR)\WinSparkle-$(WINSPARKLE_PKG)
1738 WINSPARKLE_CONFIG=^#define HAVE_SOFTWARE_UPDATE 1
1739 WINSPARKLE_CFLAGS=/I$(WINSPARKLE_DIR)
1740 WINSPARKLE_LIBS=$(WINSPARKLE_DIR)\WinSparkle.lib
1743 !IFDEF ENABLE_LIBWIRESHARK
1744 # Link plugins with the import library of libwireshark.dll
1745 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
1747 LIBWIRESHARK_CONFIG=
1750 # Construct the path
1751 PATH=$(PATH);$(CYGWIN_PATH);$(GTK_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH)
1753 NTDDNDIS_CONFIG=^#define HAVE_NTDDNDIS_H 1