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