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