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