Compile sshdump and ciscodump for Windows
[metze/wireshark/wip.git] / config.nmake
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).
3
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.
8
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
13 !MESSAGE for details.
14 !ERROR Set YES_I_KNOW_ABOUT_THE_DEPRECATION to disable this message.
15 !ENDIF
16
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...
22
23 !IFNDEF PROGRAM_NAME
24 PROGRAM_NAME=Wireshark
25 !ENDIF
26
27 ##### Target platform #####
28
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
34 !ENDIF
35
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
40 !ENDIF
41
42 ##### Versions #####
43
44 # The VCS's description of our build. Updated by make-version.pl
45 VCS_REVISION=0
46
47 # The current Wireshark version. Recommended: Leave unchanged.
48 # Updated by make-version.pl
49 VERSION_MAJOR=2
50 VERSION_MINOR=1
51 VERSION_MICRO=0
52 VERSION_BUILD=$(VCS_REVISION)
53
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
57
58 VERSION_EXTRA=$(WIRESHARK_VERSION_EXTRA)
59
60 # Banner shown at top right of Qt welcome screen.
61 !IFDEF WIRESHARK_VERSION_FLAVOR
62 VERSION_FLAVOR=$(WIRESHARK_VERSION_FLAVOR)
63 !ELSE
64 VERSION_FLAVOR=Development Build
65 !ENDIF
66
67 # The version of the wiretap library. Recommended: Leave unchanged.
68 WTAP_VERSION_MAJOR=$(VERSION_MAJOR)
69 WTAP_VERSION_MINOR=$(VERSION_MINOR)
70 WTAP_VERSION_MICRO=0
71
72 ##### Directories #####
73
74 #
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.
78 #
79 !IFNDEF WIRESHARK_LIB_DIR
80 !IFDEF WIRESHARK_BASE_DIR
81 WIRESHARK_LIB_DIR=$(WIRESHARK_BASE_DIR)\$(PROGRAM_NAME)-$(WIRESHARK_TARGET_PLATFORM)-libs
82 !ELSE
83 WIRESHARK_LIB_DIR=C:\$(PROGRAM_NAME)-$(WIRESHARK_TARGET_PLATFORM)-libs
84 !ENDIF
85 !ENDIF
86
87 #
88 # Base directory, where your programs reside.
89 # This setting is used only inside this file.
90 #
91 PROGRAM_FILES=$(PROGRAMFILES)
92 PROGRAM_FILES_W6432=$(PROGRAMW6432)
93
94 #
95 # Location of the "tools" directory. This affects the path to textify.ps1
96 !IFNDEF TOOLS_DIR
97 TOOLS_DIR=tools
98 !ENDIF
99
100 #
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"
108 TARGET_MACHINE=x86
109 CPU=i386
110 PROCESSOR_ARCHITECTURE=x86
111 !else if "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
112 TARGET_MACHINE=x64
113 CPU=AMD64
114 PROCESSOR_ARCHITECTURE=amd64
115 !else
116 !error Your mysterious moon-man architecture "$(WIRESHARK_TARGET_PLATFORM)" frightens and confuses us.
117 !endif
118
119
120 ##### Microsoft Visual C / Studio Variant #####
121
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
133 !ENDIF
134
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
137
138 # "Microsoft Visual Studio 2008"
139 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
140 #MSVC_VARIANT=MSVC2008
141
142 # "Microsoft Visual C++ 2008 Express Edition"
143 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
144 #MSVC_VARIANT=MSVC2008EE
145
146 # "Microsoft Visual Studio 2010"
147 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
148 #MSVC_VARIANT=MSVC2010
149
150 # "Microsoft Visual C++ 2010 Express Edition"
151 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
152 #MSVC_VARIANT=MSVC2010EE
153
154 # "Microsoft Visual C++ 2012 Express Edition"
155 # Visual C++ 11.0, _MSC_VER 1700, msvcr110.dll
156 ## Notes:
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
170 ##
171 #MSVC_VARIANT=MSVC2012EE
172
173 # "Microsoft Visual Studio 2012"
174 # Visual C++ 11.0, _MSC_VER 1700, msvcr110.dll
175 #MSVC_VARIANT=MSVC2012
176
177 # "Microsoft Visual Studio 2013"
178 # Visual C++ 12.0, _MSC_VER 1800, msvcr120.dll
179 #MSVC_VARIANT=MSVC2013
180
181 # "Microsoft Visual Studio 2013 Express Edition"
182 # Visual C++ 12.0, _MSC_VER 1800, msvcr120.dll
183 ##    Notes:
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
194
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.
198 !IFNDEF MSVC_VARIANT
199 MSVC_VARIANT=MSVC2010EE
200 !ENDIF
201
202 #
203 # Optional: To compile some time critical code from assembler instead of C
204 #
205 # If you have the NASM compiler, set this to the NASM executable.
206 # http://nasm.sourceforge.net/
207 #
208 # If you don't have NASM, comment this line out, so that NASM
209 # isn't defined.
210 #
211 NASM=$(WIRESHARK_LIB_DIR)\nasm-2.09.08\nasm.exe
212
213 #
214 # The Python interpreter is used as part of the buildsystem
215 #
216 # This will override the automatic detection below.
217 #PYTHON_VER=27
218 #PYTHON_DIR=C:\Python$(PYTHON_VER)
219
220 #
221 # If you don't have the native Python package installed, you can use
222 # the Cygwin version (not recommended)
223 #
224 #PYTHON=env python
225
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
229 !ENDIF
230
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)
234 # Chocolatey default
235 PYTHON_DIR=C:\tools\python2
236 !ELSE IF EXIST(c:\Python27\python.exe)
237 PYTHON_VER=27
238 !ELSE IF EXIST(c:\Python26\python.exe)
239 PYTHON_VER=26
240 !ELSE IF EXIST(c:\Python25\python.exe)
241 PYTHON_VER=25
242 !ELSE IF EXIST(c:\Python24\python.exe)
243 PYTHON_VER=24
244 !ENDIF
245
246 !IF DEFINED(PYTHON_VER)
247 PYTHON_DIR=C:\Python$(PYTHON_VER)
248 !ENDIF
249 !ENDIF
250
251 !IF DEFINED(PYTHON_DIR)
252 PYTHON="$(PYTHON_DIR)\python.exe"
253 PATH=$(PYTHON_DIR);$(PATH)
254 !ENDIF
255
256 # If all else fails, try to find it on the PATH
257 !IF !DEFINED(PYTHON)
258 PYTHON=python
259 !ENDIF
260
261 #### Save files as pcap-ng by default. Comment out to use pcap instead. ####
262 PCAP_NG_DEFAULT=^#define PCAP_NG_DEFAULT 1
263
264 ##### To Use packet editor uncomment this line ####
265 ### Experimental - work in progress
266 WANT_PACKET_EDITOR=^#define WANT_PACKET_EDITOR 1
267
268 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
269 DOWNLOAD_TAG=2016-04-07
270 ##### Win32 Libraries #####
271 #
272 # Mandatory: GLib settings
273 #
274 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
275 #
276 GLIB_VERSION=2.0
277
278 #
279 # Mandatory: GLib, GTK & related library settings
280 #
281 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
282 #
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.
285 #
286 # Set the name to gtk3 if you want to use gtk3
287 GTK_NAME=gtk2
288 GTK_DIR=$(WIRESHARK_LIB_DIR)\$(GTK_NAME)
289
290
291 # These macros are used by the nsis installer script and by the install target.
292 #EXPAT_DLL=libexpat-1.dll
293 FFI_DLL=libffi-6.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
306
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
311 #GTK_PKG=2.24.10-2.7
312 GTK_PKG=2.24.23-1.1
313 PKG_SUFIX=ws
314 !ELSE
315 GDK_DLL=libgdk-3-0.dll
316 GTK_DLL=libgtk-3-0.dll
317 PKG_SUFIX=ws
318 GTK_PKG=3.4.4-2.1
319 #GTK_PKG=3.6.1-1.1
320 !ENDIF
321
322 #
323 # Mandatory: Version numbers of GTK and pango.
324 #
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.
327 #
328 !IF "$(GTK_NAME)" == "gtk2"
329 GTK_INST_VERSION=2.24
330 !ELSE
331 GTK_INST_VERSION=3.4
332 #GTK_INST_VERSION=3.6
333 !ENDIF
334
335 #
336 # Recommended: Qt
337 #
338 # This must point to a top-level Qt directory. QMake should be in
339 # $(QT5_BASE_DIR)\bin
340 #
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
344 #
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)
349 # Wireshark custom
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
352 # Digia official
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
369 !ENDIF
370 !ENDIF
371
372 #
373 # Recommended: WinPcap developer's pack to capture network traffic.
374 #
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.
377 #
378 # If you don't have the WPdpack, comment this line out, so that
379 # PCAP_DIR isn't defined.
380 #
381 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
382 # This macro is used by the NSIS installer script, PortableApps, and by the
383 # setup target.
384 WINPCAP_VERSION=4_1_3
385 WPD_VERSION=4_1_2
386
387 #
388 # Optional: WinPcap remote capture support and new API
389 # (pcap_open(), pcap_findalldevs_ex(), etc.)
390 #
391 PCAP_REMOTE=1
392
393 #
394 # Optional: The ZLib enables unzipping of gzip compressed capture files
395 # "on the fly".
396 #
397 # If you have Zlib, set this to directory in which the Zlib headers
398 # and .lib file are stored.
399 #
400 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
401 # defined.
402 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib-1.2.8-ws
403
404 #
405 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
406 # name resolvings.
407 #
408 # If you have c-ares, set this to the directory in which the c-ares
409 # .lib file is stored.
410 #
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.
413 #
414 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
415 # isn't defined.
416 #
417 C_ARES_PKG=1.9.1-1
418
419 #
420 # Optional: the GnuTLS library enables ssl decryption.
421 #
422 # If you have the GnuTLS library, set this to the package version.
423 #
424 # If you don't have GnuTLS, comment this line out, so that GNUTLS_PKG
425 # isn't defined.
426 #
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
431
432 # Optional: libssh library is required for sshdump and ciscodump support
433 #
434 # If you don't have libssh, comment this line out so that LIBSSH_DIR
435 # isn't defined.
436 #
437 LIBSSH_DIR=$(WIRESHARK_LIB_DIR)\libssh-0.7.2-win32ws
438
439 #
440 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
441 #
442 # If you have the kerberos for windows (mit) library, set this to the
443 # directory where the kfw package is stored.
444 #
445 # If you don't have KFW, comment this line out, so that KFW_DIR
446 # isn't defined.
447 #
448 KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3-2-2-i386-ws-vc6
449 COMERR_DLL=comerr32.dll
450 KRB5_DLL=krb5_32.dll
451 K5SPRT_DLL=k5sprt32.dll
452
453 # Optional: the LUA library enables scripting support.
454 #
455 # If you have the LUA library, set this to the directory in which
456 # the LUA package is stored.
457 #
458 # If you don't have LUA, comment this line out, so that LUA_DIR
459 # isn't defined.
460 #
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
467 !ELSE
468 LUA_DIST=-5.2.3_Win32_dll10
469 !ENDIF
470 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3
471
472 #
473 # Optional: the PORTAUDIO library enables audio output for RTP streams.
474 #
475 # If you have the PORTAUDIO library (used for rtp_player), set this to
476 # the directory in which the PORTAUDIO library is stored.
477 #
478 # If you don't have PORTAUDIO, comment this line out, so that
479 # PORTAUDIO_DIR isn't defined.
480 #
481 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
482 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
483
484 #
485 # Version number of PortAudio
486 #
487 #PORTAUDIO_VERSION=18
488 PORTAUDIO_VERSION=19
489
490 #
491 # Optional: AirPcap developer's pack to capture wireless network traffic
492 # incl. 802.11 management frames.
493 #
494 # If you have the AirPcap developer's pack, set this to the directory
495 # in which the AirPcap developer's pack resides.
496 #
497 # If you don't have the AirPcap developer's pack, comment this line out,
498 # so that AIRPCAP_DIR isn't defined.
499 #
500 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
501
502 #
503 # Optional: LIBSMI, System Management Interface
504 #
505 # Used for oid-name resolution for SNMP and other protocols
506 #
507 SMI_PKG=svn-40773
508
509 #
510 # Optional: GeoIP, IP address database lookups
511 #
512 # Used to map IP addresses to MaxMind GeoIP database entries
513 GEOIP_PKG=1.6.6
514
515 #
516 # Optional: WinSparkle, software updates
517 #
518 # Used for automatic software updates
519 #
520 WINSPARKLE_PKG=0.3-44-g2c8d9d3-win32ws
521
522 !else
523 DOWNLOAD_TAG=2016-04-07
524 ##### Win64 Libraries #####
525 #
526 # Mandatory: GLib settings
527 #
528 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
529 #
530 GLIB_VERSION=2.0
531
532 #
533 # Mandatory: GLib, GTK & related library settings
534 #
535 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
536 #
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.
539 #
540 #
541 # Set the name to gtk3 if you want to use gtk3 - (experimental ?)
542 GTK_NAME=gtk2
543 GTK_DIR=$(WIRESHARK_LIB_DIR)\$(GTK_NAME)
544
545 # These macros are used by the nsis installer script and by the install target.
546 #EXPAT_DLL=libexpat-1.dll
547 FFI_DLL=libffi-6.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
560
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
565 GTK_PKG=2.24.23-3.39
566 #GTK_PKG=2.24.23-1.1
567 PKG_SUFIX=ws
568 !ELSE
569 GDK_DLL=libgdk-3-0.dll
570 GTK_DLL=libgtk-3-0.dll
571 PKG_SUFIX=ws
572 GTK_PKG=3.4.4-2.1
573 #GTK_PKG=3.6.1-1.1
574 !ENDIF
575
576 #
577 # Mandatory: Version numbers of GTK and pango.
578 #
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.
581 #
582 !IF "$(GTK_NAME)" == "gtk2"
583 #GTK_INST_VERSION=2.16
584 GTK_INST_VERSION=2.24
585 !ELSE
586 #GTK_INST_VERSION=3.4
587 GTK_INST_VERSION=3.6
588 !ENDIF
589
590 #
591 # Recommended: Qt
592 #
593 # This must point to a top-level Qt directory. QMake should be in
594 # $(QT5_BASE_DIR)\bin
595 #
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
599 #
600 #QT5_BASE_DIR=output of "qmake -query QT_INSTALL_PREFIX"
601 !IF !DEFINED(QT5_BASE_DIR)
602 # Wireshark custom
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
605 # Digia official
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
613 !ENDIF
614 !ENDIF
615
616 #
617 # Recommended: WinPcap developer's pack to capture network traffic.
618 #
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.
621 #
622 # If you don't have the WPdpack, comment this line out, so that
623 # PCAP_DIR isn't defined.
624 #
625 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
626 # This macro is used by the NSIS installer script, PortableApps, and by the
627 # setup target.
628 WINPCAP_VERSION=4_1_3
629 WPD_VERSION=4_1_2
630
631 #
632 # Optional: WinPcap remote capture support and new API
633 # (pcap_open(), pcap_findalldevs_ex(), etc.)
634 #
635 PCAP_REMOTE=1
636
637 #
638 # Optional: The ZLib enables unzipping of gzip compressed capture files
639 # "on the fly".
640 #
641 # If you have Zlib, set this to directory in which the Zlib headers
642 # and .lib file are stored.
643 #
644 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
645 # defined.
646 #
647 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib-1.2.8-ws
648
649 #
650 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
651 # name resolvings.
652 #
653 # If you have c-ares, set this to the directory in which the c-ares
654 # .lib file is stored.
655 #
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.
658 #
659 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
660 # isn't defined.
661 #
662 C_ARES_PKG=1.9.1-1
663
664 #
665 # Optional: the GnuTLS library enables ssl decryption.
666 #
667 # If you have the GnuTLS library, set this to the package version.
668 #
669 # If you don't have GnuTLS, comment this line out, so that GNUTLS_PKG
670 # isn't defined.
671 #
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
676
677 #
678 # Optional: libssh library is required for sshdump support
679 #
680 # If you don't have libssh, comment this line out so that LIBSSH_DIR
681 # isn't defined.
682 #
683 LIBSSH_DIR=$(WIRESHARK_LIB_DIR)\libssh-0.7.2-win64ws
684
685 #
686 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
687 #
688 # If you have the kerberos for windows (mit) library, set this to the
689 # directory where the kfw package is stored.
690 #
691 # If you don't have KFW, comment this line out, so that KFW_DIR
692 # isn't defined.
693 #
694 KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3-2-2-x64-ws
695 COMERR_DLL=comerr64.dll
696 KRB5_DLL=krb5_64.dll
697 K5SPRT_DLL=k5sprt64.dll
698
699 #
700 # Optional: the LUA library enables scripting support.
701 #
702 # If you have the LUA library, set this to the directory in which
703 # the LUA package is stored.
704 #
705 # If you don't have LUA, comment this line out, so that LUA_DIR
706 # isn't defined.
707 #
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
714 !ELSE
715 LUA_DIST=-5.2.3_Win64_dll10
716 !ENDIF
717 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3
718
719 #
720 # Optional: the PORTAUDIO library enables audio output for RTP streams.
721 #
722 # If you have the PORTAUDIO library (used for rtp_player), set this to
723 # the directory in which the PORTAUDIO library is stored.
724 #
725 # If you don't have PORTAUDIO, comment this line out, so that
726 # PORTAUDIO_DIR isn't defined.
727 #
728 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
729 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
730
731 #
732 # Version number of PortAudio
733 #
734 #PORTAUDIO_VERSION=18
735 PORTAUDIO_VERSION=19
736
737 #
738 # Optional: AirPcap developer's pack to capture wireless network traffic
739 # incl. 802.11 management frames.
740 #
741 # If you have the AirPcap developer's pack, set this to the directory
742 # in which the AirPcap developer's pack resides.
743 #
744 # If you don't have the AirPcap developer's pack, comment this line out,
745 # so that AIRPCAP_DIR isn't defined.
746 #
747 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
748
749 #
750 # Optional: LIBSMI, System Management Interface
751 #
752 # Used for oid-name resolution for SNMP and other protocols
753 #
754 SMI_PKG=svn-40773
755
756 #
757 # Optional: GeoIP, IP address database lookups
758 #
759 # Used to map IP addresses to MaxMind GeoIP database entries
760 #
761 GEOIP_PKG=1.6.6
762
763 #
764 # Optional: WinSparkle, software updates
765 #
766 # Used for automatic software updates
767 #
768 WINSPARKLE_PKG=0.3-44-g2c8d9d3-win64ws
769
770 !endif
771 ##### win32 / win64 #####
772
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
778 !ELSE
779 GTK_ETC_DIR=etc\gtk-3.0
780 GTK_SCHEMAS_DIR=\share\glib-2.0\schemas
781 !ENDIF
782
783
784 ##### Tools #####
785
786 # Set the following mandatory commands to find the tools.
787 # The easiest way is to use the corresponding packages from Cygwin.
788
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))
793 # Do nothing
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)
799 # Chocolatey default
800 CYGWIN_PATH=C:\tools\cygwin\bin
801 !ELSE
802 !ERROR Could not locate Cygwin, please set CYGWIN_PATH explicitly in config.nmake
803 !ENDIF
804
805 # command for a shell (cygwin's bash package recommended)
806 SH_PROG=bash
807
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
814 SH_FLAGS=-o igncr
815 !endif
816
817 SH=$(SH_PROG) $(SH_FLAGS)
818
819 # PowerShell
820 # Compatibility testing (...or should we always force version 2?)
821 #POWERSHELL=powershell -Version 2.0 -executionpolicy bypass -File
822 # Normal
823 POWERSHELL=powershell -executionpolicy bypass -File
824
825 # command for perl (cygwin's perl package recommended)
826 PERL=perl
827
828 # command for pod2man and pod2html
829 # (part of the perl package, usually leave these unchanged)
830 POD2MAN=$(SH) pod2man
831 POD2HTML=$(SH) pod2html
832
833 # command for sed (cygwin's sed recommended)
834 SED=sed
835
836 # Command for Flex. Cygwin's flex or Chocolatey's win_flex
837 # recommended.
838 # Absolute or relative paths must be Windows-style
839
840 #LEX=\custom\path\to\flex
841
842 # Find flex automatically
843 !IF !DEFINED(LEX)
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.
848 LEX=flex
849 !ENDIF
850 !ENDIF
851
852 # Command for Bison. Cygwin's bison or Chocolatey's win_bison
853 # recommended.
854 # Absolute or relative paths must be Windows-style
855
856 #YACC=\custom\path\to\bison
857
858 # Find bison automatically
859 !IF !DEFINED(YACC)
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.
864 YACC=bison
865 !ENDIF
866 !ENDIF
867
868 # Make our text files Windows-native
869 TEXTIFY=$(POWERSHELL) $(TOOLS_DIR)/textify.ps1
870
871 #
872 # Optional: Build the NSIS installer.
873 #
874 # If NSIS is installed in a standard location (under Program Files
875 # or Program Files (x86)) you shouldn't have to change anything.
876 #
877 # If NSIS is installed in a custom location uncomment the following
878 # line and adjust the path accordingly.
879 #
880
881 #MAKENSIS="\custom\path\to\NSIS\makensis.exe"
882
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"
891 !ENDIF
892 !ENDIF
893
894 #
895 # Optional: Build the PortableApps package (WiresharkPortable).
896 #
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.
901 #
902 # If you don't have the PortableApps.com Platform installed comment this line
903 # out.
904 #
905 PORTABLEAPPS_DIR="C:\PortableApps"
906
907 #
908 # Optional: To build the developers API documentation with doxygen and dot.
909 # Currently experimental, outdated and incomplete.
910 #
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/
914 #
915 # If you have doxygen, set this to the doxygen executable.
916 #
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.
919 #
920 #DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
921
922 #
923 # Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
924 #
925 # The required htmlhelp.h and htmlhelp.lib should be included in versions of MSVC supported by Wireshark
926 #
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.
929 #
930 HHC_DIR=$(PROGRAM_FILES)\HTML Help Workshop
931
932 #
933 # Optional: To reduce the size of dlls and exes, which is especially useful for
934 # USB device distributions (PortableApps)
935 #
936 # If you have the UPX package, set this to the upx.exe executable.
937 #
938 # UPX can be downloaded from:
939 #   http://upx.sourceforge.net/
940 #
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.
943 #
944
945 UPX=$(WIRESHARK_LIB_DIR)\upx303w\upx.exe
946
947 ##### Flags, PATHs and Miscellaneous #####
948
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
962 !ELSE
963 !ERROR MSVC_VARIANT unknown
964 !ENDIF
965
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
970 !ENDIF
971
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"
977 APPVER=5.01
978 !else
979 APPVER=5.02
980 !endif
981 !ENDIF
982
983 # Compiler flags:
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.
1025
1026 !IF DEFINED(DEBUG)
1027 DEBUG_CFLAGS=/Od
1028 !ELSE
1029 DEBUG_CFLAGS=/O2
1030 !ENDIF
1031
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
1049
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
1057 !ENDIF
1058
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
1064 !ENDIF
1065
1066 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
1067 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
1068 !ENDIF
1069
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
1075
1076 !ELSE
1077 !ERROR MSVC_VARIANT unknown
1078 !ENDIF
1079
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.
1084 #
1085 # The following compiler options and language features that are incompatible with the /MP option:
1086 #
1087 # * #import preprocessor directive
1088 # * /E, /EP
1089 # * /Gm
1090 # * /showIncludes
1091 # * /Yc
1092 #
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
1104 !ENDIF
1105
1106 # Optional: Static analysis. Only supported in the full-frontal MSVC editions.
1107 # http://msdn.microsoft.com/en-us/library/ms182025.aspx
1108
1109 !IFDEF ENABLE_CODE_ANALYSIS
1110 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /analyze:WX-
1111 !ENDIF
1112
1113 ## Do *not* redefine LOCAL_CFLAGS below this point !!
1114
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)
1117
1118 #Comment out the following if warnings are not to be treated as errors
1119 WARNINGS_ARE_ERRORS=-WX
1120
1121 # Linker flags:
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
1127 #
1128 LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE) /RELEASE
1129 DLL_LDFLAGS =
1130 !IFDEF MANIFEST_INFO_REQUIRED
1131 DLL_LDFLAGS = /MANIFEST:no
1132 !ENDIF
1133
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
1139 !ENDIF
1140 !ENDIF
1141
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.
1145
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
1149 !ENDIF
1150
1151 PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
1152
1153 #
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
1156 # around that bug.
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.
1160 COPYCMD=/y
1161
1162 #
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
1166
1167 #
1168 # install (debug) directory for Wireshark (relative to your source dir)
1169 INSTALL_DIR=wireshark-gtk2
1170 INSTALL_DIR_QT=wireshark-qt-release
1171
1172 ##### C-Runtime Redistributable #####
1173 #
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.
1177 #
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.
1181 #
1182
1183 # You can either place the redistributable in its own platform-
1184 # and compiler-specific directory or in the top-level library
1185 # directory.
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)
1190 !ELSE
1191 VCREDIST_DIR=$(WIRESHARK_LIB_DIR)
1192 !ENDIF
1193
1194 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
1195 #
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.
1200 #
1201 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1202
1203 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
1204 #
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.
1211 #
1212 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC80.CRT\*.*
1213
1214 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
1215 #
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.
1219 #
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!!!
1224 #
1225 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1226
1227 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008"
1228 #
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.
1235 #
1236 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC90.CRT\*.*
1237
1238 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010EE"
1239 #
1240 # For MSVC 2010 Express Edition, we "Use the Visual C++ Redistributable
1241 # Package", because it doesn't provide the Microsoft.VC80.CRT folder.
1242 #
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
1248
1249 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010"
1250 #
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.
1257 #
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.
1262 #
1263 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC100.CRT\*.*
1264 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" || "$(MSVC_VARIANT)" == "MSVC2012EE"
1265 #
1266 # EE version added as per bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9227
1267 #
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.
1274 #
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.
1279 #
1280 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC110.CRT\*.*
1281 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" || "$(MSVC_VARIANT)" == "MSVC2013EE"
1282 #
1283 # EE version added as per bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9227
1284 #
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.
1291 #
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.
1296 #
1297 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC120.CRT\*.*
1298 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2015" || "$(MSVC_VARIANT)" == "MSVC2015CE"
1299 #
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.
1306 #
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.
1311 #
1312 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC140.CRT\*.*
1313 !ELSE
1314 !ERROR MSVC_VARIANT unknown
1315 !ENDIF
1316
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
1322 #!ENDIF
1323
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.
1328 #
1329 # FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\README.txt.
1330 #
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.
1333
1334 # formatting objects processor executable
1335 # Comment this out if you don't have fop installed or you don't want the docs
1336 # in PDF format.
1337 #
1338 # You may want to install the FOP hyphenation patterns from
1339 # http://offo.sourceforge.net/hyphenation/
1340 !IFNDEF FOP
1341
1342 !IF EXIST(docbook\fop-1.1\fop.bat)
1343 FOP=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)
1347 FOP=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
1350 !ENDIF
1351
1352 !ENDIF FOP
1353
1354 # Additional options to fop.
1355 FOP_OPTS=-Xmx256m
1356
1357 # the XSL processor (part of cygwin's libxslt package)
1358 XSLTPROC="xsltproc"
1359
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
1362 # installed.
1363 A2X=a2x
1364 LYNX=lynx
1365
1366 ##############################################################################
1367 #
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
1374 # was necessary.
1375 #
1376 ##############################################################################
1377
1378 #
1379 # The RC_VERSION should be comma-separated, not dot-separated,
1380 # as per Graham Bloice's message in
1381 #
1382 #       http://www.wireshark.org/lists/ethereal-dev/200303/msg00283.html
1383 #
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."
1388 #
1389
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)
1393
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)
1398
1399 # GLib
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
1407
1408 PROGRAM_NAME_GTK=$(PROGRAM_NAME)-gtk
1409
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"
1412
1413 # GTK+
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 \
1424         -DGSEAL_ENABLE
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 \
1431         $(GLIB_LIBS)
1432
1433 GTK_LIB_DIR=2.10.0
1434
1435 !IFDEF HARFBUZZ_DLL
1436 NEED_HARFBUZZ_DLL=USE
1437 !ENDIF
1438 !IFDEF JPEG_DLL
1439 NEED_JPEG_DLL=USE
1440 !ENDIF
1441 !IFDEF PNG_DLL
1442 NEED_PNG_DLL=USE
1443 !ENDIF
1444 !IFDEF SEH_DLL
1445 NEED_SEH_DLL=USE
1446 !ENDIF
1447 !IFDEF SJLJ_DLL
1448 NEED_SJLJ_DLL=USE
1449 !ENDIF
1450 !IFDEF TIFF_DLL
1451 NEED_TIFF_DLL=USE
1452 !ENDIF
1453 NEED_CAIRO_DLL=USE
1454 # Pango >=1.24.5 Needs these:
1455 #NEED_EXPAT_DLL=USE
1456 NEED_FFI_DLL=USE
1457 NEED_FONTCONFIG_DLL=USE
1458 NEED_FREETYPE_DLL=USE
1459 NEED_JASPER_DLL=USE
1460 NEED_JPEG_DLL=USE
1461 NEED_LZMA_DLL=USE
1462 NEED_PIXMAN_DLL=USE
1463 NEED_XML_DLL=USE
1464
1465 !ELSEIF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1466
1467 # GTK+
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
1471 ##        be added below.
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 \
1484         -DGSEAL_ENABLE
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 \
1491         $(GLIB_LIBS)
1492
1493 GTK_LIB_DIR=3.4
1494
1495 !IFDEF _DLL
1496 !ENDIF
1497
1498 NEED_CAIRO_GOBJECT_DLL=USE
1499 NEED_CAIRO_DLL=USE
1500
1501 !IFDEF EXPAT_DLL
1502 NEED_EXPAT_DLL=USE
1503 !ENDIF
1504 !IFDEF FFI_DLL
1505 NEED_FFI_DLL=USE
1506 !ENDIF
1507 !IFDEF FONTCONFIG_DLL
1508 NEED_FONTCONFIG_DLL=USE
1509 !ENDIF
1510 !IFDEF FREETYPE_DLL
1511 NEED_FREETYPE_DLL=USE
1512 !ENDIF
1513 !IFDEF HARFBUZZ_DLL
1514 NEED_HARFBUZZ_DLL=USE
1515 !ENDIF
1516 !IFDEF JASPER_DLL
1517 NEED_JASPER_DLL=USE
1518 !ENDIF
1519 !IFDEF JPEG_DLL
1520 NEED_JPEG_DLL=USE
1521 !ENDIF
1522 !IFDEF LZMA_DLL
1523 NEED_LZMA_DLL=USE
1524 !ENDIF
1525 !IFDEF PIXMAN_DLL
1526 NEED_PIXMAN_DLL=USE
1527 !ENDIF
1528 !IFDEF PNG_DLL
1529 NEED_PNG_DLL=USE
1530 !ENDIF
1531 !IFDEF SEH_DLL
1532 NEED_SEH_DLL=USE
1533 !ENDIF
1534 !IFDEF SJLJ_DLL
1535 NEED_SJLJ_DLL=USE
1536 !ENDIF
1537 !IFDEF TIFF_DLL
1538 NEED_TIFF_DLL=USE
1539 !ENDIF
1540 !IFDEF XML_DLL
1541 NEED_XML_DLL=USE
1542 !ENDIF
1543 !ELSE
1544 !ERROR ? Unknown or invalid GTK_INST_VERSION "$(GTK_INST_VERSION)"
1545 !ENDIF
1546
1547
1548 !IFDEF AIRPCAP_DIR
1549 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
1550 #AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
1551 !ELSE
1552 AIRPCAP_CONFIG=
1553 WIRELESS_TOOLBAR_CONFIG=
1554 !ENDIF
1555
1556 !IFDEF PCAP_DIR
1557 # Nmake uses carets to escape special characters
1558 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
1559 #
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.
1564 #
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
1577 !ELSE
1578 # no WpdPack installed
1579 WINPCAP_CONFIG=
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=
1589 BPF_IMAGE_CONFIG=
1590 !ENDIF
1591
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
1597 !ELSE
1598 PCAP_HAVE_REMOTE_CONFIG=
1599 PCAP_REMOTE_CONFIG=
1600 PCAP_OPEN_CONFIG=
1601 PCAP_SETSAMPLING_CONFIG=
1602 !ENDIF
1603
1604 !IFDEF ZLIB_DIR
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
1611 !else
1612 ZLIB_CFLAGS=
1613 ZLIB_LIBS=
1614 ZLIB_DLL=
1615 ZLIB_CONFIG=
1616 !ENDIF
1617
1618 !IFDEF C_ARES_PKG
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
1625 !else
1626 C_ARES_CFLAGS=
1627 C_ARES_LIBS=
1628 C_ARES_CONFIG=
1629 !ENDIF # C_ARES
1630
1631 !IFDEF KFW_DIR
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
1636 !ELSE
1637 KFW_LIBS=$(KFW_DIR)\lib\krb5_64.lib
1638 !ENDIF
1639 # Nmake uses carets to escape special characters
1640 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
1641 !else
1642 KFW_CFLAGS=
1643 KFW_LIBS=
1644 KFW_CONFIG=
1645 !ENDIF
1646
1647 !IFDEF GNUTLS_PKG
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
1653 GNUTLS_LIBS=\
1654         $(GNUTLS_DIR)\bin\libtasn1-6.lib        \
1655 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
1656         $(GNUTLS_DIR)\bin\libgpg-error-0.lib    \
1657 !ELSE
1658         $(GNUTLS_DIR)\bin\libgpg-error6-0.lib   \
1659 !ENDIF
1660         $(GCRYPT_LIBS) \
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
1665 !else
1666 GNUTLS_CFLAGS=
1667 GNUTLS_LIBS=
1668 GNUTLS_CONFIG=
1669 LIBGCRYPT_CONFIG=
1670 !ENDIF
1671
1672 !IFDEF LIBSSH_DIR
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
1678 !else
1679 LIBSSH_CFLAGS=
1680 LIBSSH_LIBS=
1681 LIBSSH_CONFIG=
1682 !ENDIF
1683
1684 !IFDEF LUA_DIR
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
1690 !else
1691 LUA_CFLAGS=
1692 LUA_LIBS=
1693 LUA_CONFIG=
1694 !ENDIF
1695
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
1703 !ELSE
1704 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common /I$(PORTAUDIO_DIR)\src\os\win /DPA_NO_DS /DPA_NO_ASIO
1705 !ENDIF
1706 !ELSE
1707 PORTAUDIO_CFLAGS=
1708 PORTAUDIO_CONFIG=
1709 !ENDIF
1710
1711 !IFDEF HHC_DIR
1712 PATH=$(PATH);$(HHC_DIR)
1713 HHC_EXE=hhc.exe
1714 HHC_CFLAGS=-DHHC_DIR
1715 HHC_LIBS=htmlhelp.lib
1716 !ELSE
1717 HHC_CFLAGS=
1718 HHC_LIBS=
1719 !ENDIF
1720
1721 !IFDEF SMI_PKG
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
1726 !ENDIF
1727
1728 !IFDEF GEOIP_PKG
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
1734 !ENDIF
1735
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
1741 !ENDIF
1742
1743 !IFDEF ENABLE_LIBWIRESHARK
1744 # Link plugins with the import library of libwireshark.dll
1745 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
1746 !ELSE
1747 LIBWIRESHARK_CONFIG=
1748 !ENDIF
1749
1750 # Construct the path
1751 PATH=$(PATH);$(CYGWIN_PATH);$(GTK_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH)
1752
1753 NTDDNDIS_CONFIG=^#define HAVE_NTDDNDIS_H 1