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