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