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