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