packet-dcerpc: add dissect_ndr_ucarray_block()
[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 ##### Program name #####
5 # Changing the name is experimental and may break the installer/uninstaller and possibly other stuff.
6 # Application data will still be under the same dir as Wireshark so preference files, profiles, and etc
7 # will be shared with a "normal" Wireshark installation.
8 # Note that support libraries need to be in PROGRAM_NAME-libs...
9
10 !IFNDEF PROGRAM_NAME
11 PROGRAM_NAME=Wireshark
12 !ENDIF
13
14 ##### Target platform #####
15
16 # Pick up the value from the environment, VS2012 onwards sets PLATFORM via
17 # vcvarsall.bat (it appears for X64 only).
18 # For VS2010 and earlier you'll have to set the value yourself
19 !IF "$(PLATFORM)" == "x64" || "$(PLATFORM)" == "X64"
20 WIRESHARK_TARGET_PLATFORM=win64
21 !ENDIF
22
23 # Only "win32" and "win64" are valid (for now).
24 # This can be defined in the system environment.
25 !IFNDEF WIRESHARK_TARGET_PLATFORM
26 WIRESHARK_TARGET_PLATFORM=win32
27 !ENDIF
28
29 ##### Versions #####
30
31 # The VCS's description of our build. Updated by make-version.pl
32 VCS_REVISION=0
33
34 # The current Wireshark version. Recommended: Leave unchanged.
35 # Updated by make-version.pl
36 VERSION_MAJOR=2
37 VERSION_MINOR=1
38 VERSION_MICRO=0
39 VERSION_BUILD=$(VCS_REVISION)
40
41 # Local build information. Recommended: Unique string for your
42 # environment, e.g. "-JackStackBarbecue". Updated by make-version.pl
43 # Defaults to the environment variable WIRESHARK_VERSION_EXTRA
44
45 VERSION_EXTRA=$(WIRESHARK_VERSION_EXTRA)
46
47 # Banner shown at top right of Qt welcome screen.
48 !IFDEF WIRESHARK_VERSION_FLAVOR
49 VERSION_FLAVOR=$(WIRESHARK_VERSION_FLAVOR)
50 !ELSE
51 VERSION_FLAVOR=Development Build
52 !ENDIF
53
54 # The version of the wiretap library. Recommended: Leave unchanged.
55 WTAP_VERSION_MAJOR=$(VERSION_MAJOR)
56 WTAP_VERSION_MINOR=$(VERSION_MINOR)
57 WTAP_VERSION_MICRO=0
58
59 ##### Directories #####
60
61 #
62 # Base directory, where your libraries reside, which are needed to
63 # compile the sources. This setting is used only inside this file.
64 # This can be defined in the system environment.
65 #
66 !IFNDEF WIRESHARK_LIB_DIR
67 !IFDEF WIRESHARK_BASE_DIR
68 WIRESHARK_LIB_DIR=$(WIRESHARK_BASE_DIR)\$(PROGRAM_NAME)-$(WIRESHARK_TARGET_PLATFORM)-libs
69 !ELSE
70 WIRESHARK_LIB_DIR=C:\$(PROGRAM_NAME)-$(WIRESHARK_TARGET_PLATFORM)-libs
71 !ENDIF
72 !ENDIF
73
74 #
75 # Base directory, where your programs reside.
76 # This setting is used only inside this file.
77 #
78 PROGRAM_FILES=$(PROGRAMFILES)
79 PROGRAM_FILES_W6432=$(PROGRAMW6432)
80
81 #
82 # Location of the "tools" directory. This affects the path to textify.ps1
83 !IFNDEF TOOLS_DIR
84 TOOLS_DIR=tools
85 !ENDIF
86
87 #
88 # Machine type for the compiler and linker
89 # TARGET_MACHINE (Used for link /MACHINE) should be one of "X86" or "X64"
90 # (sorry ARM, Alpha, MIPS, and Itanium fans).
91 # CPU (Used by win32.mak) should be one of "i386" or "AMD64".
92 # PROCESSOR_ARCHITECTURE (Used for redistributable packages and
93 # manifests) should be one of "x86" or "amd64".
94 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
95 TARGET_MACHINE=x86
96 CPU=i386
97 PROCESSOR_ARCHITECTURE=x86
98 !else if "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
99 TARGET_MACHINE=x64
100 CPU=AMD64
101 PROCESSOR_ARCHITECTURE=amd64
102 !else
103 !error Your mysterious moon-man architecture "$(WIRESHARK_TARGET_PLATFORM)" frightens and confuses us.
104 !endif
105
106
107 ##### Microsoft Visual C / Studio Variant #####
108
109 # Pick up the value from the environment, VS2012 onwards sets this via vcvarsall.bat
110 # For VS2010 and earlier you'll have to set the value yourself
111 # Assume that the lack of detection of Express editions doesn't matter
112 !IF "$(VISUALSTUDIOVERSION)" == "10.0"
113 MSVC_VARIANT=MSVC2010
114 !ELSE IF "$(VISUALSTUDIOVERSION)" == "11.0"
115 MSVC_VARIANT=MSVC2012
116 !ELSE IF "$(VISUALSTUDIOVERSION)" == "12.0"
117 MSVC_VARIANT=MSVC2013
118 !ELSE IF "$(VISUALSTUDIOVERSION)" == "14.0"
119 MSVC_VARIANT=MSVC2015
120 !ENDIF
121
122 # For the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
123 # Only one of the following MSVC_VARIANT settings should be used
124
125 # "Microsoft Visual Studio 2008"
126 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
127 #MSVC_VARIANT=MSVC2008
128
129 # "Microsoft Visual C++ 2008 Express Edition"
130 # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
131 #MSVC_VARIANT=MSVC2008EE
132
133 # "Microsoft Visual Studio 2010"
134 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
135 #MSVC_VARIANT=MSVC2010
136
137 # "Microsoft Visual C++ 2010 Express Edition"
138 # Visual C++ 10.0, _MSC_VER 1600, msvcr100.dll
139 #MSVC_VARIANT=MSVC2010EE
140
141 # "Microsoft Visual C++ 2012 Express Edition"
142 # Visual C++ 11.0, _MSC_VER 1700, msvcr110.dll
143 ## Notes:
144 ##    1.  win32.mak is apparently not part of the MS 2012EE install;
145 ##        To build Windows Wireshark, win32.mak must be obtained [*]
146 ##        and copied to a dir specified in the Windows Environment
147 ##        variable 'include' (or to a dir added to the list in 'include').
148 ##        Note that the 'include' environment variable is initialized
149 ##         when vcvarsall.bat is called to set up the build environment.
150 ##        [*]One possibility: download the Windows 7 Platform SDK and copy
151 ##         win32.mak from ...\Microsoft SDKs\Windows\v7.[something]\include
152 ##         See: https://ask.wireshark.org/questions/14343/setting-development-project-under-visual-studio-2012
153 ##    2. Dec 28,2012: "VS2012 Update 1" is required to use VS 2012 to build an .exe which
154 ##        will run on Windows XP (as well as on later versions of Windows).
155 ##        ToDo: It appears that some special setup is required to to do this.
156 ##          https://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx
157 ##
158 #MSVC_VARIANT=MSVC2012EE
159
160 # "Microsoft Visual Studio 2012"
161 # Visual C++ 11.0, _MSC_VER 1700, msvcr110.dll
162 #MSVC_VARIANT=MSVC2012
163
164 # "Microsoft Visual Studio 2013"
165 # Visual C++ 12.0, _MSC_VER 1800, msvcr120.dll
166 #MSVC_VARIANT=MSVC2013
167
168 # "Microsoft Visual Studio 2013 Express Edition"
169 # Visual C++ 12.0, _MSC_VER 1800, msvcr120.dll
170 ##    Notes:
171 ##    1.  win32.mak is apparently not part of the MS 2013EE install;
172 ##        To build Windows Wireshark, win32.mak must be obtained [*]
173 ##        and copied to a dir specified in the Windows Environment
174 ##        variable 'include' (or to a dir added to the list in 'include').
175 ##        Note that the 'include' environment variable is initialized
176 ##         when vcvarsall.bat is called to set up the build environment.
177 ##        [*]One possibility: download the Windows 7 Platform SDK and copy
178 ##         win32.mak from ...\Microsoft SDKs\Windows\v7.[something]\include
179 ##         See: https://ask.wireshark.org/questions/14343/setting-development-project-under-visual-studio-2012
180 #MSVC_VARIANT=MSVC2013EE
181
182 # The default if we haven't set a system environment variable or
183 # uncommented an entry above.  We default to the version recommended
184 # in the Developer's Guide, namely MSVC++ 2010 Express Edition.
185 !IFNDEF MSVC_VARIANT
186 MSVC_VARIANT=MSVC2010EE
187 !ENDIF
188
189 #
190 # Optional: To compile some time critical code from assembler instead of C
191 #
192 # If you have the NASM compiler, set this to the NASM executable.
193 # http://nasm.sourceforge.net/
194 #
195 # If you don't have NASM, comment this line out, so that NASM
196 # isn't defined.
197 #
198 NASM=$(WIRESHARK_LIB_DIR)\nasm-2.09.08\nasm.exe
199
200 #
201 # The Python interpreter is used as part of the buildsystem
202 #
203 # This will override the automatic detection below.
204 #PYTHON_VER=27
205 #PYTHON_DIR=C:\Python$(PYTHON_VER)
206
207 #
208 # If you don't have the native Python package installed, you can use
209 # the Cygwin version (not recommended)
210 #
211 #PYTHON=env python
212
213 # Santity check: native vs Cygwin Python options
214 !IF DEFINED(PYTHON) && DEFINED(PYTHON_DIR)
215 !ERROR PYTHON and PYTHON_DIR cannot be specified at the same time
216 !ENDIF
217
218 # Find native Python automatically if PYTHON(_DIR) wasn't defined
219 !IF !DEFINED(PYTHON) && !DEFINED(PYTHON_DIR)
220 !IF EXIST(c:\tools\python2\python.exe)
221 # Chocolatey default
222 PYTHON_DIR=C:\tools\python2
223 !ELSE IF EXIST(c:\Python27\python.exe)
224 PYTHON_VER=27
225 !ELSE IF EXIST(c:\Python26\python.exe)
226 PYTHON_VER=26
227 !ELSE IF EXIST(c:\Python25\python.exe)
228 PYTHON_VER=25
229 !ELSE IF EXIST(c:\Python24\python.exe)
230 PYTHON_VER=24
231 !ENDIF
232
233 !IF DEFINED(PYTHON_VER)
234 PYTHON_DIR=C:\Python$(PYTHON_VER)
235 !ENDIF
236 !ENDIF
237
238 !IF DEFINED(PYTHON_DIR)
239 PYTHON="$(PYTHON_DIR)\python.exe"
240 PATH=$(PYTHON_DIR);$(PATH)
241 !ENDIF
242
243 # If all else fails, try to find it on the PATH
244 !IF !DEFINED(PYTHON)
245 PYTHON=python
246 !ENDIF
247
248 #### Save files as pcap-ng by default. Comment out to use pcap instead. ####
249 PCAP_NG_DEFAULT=^#define PCAP_NG_DEFAULT 1
250
251 ##### To Use packet editor uncomment this line ####
252 ### Experimental - work in progress
253 WANT_PACKET_EDITOR=^#define WANT_PACKET_EDITOR 1
254
255 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
256 DOWNLOAD_TAG=2015-10-07
257 ##### Win32 Libraries #####
258 #
259 # Mandatory: GLib settings
260 #
261 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
262 #
263 GLIB_VERSION=2.0
264
265 #
266 # Mandatory: GLib, GTK & related library settings
267 #
268 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
269 #
270 # If you want building with GTK+, set GTK_DIR to the pathname of the
271 # directory in which the "include" and "lib" directories reside.
272 #
273 # Set the name to gtk3 if you want to use gtk3
274 GTK_NAME=gtk2
275 GTK_DIR=$(WIRESHARK_LIB_DIR)\$(GTK_NAME)
276
277
278 # These macros are used by the nsis installer script and by the install target.
279 #EXPAT_DLL=libexpat-1.dll
280 FFI_DLL=libffi-6.dll
281 FONTCONFIG_DLL=libfontconfig-1.dll
282 FREETYPE_DLL=libfreetype-6.dll
283 INTL_DLL=libintl-8.dll
284 HARFBUZZ_DLL=libharfbuzz-0.dll
285 JASPER_DLL=libjasper-1.dll
286 JPEG_DLL=libjpeg-8.dll
287 LZMA_DLL=liblzma-5.dll
288 PIXMAN_DLL=libpixman-1-0.dll
289 PNG_DLL=libpng15-15.dll
290 SJLJ_DLL=libgcc_s_sjlj-1.dll
291 TIFF_DLL=libtiff-5.dll
292 XML_DLL=libxml2-2.dll
293
294 # This macro is used by the setup target.
295 !IF "$(GTK_NAME)" == "gtk2"
296 GDK_DLL=libgdk-win32-2.0-0.dll
297 GTK_DLL=libgtk-win32-2.0-0.dll
298 #GTK_PKG=2.24.10-2.7
299 GTK_PKG=2.24.23-1.1
300 PKG_SUFIX=ws
301 !ELSE
302 GDK_DLL=libgdk-3-0.dll
303 GTK_DLL=libgtk-3-0.dll
304 PKG_SUFIX=ws
305 GTK_PKG=3.4.4-2.1
306 #GTK_PKG=3.6.1-1.1
307 !ENDIF
308
309 #
310 # Mandatory: Version numbers of GTK and pango.
311 #
312 # (MAJOR + MINOR Version number but without MICRO version number)
313 # These macros are used by the nsis installer script and by the setup target.
314 #
315 !IF "$(GTK_NAME)" == "gtk2"
316 GTK_INST_VERSION=2.24
317 !ELSE
318 GTK_INST_VERSION=3.4
319 #GTK_INST_VERSION=3.6
320 !ENDIF
321
322 #
323 # Recommended: Qt
324 #
325 # This must point to a top-level Qt directory. QMake should be in
326 # $(QT5_BASE_DIR)\bin
327 #
328 # Qt's various paths are hardcoded but with care you can relocate your
329 # installation directory:
330 # http://stackoverflow.com/questions/913642/qmake-and-qt-install-prefix-how-can-i-select-a-new-location-for-qt-library
331 #
332 # NOTE> the qmake command given below returns a path with forward slashes,
333 #       which will need to be changed to backslashes for things to work properly
334 #QT5_BASE_DIR=output of "qmake -query QT_INSTALL_PREFIX"
335 !IF !DEFINED(QT5_BASE_DIR)
336 # Wireshark custom
337 !IF EXIST(C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws)
338 QT5_BASE_DIR=C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws
339 # Digia official
340 !ELSE IF EXIST(C:\Qt\Qt5.1.1\5.1.1\msvc2010)
341 QT5_BASE_DIR=C:\Qt\Qt5.1.1\5.1.1\msvc2010
342 # Qt 5.2.1 web installer default paths
343 !ELSE IF EXIST(C:\Qt\5.2.1\msvc2010)
344 QT5_BASE_DIR=C:\Qt\5.2.1\msvc2010
345 !ELSE IF EXIST(C:\Qt\5.2.1\msvc2012)
346 QT5_BASE_DIR=C:\Qt\5.2.1\msvc2012
347 !ELSE IF EXIST(C:\Qt\5.2.1\msvc2012_64)
348 QT5_BASE_DIR=C:\Qt\5.2.1\msvc2012_64
349 !ELSE IF EXIST(C:\Qt\Qt5.3.0\5.3\msvc2013)
350 QT5_BASE_DIR=C:\Qt\Qt5.3.0\5.3\msvc2013
351 !ELSE IF EXIST(C:\Qt\5.3\msvc2013)
352 QT5_BASE_DIR=C:\Qt\5.3\msvc2013
353 # Digia official, installed in $(WIRESHARK_LIB_DIR)
354 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010)
355 QT5_BASE_DIR=$(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010
356 !ENDIF
357 !ENDIF
358
359 #
360 # Recommended: WinPcap developer's pack to capture network traffic.
361 #
362 # If you have the WinPcap developer's pack (at least version 3.0),
363 # set this to the directory in which the WinPcap developer's pack resides.
364 #
365 # If you don't have the WPdpack, comment this line out, so that
366 # PCAP_DIR isn't defined.
367 #
368 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
369 # This macro is used by the NSIS installer script, PortableApps, and by the
370 # setup target.
371 WINPCAP_VERSION=4_1_3
372 WPD_VERSION=4_1_2
373
374 #
375 # Optional: WinPcap remote capture support and new API
376 # (pcap_open(), pcap_findalldevs_ex(), etc.)
377 #
378 PCAP_REMOTE=1
379
380 #
381 # Optional: The ZLib enables unzipping of gzip compressed capture files
382 # "on the fly".
383 #
384 # If you have Zlib, set this to directory in which the Zlib headers
385 # and .lib file are stored.
386 #
387 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
388 # defined.
389 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib-1.2.8-ws
390
391 #
392 # Optional: the ADNS library enables asynchronous (nonblocking) DNS
393 # name resolvings.
394 #
395 # If you have GNU ADNS, set this to the directory in which the GNU ADNS
396 # .lib file is stored.
397 #
398 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
399 # isn't defined.
400 #
401 # If C_ARES_DIR is defined below, it will override this setting.
402 #
403 #ADNS_DIR=$(WIRESHARK_LIB_DIR)\adns-1.0-win32-05ws
404
405 #
406 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
407 # name resolvings.
408 #
409 # If you have c-ares, set this to the directory in which the c-ares
410 # .lib file is stored. Setting this will override ADNS_DIR above. You
411 # can't have both.
412 #
413 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
414 # defines socklen_t, such as Windows Server 2003 PSDK.
415 #
416 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
417 # isn't defined.
418 #
419 C_ARES_PKG=1.9.1-1
420
421 #
422 # Optional: the GnuTLS library enables ssl decryption.
423 #
424 # If you have the GnuTLS library, set this to the package version.
425 #
426 # If you don't have GnuTLS, comment this line out, so that GNUTLS_PKG
427 # isn't defined.
428 #
429 # Platform SDK conflicts with openssl.h header
430 GNUTLS_PKG=3.2.15-2.7
431 GPGERROR_DLL=libgpg-error-0.dll
432 GCC_DLL=libgcc_s_sjlj-1.dll
433
434 #
435 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
436 #
437 # If you have the kerberos for windows (mit) library, set this to the
438 # directory where the kfw package is stored.
439 #
440 # If you don't have KFW, comment this line out, so that KFW_DIR
441 # isn't defined.
442 #
443 KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3-2-2-i386-ws-vc6
444 COMERR_DLL=comerr32.dll
445 KRB5_DLL=krb5_32.dll
446 K5SPRT_DLL=k5sprt32.dll
447
448 # Optional: the LUA library enables scripting support.
449 #
450 # If you have the LUA library, set this to the directory in which
451 # the LUA package is stored.
452 #
453 # If you don't have LUA, comment this line out, so that LUA_DIR
454 # isn't defined.
455 #
456 !IF "$(MSVC_VARIANT)" == "MSVC2015" ||  "$(MSVC_VARIANT)" == "MSVC2015CE"
457 LUA_DIST=-5.2.3_Win32_dll14
458 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" ||  "$(MSVC_VARIANT)" == "MSVC2013EE"
459 LUA_DIST=-5.2.3_Win32_dll12
460 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" ||  "$(MSVC_VARIANT)" == "MSVC2012EE"
461 LUA_DIST=-5.2.3_Win32_dll11
462 !ELSE
463 LUA_DIST=-5.2.3_Win32_dll10
464 !ENDIF
465 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3
466
467 #
468 # Optional: the PORTAUDIO library enables audio output for RTP streams.
469 #
470 # If you have the PORTAUDIO library (used for rtp_player), set this to
471 # the directory in which the PORTAUDIO library is stored.
472 #
473 # If you don't have PORTAUDIO, comment this line out, so that
474 # PORTAUDIO_DIR isn't defined.
475 #
476 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
477 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
478
479 #
480 # Version number of PortAudio
481 #
482 #PORTAUDIO_VERSION=18
483 PORTAUDIO_VERSION=19
484
485 #
486 # Optional: AirPcap developer's pack to capture wireless network traffic
487 # incl. 802.11 management frames.
488 #
489 # If you have the AirPcap developer's pack, set this to the directory
490 # in which the AirPcap developer's pack resides.
491 #
492 # If you don't have the AirPcap developer's pack, comment this line out,
493 # so that AIRPCAP_DIR isn't defined.
494 #
495 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
496
497 #
498 # Optional: LIBSMI, System Management Interface
499 #
500 # Used for oid-name resolution for SNMP and other protocols
501 #
502 SMI_PKG=svn-40773
503
504 #
505 # Optional: GeoIP, IP address database lookups
506 #
507 # Used to map IP addresses to MaxMind GeoIP database entries
508 GEOIP_PKG=1.6.6
509
510 #
511 # Optional: WinSparkle, software updates
512 #
513 # Used for automatic software updates
514 #
515 WINSPARKLE_PKG=0.3-44-g2c8d9d3-win32ws
516
517 !else
518 DOWNLOAD_TAG=2015-10-07
519 ##### Win64 Libraries #####
520 #
521 # Mandatory: GLib settings
522 #
523 # Please note: Since Wireshark release 1.0.0, we no longer support GLib1.x
524 #
525 GLIB_VERSION=2.0
526
527 #
528 # Mandatory: GLib, GTK & related library settings
529 #
530 # Please note: Since Wireshark release 1.0.0, we no longer support GTK1.x
531 #
532 # If you want building with GTK+, set GTK_DIR to the pathname of the
533 # directory in which the "include" and "lib" directories reside.
534 #
535 #
536 # Set the name to gtk3 if you want to use gtk3 - (experimental ?)
537 GTK_NAME=gtk2
538 GTK_DIR=$(WIRESHARK_LIB_DIR)\$(GTK_NAME)
539
540 # These macros are used by the nsis installer script and by the install target.
541 #EXPAT_DLL=libexpat-1.dll
542 FFI_DLL=libffi-6.dll
543 FONTCONFIG_DLL=libfontconfig-1.dll
544 FREETYPE_DLL=libfreetype-6.dll
545 INTL_DLL=libintl-8.dll
546 HARFBUZZ_DLL=libharfbuzz-0.dll
547 JASPER_DLL=libjasper-1.dll
548 JPEG_DLL=libjpeg-8.dll
549 LZMA_DLL=liblzma-5.dll
550 PIXMAN_DLL=libpixman-1-0.dll
551 PNG_DLL=libpng16-16.dll
552 #SEH_DLL=libgcc_s_seh-1.dll
553 TIFF_DLL=libtiff-5.dll
554 XML_DLL=libxml2-2.dll
555
556 # These macros are used by the setup target.
557 !IF "$(GTK_NAME)" == "gtk2"
558 GDK_DLL=libgdk-win32-2.0-0.dll
559 GTK_DLL=libgtk-win32-2.0-0.dll
560 GTK_PKG=2.24.23-3.39
561 #GTK_PKG=2.24.23-1.1
562 PKG_SUFIX=ws
563 !ELSE
564 GDK_DLL=libgdk-3-0.dll
565 GTK_DLL=libgtk-3-0.dll
566 PKG_SUFIX=ws
567 GTK_PKG=3.4.4-2.1
568 #GTK_PKG=3.6.1-1.1
569 !ENDIF
570
571 #
572 # Mandatory: Version numbers of GTK and pango.
573 #
574 # (MAJOR + MINOR Version number but without MICRO version number)
575 # These macros are used by the nsis installer script and by the setup target.
576 #
577 !IF "$(GTK_NAME)" == "gtk2"
578 #GTK_INST_VERSION=2.16
579 GTK_INST_VERSION=2.24
580 !ELSE
581 #GTK_INST_VERSION=3.4
582 GTK_INST_VERSION=3.6
583 !ENDIF
584
585 #
586 # Recommended: Qt
587 #
588 # This must point to a top-level Qt directory. QMake should be in
589 # $(QT5_BASE_DIR)\bin
590 #
591 # Qt's various paths are hardcoded but with care you can relocate your
592 # installation directory:
593 # http://stackoverflow.com/questions/913642/qmake-and-qt-install-prefix-how-can-i-select-a-new-location-for-qt-library
594 #
595 #QT5_BASE_DIR=output of "qmake -query QT_INSTALL_PREFIX"
596 !IF !DEFINED(QT5_BASE_DIR)
597 # Wireshark custom
598 !IF EXIST(C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws)
599 QT5_BASE_DIR=C:\Qt\Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws
600 # Digia official
601 !ELSE IF EXIST(C:\Qt\Qt5.1.1\5.1.1\msvc2010)
602 QT5_BASE_DIR=C:\Qt\Qt5.1.1\5.1.1\msvc2010
603 !ELSE IF EXIST(C:\Qt\5.3\msvc2013_64)
604 QT5_BASE_DIR=C:\Qt\5.3\msvc2013_64
605 # Digia official, installed in $(WIRESHARK_LIB_DIR)
606 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010)
607 QT5_BASE_DIR=$(WIRESHARK_LIB_DIR)\Qt5.1.1\5.1.1\msvc2010
608 !ENDIF
609 !ENDIF
610
611 #
612 # Recommended: WinPcap developer's pack to capture network traffic.
613 #
614 # If you have the WinPcap developer's pack (at least version 3.0),
615 # set this to the directory in which the WinPcap developer's pack resides.
616 #
617 # If you don't have the WPdpack, comment this line out, so that
618 # PCAP_DIR isn't defined.
619 #
620 PCAP_DIR=$(WIRESHARK_LIB_DIR)\WPdpack
621 # This macro is used by the NSIS installer script, PortableApps, and by the
622 # setup target.
623 WINPCAP_VERSION=4_1_3
624 WPD_VERSION=4_1_2
625
626 #
627 # Optional: WinPcap remote capture support and new API
628 # (pcap_open(), pcap_findalldevs_ex(), etc.)
629 #
630 PCAP_REMOTE=1
631
632 #
633 # Optional: The ZLib enables unzipping of gzip compressed capture files
634 # "on the fly".
635 #
636 # If you have Zlib, set this to directory in which the Zlib headers
637 # and .lib file are stored.
638 #
639 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
640 # defined.
641 #
642 ZLIB_DIR=$(WIRESHARK_LIB_DIR)\zlib-1.2.8-ws
643
644 #
645 # Optional: the ADNS library enables asynchronous (nonblocking) DNS
646 # name resolvings.
647 #
648 # If you have GNU ADNS, set this to the directory in which the GNU ADNS
649 # .lib file is stored.
650 #
651 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
652 # isn't defined.
653 #
654 # If C_ARES_DIR is defined below, it will override this setting.
655 #
656 #ADNS_DIR=$(WIRESHARK_LIB_DIR)\adns-1.0-win32-05ws
657
658 #
659 # Optional: the c-ares library enables asynchronous (nonblocking) DNS
660 # name resolvings.
661 #
662 # If you have c-ares, set this to the directory in which the c-ares
663 # .lib file is stored. Setting this will override ADNS_DIR above. You
664 # can't have both.
665 #
666 # If you're using Visual C++ 6.0, you'll have to use a platform SDK that
667 # defines socklen_t, such as Windows Server 2003 PSDK.
668 #
669 # If you don't have c-ares, comment this line out, so that C_ARES_DIR
670 # isn't defined.
671 #
672 C_ARES_PKG=1.9.1-1
673
674 #
675 # Optional: the GnuTLS library enables ssl decryption.
676 #
677 # If you have the GnuTLS library, set this to the package version.
678 #
679 # If you don't have GnuTLS, comment this line out, so that GNUTLS_PKG
680 # isn't defined.
681 #
682 # Platform SDK conflicts with openssl.h header
683 GNUTLS_PKG=3.2.15-2.9
684 GPGERROR_DLL=libgpg-error6-0.dll
685 GCC_DLL=libgcc_s_seh-1.dll
686
687 #
688 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
689 #
690 # If you have the kerberos for windows (mit) library, set this to the
691 # directory where the kfw package is stored.
692 #
693 # If you don't have KFW, comment this line out, so that KFW_DIR
694 # isn't defined.
695 #
696 KFW_DIR=$(WIRESHARK_LIB_DIR)\kfw-3-2-2-x64-ws
697 COMERR_DLL=comerr64.dll
698 KRB5_DLL=krb5_64.dll
699 K5SPRT_DLL=k5sprt64.dll
700
701 #
702 # Optional: the LUA library enables scripting support.
703 #
704 # If you have the LUA library, set this to the directory in which
705 # the LUA package is stored.
706 #
707 # If you don't have LUA, comment this line out, so that LUA_DIR
708 # isn't defined.
709 #
710 !IF "$(MSVC_VARIANT)" == "MSVC2015" ||  "$(MSVC_VARIANT)" == "MSVC2015CE"
711 LUA_DIST=-5.2.3_Win64_dll14
712 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" ||  "$(MSVC_VARIANT)" == "MSVC2013EE"
713 LUA_DIST=-5.2.3_Win64_dll12
714 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" ||  "$(MSVC_VARIANT)" == "MSVC2012EE"
715 LUA_DIST=-5.2.3_Win64_dll11
716 !ELSE
717 LUA_DIST=-5.2.3_Win64_dll10
718 !ENDIF
719 LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3
720
721 #
722 # Optional: the PORTAUDIO library enables audio output for RTP streams.
723 #
724 # If you have the PORTAUDIO library (used for rtp_player), set this to
725 # the directory in which the PORTAUDIO library is stored.
726 #
727 # If you don't have PORTAUDIO, comment this line out, so that
728 # PORTAUDIO_DIR isn't defined.
729 #
730 #PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v18_1
731 PORTAUDIO_DIR=$(WIRESHARK_LIB_DIR)\portaudio_v19_2
732
733 #
734 # Version number of PortAudio
735 #
736 #PORTAUDIO_VERSION=18
737 PORTAUDIO_VERSION=19
738
739 #
740 # Optional: AirPcap developer's pack to capture wireless network traffic
741 # incl. 802.11 management frames.
742 #
743 # If you have the AirPcap developer's pack, set this to the directory
744 # in which the AirPcap developer's pack resides.
745 #
746 # If you don't have the AirPcap developer's pack, comment this line out,
747 # so that AIRPCAP_DIR isn't defined.
748 #
749 AIRPCAP_DIR=$(WIRESHARK_LIB_DIR)\AirPcap_Devpack_4_1_0_1622\AirPcap_Devpack
750
751 #
752 # Optional: LIBSMI, System Management Interface
753 #
754 # Used for oid-name resolution for SNMP and other protocols
755 #
756 SMI_PKG=svn-40773
757
758 #
759 # Optional: GeoIP, IP address database lookups
760 #
761 # Used to map IP addresses to MaxMind GeoIP database entries
762 #
763 GEOIP_PKG=1.6.6
764
765 #
766 # Optional: WinSparkle, software updates
767 #
768 # Used for automatic software updates
769 #
770 WINSPARKLE_PKG=0.3-44-g2c8d9d3-win64ws
771
772 !endif
773 ##### win32 / win64 #####
774
775 !IF "$(GTK_NAME)" == "gtk2"
776 GTK_ETC_DIR=etc\gtk-2.0
777 GTK_ENGINES_DIR=lib\gtk-2.0\$(GTK_LIB_DIR)\engines
778 GTK_MODULES_DIR=lib\gtk-2.0\modules
779 GTK_THEMES_DIR=share\themes\MS-Windows\gtk-2.0
780 !ELSE
781 GTK_ETC_DIR=etc\gtk-3.0
782 GTK_SCHEMAS_DIR=\share\glib-2.0\schemas
783 !ENDIF
784
785
786 ##### Tools #####
787
788 # Set the following mandatory commands to find the tools.
789 # The easiest way is to use the corresponding packages from Cygwin.
790
791 # Set up the path to the Cygwin binaries
792 # First check whether a 32-bit Cygwin installation exists
793 # If not, check for a 64-bit Cygwin installation
794 !IF EXIST($(CYGWIN_PATH))
795 # Do nothing
796 !ELSE IF EXIST(C:\cygwin\bin)
797 CYGWIN_PATH=C:\cygwin\bin
798 !ELSE IF EXIST(C:\cygwin64\bin)
799 CYGWIN_PATH=C:\cygwin64\bin
800 !ELSE IF EXIST(C:\tools\cygwin\bin)
801 # Chocolatey default
802 CYGWIN_PATH=C:\tools\cygwin\bin
803 !ELSE
804 !ERROR Could not locate Cygwin, please set CYGWIN_PATH explicitly in config.nmake
805 !ENDIF
806
807 # command for a shell (cygwin's bash package recommended)
808 SH_PROG=bash
809
810 # bash versions after 3.1.6 need the 'igncr' shell option to be able to
811 #  process scripts in Windows 'native format' (dos crlf format).
812 # The following !IF results in the option being used only if it is available
813 #  since using it on bash version 3.1.6 (or earlier) is not required and
814 #  will cause an error message.
815 !if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
816 SH_FLAGS=-o igncr
817 !endif
818
819 SH=$(SH_PROG) $(SH_FLAGS)
820
821 # PowerShell
822 # Compatibility testing (...or should we always force version 2?)
823 #POWERSHELL=powershell -Version 2.0 -executionpolicy bypass -File
824 # Normal
825 POWERSHELL=powershell -executionpolicy bypass -File
826
827 # command for perl (cygwin's perl package recommended)
828 PERL=perl
829
830 # command for pod2man and pod2html
831 # (part of the perl package, usually leave these unchanged)
832 POD2MAN=$(SH) pod2man
833 POD2HTML=$(SH) pod2html
834
835 # command for sed (cygwin's sed recommended)
836 SED=sed
837
838 # Command for Flex. Cygwin's flex or Chocolatey's win_flex
839 # recommended.
840 # Absolute or relative paths must be Windows-style
841
842 #LEX=\custom\path\to\flex
843
844 # Find flex automatically
845 !IF !DEFINED(LEX)
846 !IF DEFINED(CHOCOLATEYINSTALL) && EXIST("$(CHOCOLATEYINSTALL)\bin\win_flex.exe")
847 LEX=$(CHOCOLATEYINSTALL)\bin\win_flex
848 !ELSE IF EXIST("$(CYGWIN_PATH)\flex.exe")
849 # We add Cygwin to PATH below.
850 LEX=flex
851 !ENDIF
852 !ENDIF
853
854 # Command for Bison. Cygwin's bison or Chocolatey's win_bison
855 # recommended.
856 # Absolute or relative paths must be Windows-style
857
858 #YACC=\custom\path\to\bison
859
860 # Find bison automatically
861 !IF !DEFINED(YACC)
862 !IF DEFINED(CHOCOLATEYINSTALL) && EXIST("$(CHOCOLATEYINSTALL)\bin\win_bison.exe")
863 YACC=$(CHOCOLATEYINSTALL)\bin\win_bison
864 !ELSE IF EXIST("$(CYGWIN_PATH)\bison.exe")
865 # We add Cygwin to PATH below.
866 YACC=bison
867 !ENDIF
868 !ENDIF
869
870 # Make our text files Windows-native
871 TEXTIFY=$(POWERSHELL) $(TOOLS_DIR)/textify.ps1
872
873 #
874 # Optional: Build the NSIS installer.
875 #
876 # If NSIS is installed in a standard location (under Program Files
877 # or Program Files (x86)) you shouldn't have to change anything.
878 #
879 # If NSIS is installed in a custom location uncomment the following
880 # line and adjust the path accordingly.
881 #
882
883 #MAKENSIS="\custom\path\to\NSIS\makensis.exe"
884
885 # Find NSIS automatically
886 !IF !DEFINED(MAKENSIS)
887 !IF EXIST("$(PROGRAM_FILES)\NSIS\makensis.exe")
888 MAKENSIS="$(PROGRAM_FILES)\NSIS\makensis.exe"
889 !ELSE IF EXIST("$(PROGRAM_FILES_W6432)\NSIS\makensis.exe")
890 MAKENSIS="$(PROGRAM_FILES_W6432)\NSIS\makensis.exe"
891 !ELSE IF EXIST("\Program Files (x86)\NSIS\makensis.exe")
892 MAKENSIS="\Program Files (x86)\NSIS\makensis.exe"
893 !ENDIF
894 !ENDIF
895
896 #
897 # Optional: Build the PortableApps package (WiresharkPortable).
898 #
899 # If you have the PortableApps.com Platform installed set this to the main
900 # PortableApps directory. In order to build packages you need to install
901 # "PortableApps.com Launcher" and "NSIS Portable (Unicode)" *within* the
902 # PortableApps environment.
903 #
904 # If you don't have the PortableApps.com Platform installed comment this line
905 # out.
906 #
907 PORTABLEAPPS_DIR="C:\PortableApps"
908
909 #
910 # Optional: To build the developers API documentation with doxygen and dot.
911 # Currently experimental, outdated and incomplete.
912 #
913 # You will have to download and install:
914 # Doxygen from: http://www.doxygen.org
915 # Graphviz from: http://www.research.att.com/sw/tools/graphviz/
916 #
917 # If you have doxygen, set this to the doxygen executable.
918 #
919 # If you don't want the developers documentation (or don't have the tools),
920 # comment this line out, so that DOXYGEN isn't defined.
921 #
922 #DOXYGEN="$(PROGRAM_FILES)/doxygen/bin/doxygen.exe"
923
924 #
925 # Recommended: Use the compressed html help format .chm as the Wireshark integrated help.
926 #
927 # The required htmlhelp.h and htmlhelp.lib should be included in versions of MSVC supported by Wireshark
928 #
929 # If you don't want the online help (or don't have the tools),
930 # comment this line out, so that HHC_DIR isn't defined.
931 #
932 HHC_DIR=$(PROGRAM_FILES)\HTML Help Workshop
933
934 #
935 # Optional: To reduce the size of dlls and exes, which is especially useful for
936 # USB device distributions (PortableApps)
937 #
938 # If you have the UPX package, set this to the upx.exe executable.
939 #
940 # UPX can be downloaded from:
941 #   http://upx.sourceforge.net/
942 #
943 # If you don't have UPX, or don't want to pack exes and dlls,
944 # comment this line out, so that UPX isn't defined.
945 #
946
947 UPX=$(WIRESHARK_LIB_DIR)\upx303w\upx.exe
948
949 ##### Flags, PATHs and Miscellaneous #####
950
951 # "convert" the MSVC variant into the required MSC compiler version
952 !IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
953 MSC_VER_REQUIRED=1400
954 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008" ||  "$(MSVC_VARIANT)" == "MSVC2008EE"
955 MSC_VER_REQUIRED=1500
956 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010" ||  "$(MSVC_VARIANT)" == "MSVC2010EE"
957 MSC_VER_REQUIRED=1600
958 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" ||  "$(MSVC_VARIANT)" == "MSVC2012EE"
959 MSC_VER_REQUIRED=1700
960 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" ||  "$(MSVC_VARIANT)" == "MSVC2013EE"
961 MSC_VER_REQUIRED=1800
962 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2015" ||  "$(MSVC_VARIANT)" == "MSVC2015CE"
963 MSC_VER_REQUIRED=1900
964 !ELSE
965 !ERROR MSVC_VARIANT unknown
966 !ENDIF
967
968 ## Manifest processing is not needed for VC10 (Visual Studio 2010 C)
969 ## See: http://msdn.microsoft.com/en-us/library/dd293574.aspx
970 !IF ($(MSC_VER_REQUIRED) >= 1400) && ($(MSC_VER_REQUIRED) < 1600)
971 MANIFEST_INFO_REQUIRED=1
972 !ENDIF
973
974 ## VS2012 (VC11) and later: configure subsystem version
975 ## See: https://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx
976 ## (APPVER used in win32.mak to set subsystem version)
977 !IF ($(MSC_VER_REQUIRED) >= 1700)
978 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
979 APPVER=5.01
980 !else
981 APPVER=5.02
982 !endif
983 !ENDIF
984
985 # Compiler flags:
986 # /W3                               Warning level 3 (0 less - 4 most, 1 default).
987 # /Zi                               Create .pdb file for debugging.
988 # /MD                               Use "multithread- and DLL-specific version" of run-time libraries.
989 #                                    msvc documentation states that /MD causes _MT and _DLL to be defined
990 #                                    See: http://msdn.microsoft.com/en-us/library/2kzt1wy3%28v=VS.90%29.aspx
991 # /D_CRT_SECURE_NO_DEPRECATE        Don't warn for "insecure" calls;
992 #                                     see MSDN "Security Enhancements in the CRT".
993 # /D_CRT_NONSTDC_NO_DEPRECATE       Don't warn for "Deprecated CRT Functions" as MSDN calls this.
994 # /D_BIND_TO_CURRENT_CRT_VERSION=1  Make sure our CRT and manifest versions match.
995 #                                    (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
996 # /DWIN32_LEAN_AND_MEAN             Don't include unnecessary Windows include files (see windows.h).
997 # /MANIFEST:no                      Don't create a SxS manifest. Makes sure our plugins don't load
998 #                                     a second copy of the CRT.
999 # -DPSAPI_VERSION=1                 Programs that must run on earlier versions of Windows as well as Windows 7 and later
1000 #                                   versions should always call this function as GetProcessMemoryInfo. To ensure correct
1001 #                                   resolution of symbols, add Psapi.lib to the TARGETLIBS macro and compile the program
1002 #                                   with -DPSAPI_VERSION=1.To use run-time dynamic linking, load Psapi.dll.
1003 #                                   http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
1004 # -DBUILD_WINDOWS                   Starting from VS2013, GetVersionEx is deprecated and we are recommended to use
1005 #                                   VerifyVersionInfo instead
1006 #                                   http://msdn.microsoft.com/en-us/library/windows/desktop/ms724429(v=vs.85).aspx
1007 #                                   http://msdn.microsoft.com/en-us/library/windows/desktop/ms725491(v=vs.85).aspx
1008 #                                   To continue to use GetVersionEx, we can define BUILD_WINDOWS
1009 # -D_ALLOW_KEYWORD_MACROS           For VS2012 onwards the, C++ STL does not permit macro redefinitions of keywords
1010 #                                   (see http://msdn.microsoft.com/en-us/library/bb531344(v=vs.110).aspx)
1011 #                                   This definition prevents the complaint about the redefinition of inline by WinPCap
1012 #                                   in pcap-stdinc.h when compiling CPP files, e.g. the QT UI
1013 # /O2                               http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx
1014 #                                   Specifying the /O2 compiler option is the same as using the following options:
1015 #                                   /Ob (Inline Function Expansion), where the option parameter is 2 (/Ob2)
1016 #                                   /Og (Global Optimizations)
1017 #                                   /Oi (Generate Intrinsic Functions)
1018 #                                   /Ot (Favor Fast Code)
1019 #                                   /Oy (Frame-Pointer Omission)
1020 #                                   /Gs (Control Stack Checking Calls))
1021 #                                   /GF (Eliminate Duplicate Strings)
1022 #                                   /Gy (Enable Function-Level Linking)
1023 # /Zo                               Output debug info allowing debuggers to display local values and trace into inline
1024 #                                   functions.  For VS2013 Update 3.  Assume all VS2013 builds are at least Update 3.
1025 #                                   See http://msdn.microsoft.com/en-us/library/dn785163.aspx
1026 #                                   VS2015: On by default when /Zi or /Z7 used.
1027
1028 ##Note: LOCAL_CFLAGS are flags used for *all* compilations
1029 ##      STANDARD_CFLAGS (see below) are flags used just for *Wireshark* compilations
1030 !IF "$(MSVC_VARIANT)" == "MSVC2005"   || \
1031         "$(MSVC_VARIANT)" == "MSVC2005EE" || \
1032         "$(MSVC_VARIANT)" == "DOTNET20"   || \
1033         "$(MSVC_VARIANT)" == "MSVC2008"   || \
1034         "$(MSVC_VARIANT)" == "MSVC2008EE" || \
1035         "$(MSVC_VARIANT)" == "MSVC2010"   || \
1036         "$(MSVC_VARIANT)" == "MSVC2010EE" || \
1037         "$(MSVC_VARIANT)" == "MSVC2012"   || \
1038         "$(MSVC_VARIANT)" == "MSVC2012EE" || \
1039         "$(MSVC_VARIANT)" == "MSVC2013"   || \
1040         "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1041         "$(MSVC_VARIANT)" == "MSVC2015"   || \
1042         "$(MSVC_VARIANT)" == "MSVC2015CE"
1043 LOCAL_CFLAGS=/Zi /W3 /MD /O2 /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
1044              /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DPSAPI_VERSION=1
1045
1046 !IF "$(MSVC_VARIANT)" == "MSVC2012"   || \
1047         "$(MSVC_VARIANT)" == "MSVC2012EE" || \
1048         "$(MSVC_VARIANT)" == "MSVC2013"   || \
1049         "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1050         "$(MSVC_VARIANT)" == "MSVC2015"   || \
1051         "$(MSVC_VARIANT)" == "MSVC2015CE"
1052 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_ALLOW_KEYWORD_MACROS
1053 !ENDIF
1054
1055 !IF "$(MSVC_VARIANT)" == "MSVC2013"   || \
1056         "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1057         "$(MSVC_VARIANT)" == "MSVC2015"   || \
1058         "$(MSVC_VARIANT)" == "MSVC2015CE"
1059 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /DBUILD_WINDOWS /Zo
1060 !ENDIF
1061
1062 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
1063 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
1064 !ENDIF
1065
1066 # Additional compiler warnings to be treated as "Level 3"
1067 #  when compiling Wireshark sources. (Selected from "level 4" warnings).
1068 ## 4295: array is too small to include a terminating null character
1069 ## 4189: local variable is initialized but not referenced
1070 WARNINGS_CFLAGS=/w34295 /w34189
1071
1072 !ELSE
1073 !ERROR MSVC_VARIANT unknown
1074 !ENDIF
1075
1076 # http://msdn.microsoft.com/en-us/library/bb385193.aspx
1077 # /MP               Compiles multiple source files by using multiple processes
1078 # /MP[processMax]   If you omit the processMax argument, the compiler retrieves the number of effective processors
1079 #                   on your computer from the operating system, and creates a process for each processor.
1080 #
1081 # The following compiler options and language features that are incompatible with the /MP option:
1082 #
1083 # * #import preprocessor directive
1084 # * /E, /EP
1085 # * /Gm
1086 # * /showIncludes
1087 # * /Yc
1088 #
1089 !IF     "$(MSVC_VARIANT)" == "MSVC2008"   || \
1090         "$(MSVC_VARIANT)" == "MSVC2008EE" || \
1091         "$(MSVC_VARIANT)" == "MSVC2010"   || \
1092         "$(MSVC_VARIANT)" == "MSVC2010EE" || \
1093         "$(MSVC_VARIANT)" == "MSVC2012"   || \
1094         "$(MSVC_VARIANT)" == "MSVC2012EE" || \
1095         "$(MSVC_VARIANT)" == "MSVC2013"   || \
1096         "$(MSVC_VARIANT)" == "MSVC2013EE" || \
1097         "$(MSVC_VARIANT)" == "MSVC2015"   || \
1098         "$(MSVC_VARIANT)" == "MSVC2015CE"
1099 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /MP
1100 !ENDIF
1101
1102 # Optional: Static analysis. Only supported in the full-frontal MSVC editions.
1103 # http://msdn.microsoft.com/en-us/library/ms182025.aspx
1104
1105 !IFDEF ENABLE_CODE_ANALYSIS
1106 LOCAL_CFLAGS= $(LOCAL_CFLAGS) /analyze:WX-
1107 !ENDIF
1108
1109 ## Do *not* redefine LOCAL_CFLAGS below this point !!
1110
1111 #STANDARD_CFLAGS are flags used for *Wireshark* compiles (not stuff like lemon, etc)
1112 STANDARD_CFLAGS=/DWINPCAP_VERSION=$(WINPCAP_VERSION) $(LOCAL_CFLAGS) $(WARNINGS_CFLAGS)
1113
1114 #Comment out the following if warnings are not to be treated as errors
1115 WARNINGS_ARE_ERRORS=-WX
1116
1117 # Linker flags:
1118 # /DEBUG  generate debug info
1119 # /PROFILE generate map file(s) for profiling
1120 # /DEFAULTLIB:xxx use xxx as the standard C library
1121 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
1122 # /RELEASE set the checksum in the header, stops debugger complaints
1123 #
1124 LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE) /RELEASE
1125 DLL_LDFLAGS =
1126 !IFDEF MANIFEST_INFO_REQUIRED
1127 DLL_LDFLAGS = /MANIFEST:no
1128 !ENDIF
1129
1130 # Enable Safe Exception Handler.
1131 # http://msdn.microsoft.com/en-us/magazine/cc337897.aspx
1132 !IF $(MSC_VER_REQUIRED) >= 1300
1133 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
1134 LOCAL_LDFLAGS= $(LOCAL_LDFLAGS) /SafeSEH
1135 !ENDIF
1136 !ENDIF
1137
1138 # Enable ASLR. Requires VS2008 or later.
1139 # http://blogs.msdn.com/b/vcblog/archive/2009/05/21/dynamicbase-and-nxcompat.aspx
1140 # DEP (/NXCompat) is handled in init_process_policies() via SetProcessDEPPolicy.
1141
1142 # ASLR http://msdn.microsoft.com/en-us/library/bb384887.aspx
1143 !IF $(MSC_VER_REQUIRED) >= 1500
1144 LOCAL_LDFLAGS= $(LOCAL_LDFLAGS) /DYNAMICBASE /FIXED:no
1145 !ENDIF
1146
1147 PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
1148
1149 #
1150 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
1151 # XCOPY under Windows NT doesn't support the "/Y" flag.  This works
1152 # around that bug.
1153 # XXX - This apparently doesn't work for some versions of nmake:
1154 # http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
1155 # It looks like we'll have to call "set copycmd=/y" before we run xcopy.
1156 COPYCMD=/y
1157
1158 #
1159 # If you don't want to build libwireshark.dll, you should comment out the
1160 # following line. (Note: for plugin support this option must stay activated)
1161 ENABLE_LIBWIRESHARK=USE
1162
1163 #
1164 # install (debug) directory for Wireshark (relative to your source dir)
1165 INSTALL_DIR=wireshark-gtk2
1166 INSTALL_DIR_QT=wireshark-qt-release
1167
1168 ##### C-Runtime Redistributable #####
1169 #
1170 # The C-Runtime since Version 7 must be shipped together with
1171 # the program installer, to avoid missing msvcr*.dll files on
1172 # the target machine.
1173 #
1174 # The location of these files differ on the various compiler
1175 # packages, the following will use the default paths depending
1176 # on the package version.
1177 #
1178
1179 # You can either place the redistributable in its own platform-
1180 # and compiler-specific directory or in the top-level library
1181 # directory.
1182 # Microsoft maintains a list of the latest redistributables in
1183 # KB 20197667: http://support.microsoft.com/kb/2019667
1184 !IF EXIST("$(WIRESHARK_LIB_DIR)\vcredist_$(MSVC_VARIANT)")
1185 VCREDIST_DIR=$(WIRESHARK_LIB_DIR)\vcredist_$(MSVC_VARIANT)
1186 !ELSE
1187 VCREDIST_DIR=$(WIRESHARK_LIB_DIR)
1188 !ENDIF
1189
1190 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win64"
1191 #
1192 # For 64-bit platforms, we don't create portable packages and therefore
1193 # don't have to worry that "Using the Visual C++ Redistributable
1194 # Package" requires that an installer be run to install that package,
1195 # so we use that method to make the C runtime available.
1196 #
1197 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1198
1199 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
1200 #
1201 # For MSVC 2005 non-Express Edition, we "Install a particular Visual C++
1202 # assembly as a private assembly for the application", by copying
1203 # the contents of the Microsoft.VC80.CRT folder to the target directory.
1204 # This is done to reduce the size of the installer; it also makes
1205 # a portable version work, as the C runtime doesn't have to be
1206 # installed on the target machine.
1207 #
1208 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC80.CRT\*.*
1209
1210 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
1211 #
1212 # For MSVC 2005 Express Edition, for the .NET Framework 2.0 SDK, and
1213 # for MSVC 2008 Express Edition, we "Use the Visual C++ Redistributable
1214 # Package", because they don't provide the Microsoft.VC80.CRT folder.
1215 #
1216 # They also don't provide the redistributable package, so you need to
1217 # download the appropriate version of the redistributable package,
1218 # vcredist_x86.exe, vcredist_x64.exe, or vcredist_ia64.exe, from
1219 # Microsoft first, and copy it to the lib folder!!!
1220 #
1221 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1222
1223 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2008"
1224 #
1225 # For MSVC 2008 non-Express Edition, we "Install a particular Visual C++
1226 # assembly as a private assembly for the application", by copying
1227 # the contents of the Microsoft.VC90.CRT folder to the target directory.
1228 # This is done to reduce the size of the installer; it also makes
1229 # a portable version work, as the C runtime doesn't have to be
1230 # installed on the target machine.
1231 #
1232 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(PROCESSOR_ARCHITECTURE)\Microsoft.VC90.CRT\*.*
1233
1234 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010EE"
1235 #
1236 # For MSVC 2010 Express Edition, we "Use the Visual C++ Redistributable
1237 # Package", because it doesn't provide the Microsoft.VC80.CRT folder.
1238 #
1239 # It also doesn't provide the redistributable package, so you need to
1240 # download the appropriate version of the redistributable package,
1241 # vcredist_x86.exe or vcredist_x64.exe, from Microsoft first, and copy
1242 # it to the lib folder!!!
1243 VCREDIST_EXE=$(VCREDIST_DIR)\vcredist_$(TARGET_MACHINE).exe
1244
1245 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2010"
1246 #
1247 # For MSVC 2010 non-Express Edition, we "Install a particular Visual C++
1248 # assembly as a private assembly for the application", by copying
1249 # the contents of the Microsoft.VC100.CRT folder to the target directory.
1250 # This is done to reduce the size of the installer; it also makes
1251 # a portable version work, as the C runtime doesn't have to be
1252 # installed on the target machine.
1253 #
1254 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1255 # Redistributable Package", rather than "Installing a particular Visual
1256 # C++ assembly as a private assembly for the application", starting
1257 # with Visual Studio 2010.
1258 #
1259 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC100.CRT\*.*
1260 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" || "$(MSVC_VARIANT)" == "MSVC2012EE"
1261 #
1262 # EE version added as per bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9227
1263 #
1264 # For MSVC 2012, we "Install a particular Visual C++
1265 # assembly as a private assembly for the application", by copying
1266 # the contents of the Microsoft.VC110.CRT folder to the target directory.
1267 # This is done to reduce the size of the installer; it also makes
1268 # a portable version work, as the C runtime doesn't have to be
1269 # installed on the target machine.
1270 #
1271 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1272 # Redistributable Package", rather than "Installing a particular Visual
1273 # C++ assembly as a private assembly for the application", starting
1274 # with Visual Studio 2010.
1275 #
1276 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC110.CRT\*.*
1277 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2013" || "$(MSVC_VARIANT)" == "MSVC2013EE"
1278 #
1279 # EE version added as per bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9227
1280 #
1281 # For MSVC 2013, we "Install a particular Visual C++
1282 # assembly as a private assembly for the application", by copying
1283 # the contents of the Microsoft.VC120.CRT folder to the target directory.
1284 # This is done to reduce the size of the installer; it also makes
1285 # a portable version work, as the C runtime doesn't have to be
1286 # installed on the target machine.
1287 #
1288 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1289 # Redistributable Package", rather than "Installing a particular Visual
1290 # C++ assembly as a private assembly for the application", starting
1291 # with Visual Studio 2010.
1292 #
1293 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC120.CRT\*.*
1294 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2015" || "$(MSVC_VARIANT)" == "MSVC2015CE"
1295 #
1296 # For MSVC 2015, we "Install a particular Visual C++
1297 # assembly as a private assembly for the application", by copying
1298 # the contents of the Microsoft.VC140.CRT folder to the target directory.
1299 # This is done to reduce the size of the installer; it also makes
1300 # a portable version work, as the C runtime doesn't have to be
1301 # installed on the target machine.
1302 #
1303 # Note: for what it's worth, Microsoft recommends "Using the Visual C++
1304 # Redistributable Package", rather than "Installing a particular Visual
1305 # C++ assembly as a private assembly for the application", starting
1306 # with Visual Studio 2010.
1307 #
1308 MSVCR_DLL=$(VCINSTALLDIR)\redist\$(TARGET_MACHINE)\Microsoft.VC140.CRT\*.*
1309 !ELSE
1310 !ERROR MSVC_VARIANT unknown
1311 !ENDIF
1312
1313 # This is still optional yet we define it above for all users.
1314 # So, don't check if it exists...
1315 #!IF DEFINED(VCREDIST_EXE) && ! EXIST("$(VCREDIST_EXE)")
1316 #!ERROR Can't find $(VCREDIST_EXE). Have you downloaded it from Microsoft? \
1317 #See the developer's guide section "C-Runtime "Redistributable" files" for details how to get it
1318 #!ENDIF
1319
1320 ##### Advanced: Docbook/XML documentation generation #####
1321 # If you want to generate the Docbook/XML based docs (User's and Developer's
1322 # Guide, ...), you'll need some additional tools / libraries compared to the
1323 # rest of the build process.
1324 #
1325 # FOR DETAILED INSTRUCTIONS TO GENERATE THE DOCS, SEE: docbook\README.txt.
1326 #
1327 # If you don't call the Makefile.nmake in the docbook dir to generate the
1328 # docs, the following settings in this section will have no effect.
1329
1330 # formatting objects processor executable
1331 # Comment this out if you don't have fop installed or you don't want the docs
1332 # in PDF format.
1333 #
1334 # You may want to install the FOP hyphenation patterns from
1335 # http://offo.sourceforge.net/hyphenation/
1336 !IFNDEF FOP
1337
1338 !IF EXIST(docbook\fop-1.1\fop.bat)
1339 FOP=fop-1.1\fop.bat
1340 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\fop-1.1\fop.bat)
1341 FOP=$(WIRESHARK_LIB_DIR)\fop-1.1\fop.bat
1342 !ELSE IF EXIST(docbook\fop-1.0\fop.bat)
1343 FOP=fop-1.0\fop.bat
1344 !ELSE IF EXIST($(WIRESHARK_LIB_DIR)\fop-1.0\fop.bat)
1345 FOP=$(WIRESHARK_LIB_DIR)\fop-1.0\fop.bat
1346 !ENDIF
1347
1348 !ENDIF FOP
1349
1350 # Additional options to fop.
1351 FOP_OPTS=-Xmx256m
1352
1353 # the XSL processor (part of cygwin's libxslt package)
1354 XSLTPROC="xsltproc"
1355
1356 # the XML validator (part of cygwin's libxml2 package)
1357 XMLLINT="xmllint"
1358
1359 # Asciidoc converter (part of cygwin's asciidoc package). In order to build
1360 # the release notes you must have the Cygwin asciidoc and lynx packages
1361 # installed.
1362 A2X=a2x
1363 LYNX=lynx
1364
1365 ##############################################################################
1366 #
1367 # You should not have to change anything below this comment.
1368 # If you do, it's a deficiency in the Makefile.nmake files;
1369 # either tell wireshark-dev@wireshark.org about it, including
1370 # details of why you had to change it, or fix config.nmake
1371 # and any Makefile.nmake files that need to be changed, and
1372 # send us the patches, along with details of why the change
1373 # was necessary.
1374 #
1375 ##############################################################################
1376
1377 #
1378 # The RC_VERSION should be comma-separated, not dot-separated,
1379 # as per Graham Bloice's message in
1380 #
1381 #       http://www.wireshark.org/lists/ethereal-dev/200303/msg00283.html
1382 #
1383 # "The RC_VERSION variable in config.nmake should be comma separated.
1384 # This allows the resources to be built correctly and the version
1385 # number to be correctly displayed in the explorer properties dialog
1386 # for the executables, and XP's tooltip, rather than 0.0.0.0."
1387 #
1388
1389 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
1390 RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO),$(VERSION_BUILD)
1391 PRODUCT_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO).$(VERSION_BUILD)
1392
1393 WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
1394 RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
1395 FTAP_VERSION=$(FTAP_VERSION_MAJOR).$(FTAP_VERSION_MINOR).$(FTAP_VERSION_MICRO)
1396 RC_FTAP_VERSION=$(FTAP_VERSION_MAJOR),$(FTAP_VERSION_MINOR),$(FTAP_VERSION_MICRO)
1397
1398 # GLib
1399 GLIB_CFLAGS=/I$(GTK_DIR)\include\glib-$(GLIB_VERSION) \
1400         /I$(GTK_DIR)\lib\glib-$(GLIB_VERSION)\include \
1401         -DG_DISABLE_DEPRECATED \
1402         -DG_DISABLE_SINGLE_INCLUDES
1403 GLIB_LIBS=$(GTK_DIR)\lib\glib-$(GLIB_VERSION).lib \
1404         $(GTK_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
1405         $(GTK_DIR)\lib\gobject-$(GLIB_VERSION).lib
1406
1407 PROGRAM_NAME_GTK=$(PROGRAM_NAME)-gtk
1408
1409 # 2.18 was no good(Theming problem)
1410 !IF "$(GTK_INST_VERSION)" == "2.24" || "$(GTK_INST_VERSION)" == "2.22" || "$(GTK_INST_VERSION)" == "2.16" || "$(GTK_INST_VERSION)" == "2.14"
1411
1412 # GTK+
1413 GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-2.0 \
1414         /I$(GTK_DIR)\include\gdk-pixbuf-2.0 \
1415         /I$(GTK_DIR)\lib\gtk-2.0\include \
1416         /I$(GTK_DIR)\include\atk-1.0 \
1417         /I$(GTK_DIR)\include\cairo \
1418         /I$(GTK_DIR)\include\pango-1.0 \
1419         -DGDK_DISABLE_DEPRECATED \
1420         -DGDK_PIXBUF_DISABLE_DEPRECATED \
1421         -DGTK_DISABLE_DEPRECATED \
1422         -DGTK_DISABLE_SINGLE_INCLUDES \
1423         -DGSEAL_ENABLE
1424 GTK_LIBS=$(GTK_DIR)\lib\gtk-win32-2.0.lib \
1425         $(GTK_DIR)\lib\gdk-win32-2.0.lib \
1426         $(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
1427         $(GTK_DIR)\lib\cairo.lib \
1428         $(GTK_DIR)\lib\pango-1.0.lib \
1429         $(GTK_DIR)\lib\pangocairo-1.0.lib \
1430         $(GLIB_LIBS)
1431
1432 GTK_LIB_DIR=2.10.0
1433
1434 !IFDEF HARFBUZZ_DLL
1435 NEED_HARFBUZZ_DLL=USE
1436 !ENDIF
1437 !IFDEF JPEG_DLL
1438 NEED_JPEG_DLL=USE
1439 !ENDIF
1440 !IFDEF PNG_DLL
1441 NEED_PNG_DLL=USE
1442 !ENDIF
1443 !IFDEF SEH_DLL
1444 NEED_SEH_DLL=USE
1445 !ENDIF
1446 !IFDEF SJLJ_DLL
1447 NEED_SJLJ_DLL=USE
1448 !ENDIF
1449 !IFDEF TIFF_DLL
1450 NEED_TIFF_DLL=USE
1451 !ENDIF
1452 NEED_CAIRO_DLL=USE
1453 # Pango >=1.24.5 Needs these:
1454 #NEED_EXPAT_DLL=USE
1455 NEED_FFI_DLL=USE
1456 NEED_FONTCONFIG_DLL=USE
1457 NEED_FREETYPE_DLL=USE
1458 NEED_JASPER_DLL=USE
1459 NEED_JPEG_DLL=USE
1460 NEED_LZMA_DLL=USE
1461 NEED_PIXMAN_DLL=USE
1462 NEED_XML_DLL=USE
1463
1464 !ELSEIF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1465
1466 # GTK+
1467 ## Note: If Wireshark is ever to be built with Gtk >= 3.10
1468 ##        then -DGTK_DISABLE_DEPRECATED must be removed
1469 ##        and -DGDK_DISABLE_DEPRECATION_WARNINGS must
1470 ##        be added below.
1471 ##       Wireshark changes to handle Gtk 3.10 deprecated features
1472 ##        will not be done since Wireshark is moving to Qt.
1473 GTK_CFLAGS=$(GLIB_CFLAGS) /I$(GTK_DIR)\include\gtk-3.0 \
1474         /I$(GTK_DIR)\include\gdk-pixbuf-2.0 \
1475         /I$(GTK_DIR)\lib\gtk-3.0\include \
1476         /I$(GTK_DIR)\include\atk-1.0 \
1477         /I$(GTK_DIR)\include\cairo \
1478         /I$(GTK_DIR)\include\pango-1.0 \
1479         -DGDK_DISABLE_DEPRECATED \
1480         -DGDK_PIXBUF_DISABLE_DEPRECATED \
1481         -DGTK_DISABLE_DEPRECATED \
1482         -DGTK_DISABLE_SINGLE_INCLUDES \
1483         -DGSEAL_ENABLE
1484 GTK_LIBS=$(GTK_DIR)\lib\gtk-3.lib \
1485         $(GTK_DIR)\lib\gdk-3.lib \
1486         $(GTK_DIR)\lib\gdk_pixbuf-2.0.lib \
1487         $(GTK_DIR)\lib\cairo.lib \
1488         $(GTK_DIR)\lib\pango-1.0.lib \
1489         $(GTK_DIR)\lib\pangocairo-1.0.lib \
1490         $(GLIB_LIBS)
1491
1492 GTK_LIB_DIR=3.4
1493
1494 !IFDEF _DLL
1495 !ENDIF
1496
1497 NEED_CAIRO_GOBJECT_DLL=USE
1498 NEED_CAIRO_DLL=USE
1499
1500 !IFDEF EXPAT_DLL
1501 NEED_EXPAT_DLL=USE
1502 !ENDIF
1503 !IFDEF FFI_DLL
1504 NEED_FFI_DLL=USE
1505 !ENDIF
1506 !IFDEF FONTCONFIG_DLL
1507 NEED_FONTCONFIG_DLL=USE
1508 !ENDIF
1509 !IFDEF FREETYPE_DLL
1510 NEED_FREETYPE_DLL=USE
1511 !ENDIF
1512 !IFDEF HARFBUZZ_DLL
1513 NEED_HARFBUZZ_DLL=USE
1514 !ENDIF
1515 !IFDEF JASPER_DLL
1516 NEED_JASPER_DLL=USE
1517 !ENDIF
1518 !IFDEF JPEG_DLL
1519 NEED_JPEG_DLL=USE
1520 !ENDIF
1521 !IFDEF LZMA_DLL
1522 NEED_LZMA_DLL=USE
1523 !ENDIF
1524 !IFDEF PIXMAN_DLL
1525 NEED_PIXMAN_DLL=USE
1526 !ENDIF
1527 !IFDEF PNG_DLL
1528 NEED_PNG_DLL=USE
1529 !ENDIF
1530 !IFDEF SEH_DLL
1531 NEED_SEH_DLL=USE
1532 !ENDIF
1533 !IFDEF SJLJ_DLL
1534 NEED_SJLJ_DLL=USE
1535 !ENDIF
1536 !IFDEF TIFF_DLL
1537 NEED_TIFF_DLL=USE
1538 !ENDIF
1539 !IFDEF XML_DLL
1540 NEED_XML_DLL=USE
1541 !ENDIF
1542 !ELSE
1543 !ERROR ? Unknown or invalid GTK_INST_VERSION "$(GTK_INST_VERSION)"
1544 !ENDIF
1545
1546
1547 !IFDEF AIRPCAP_DIR
1548 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
1549 #AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
1550 !ELSE
1551 AIRPCAP_CONFIG=
1552 WIRELESS_TOOLBAR_CONFIG=
1553 !ENDIF
1554
1555 !IFDEF PCAP_DIR
1556 # Nmake uses carets to escape special characters
1557 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
1558 #
1559 # This requires that, if you're *building* Wireshark, you have
1560 # the most recent WinPcap's development package.  If, at *run*
1561 # time, an older version of WinPcap, missing some routines,
1562 # is found, we work around that.
1563 #
1564 PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
1565 PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
1566 PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
1567 PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
1568 # PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
1569 PCAP_BREAKLOOP_CONFIG=
1570 PCAP_LIST_DATALINKS_CONFIG=^#define HAVE_PCAP_LIST_DATALINKS 1
1571 PCAP_FREE_DATALINKS_CONFIG=^#define HAVE_PCAP_FREE_DATALINKS 1
1572 PCAP_SET_DATALINK_CONFIG=^#define HAVE_PCAP_SET_DATALINK 1
1573 PCAP_OPEN_DEAD_CONFIG=^#define HAVE_PCAP_OPEN_DEAD 1
1574 BPF_IMAGE_CONFIG=^#define HAVE_BPF_IMAGE 1
1575 !ELSE
1576 # no WpdPack installed
1577 WINPCAP_CONFIG=
1578 PCAP_FINDALLDEVS_CONFIG=
1579 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
1580 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
1581 PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG=
1582 PCAP_BREAKLOOP_CONFIG=
1583 PCAP_LIST_DATALINKS_CONFIG=
1584 PCAP_FREE_DATALINKS_CONFIG=
1585 PCAP_SET_DATALINK_CONFIG=
1586 PCAP_OPEN_DEAD_CONFIG=
1587 BPF_IMAGE_CONFIG=
1588 !ENDIF
1589
1590 !IF DEFINED(PCAP_DIR) && DEFINED(PCAP_REMOTE)
1591 PCAP_HAVE_REMOTE_CONFIG=^#define HAVE_REMOTE 1
1592 PCAP_REMOTE_CONFIG=^#define HAVE_PCAP_REMOTE 1
1593 PCAP_OPEN_CONFIG=^#define HAVE_PCAP_OPEN 1
1594 PCAP_SETSAMPLING_CONFIG=^#define HAVE_PCAP_SETSAMPLING 1
1595 !ELSE
1596 PCAP_HAVE_REMOTE_CONFIG=
1597 PCAP_REMOTE_CONFIG=
1598 PCAP_OPEN_CONFIG=
1599 PCAP_SETSAMPLING_CONFIG=
1600 !ENDIF
1601
1602 !IFDEF ZLIB_DIR
1603 ZLIB_PATH=$(ZLIB_DIR)
1604 ZLIB_CFLAGS=/I$(ZLIB_DIR)
1605 ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
1606 ZLIB_DLL=$(ZLIB_DIR)\zlib1.dll
1607 # Nmake uses carets to escape special characters
1608 ZLIB_CONFIG=^#define HAVE_LIBZ 1
1609 !else
1610 ZLIB_CFLAGS=
1611 ZLIB_LIBS=
1612 ZLIB_DLL=
1613 ZLIB_CONFIG=
1614 !ENDIF
1615
1616 !IFDEF C_ARES_PKG
1617 !UNDEF ADNS_DIR
1618 C_ARES_DIR=$(WIRESHARK_LIB_DIR)\c-ares-$(C_ARES_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1619 C_ARES_CFLAGS=/I$(C_ARES_DIR)/include
1620 C_ARES_LIBS=$(C_ARES_DIR)\lib\libcares-2.lib
1621 C_ARES_DLL=$(C_ARES_DIR)\bin\libcares-2.dll
1622 # Nmake uses carets to escape special characters
1623 C_ARES_CONFIG=^#define HAVE_C_ARES 1
1624 !else
1625 C_ARES_CFLAGS=
1626 C_ARES_LIBS=
1627 C_ARES_CONFIG=
1628 !IFDEF ADNS_DIR
1629 ADNS_PATH=$(ADNS_DIR)\adns_win32\lib
1630 ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
1631 ADNS_LIBS=$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns\adns_dll.lib
1632 ADNS_DLL=$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns\adns_dll.dll
1633 # Nmake uses carets to escape special characters
1634 ADNS_CONFIG=^#define HAVE_GNU_ADNS 1
1635 !else
1636 ADNS_CFLAGS=
1637 ADNS_LIBS=
1638 ADNS_CONFIG=
1639 !ENDIF # ADNS
1640 !ENDIF # C_ARES
1641
1642 !IFDEF KFW_DIR
1643 KFW_PATH=$(KFW_DIR)\bin
1644 KFW_CFLAGS=/I$(KFW_DIR)\include
1645 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
1646 KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
1647 !ELSE
1648 KFW_LIBS=$(KFW_DIR)\lib\krb5_64.lib
1649 !ENDIF
1650 # Nmake uses carets to escape special characters
1651 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
1652 !else
1653 KFW_CFLAGS=
1654 KFW_LIBS=
1655 KFW_CONFIG=
1656 !ENDIF
1657
1658 !IFDEF GNUTLS_PKG
1659 GNUTLS_DIR=$(WIRESHARK_LIB_DIR)\gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1660 GNUTLS_PATH=$(GNUTLS_DIR)
1661 # /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
1662 GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
1663 GCRYPT_LIBS = $(GNUTLS_DIR)\bin\libgcrypt-20.lib
1664 GNUTLS_LIBS=\
1665         $(GNUTLS_DIR)\bin\libtasn1-6.lib        \
1666 !IF "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
1667         $(GNUTLS_DIR)\bin\libgpg-error-0.lib    \
1668 !ELSE
1669         $(GNUTLS_DIR)\bin\libgpg-error6-0.lib   \
1670 !ENDIF
1671         $(GCRYPT_LIBS) \
1672         $(GNUTLS_DIR)\bin\libgnutls-28.lib
1673 # Nmake uses carets to escape special characters
1674 GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
1675 LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
1676 !else
1677 GNUTLS_CFLAGS=
1678 GNUTLS_LIBS=
1679 GNUTLS_CONFIG=
1680 LIBGCRYPT_CONFIG=
1681 !ENDIF
1682
1683 !IFDEF LUA_DIR
1684 LUA_CFLAGS=/I$(LUA_DIR)\include
1685 LUA_LIBS=$(LUA_DIR)\lua52.lib
1686 # Nmake uses carets to escape special characters
1687 LUA_CONFIG=^#define HAVE_LUA 1
1688 LUA_VERSION=^#define HAVE_LUA 1
1689 !else
1690 LUA_CFLAGS=
1691 LUA_LIBS=
1692 LUA_CONFIG=
1693 !ENDIF
1694
1695 !IFDEF PORTAUDIO_DIR
1696 # Nmake uses carets to escape special characters
1697 PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
1698 !IF "$(PORTAUDIO_VERSION)" == "18"
1699 # V18 uses API version 1 and v19 API version 2
1700 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
1701 PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
1702 !ELSE
1703 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common /I$(PORTAUDIO_DIR)\src\os\win /DPA_NO_DS /DPA_NO_ASIO
1704 !ENDIF
1705 !ELSE
1706 PORTAUDIO_CFLAGS=
1707 PORTAUDIO_CONFIG=
1708 !ENDIF
1709
1710 !IFDEF HHC_DIR
1711 PATH=$(PATH);$(HHC_DIR)
1712 HHC_EXE=hhc.exe
1713 HHC_CFLAGS=-DHHC_DIR
1714 HHC_LIBS=htmlhelp.lib
1715 !ELSE
1716 HHC_CFLAGS=
1717 HHC_LIBS=
1718 !ENDIF
1719
1720 !IFDEF SMI_PKG
1721 SMI_DIR=$(WIRESHARK_LIB_DIR)\libsmi-$(SMI_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1722 SMI_CONFIG=^#define HAVE_LIBSMI 1
1723 SMI_CFLAGS=/I$(SMI_DIR)\include
1724 SMI_LIBS=$(SMI_DIR)\lib\libsmi-2.lib
1725 !ENDIF
1726
1727 !IFDEF GEOIP_PKG
1728 GEOIP_DIR=$(WIRESHARK_LIB_DIR)\GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
1729 GEOIP_CONFIG=^#define HAVE_GEOIP 1
1730 GEOIP_V6_CONFIG=^#define HAVE_GEOIP_V6 1
1731 GEOIP_CFLAGS=/I$(GEOIP_DIR)/include
1732 GEOIP_LIBS=$(GEOIP_DIR)\lib\libGeoIP-1.lib
1733 !ENDIF
1734
1735 !IFDEF WINSPARKLE_PKG
1736 WINSPARKLE_DIR=$(WIRESHARK_LIB_DIR)\WinSparkle-$(WINSPARKLE_PKG)
1737 WINSPARKLE_CONFIG=^#define HAVE_SOFTWARE_UPDATE 1
1738 WINSPARKLE_CFLAGS=/I$(WINSPARKLE_DIR)
1739 WINSPARKLE_LIBS=$(WINSPARKLE_DIR)\WinSparkle.lib
1740 !ENDIF
1741
1742 !IFDEF ENABLE_LIBWIRESHARK
1743 # Link plugins with the import library of libwireshark.dll
1744 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
1745 !ELSE
1746 LIBWIRESHARK_CONFIG=
1747 !ENDIF
1748
1749 # Construct the path
1750 PATH=$(PATH);$(CYGWIN_PATH);$(GTK_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)
1751
1752 INET6_CONFIG=^#define INET6 1
1753
1754 NTDDNDIS_CONFIG=^#define HAVE_NTDDNDIS_H 1