move the MSVC "block" towards the top of the file
[obnox/wireshark/wip.git] / config.nmake
1 # $Id$
2
3 # Some more informations about the settings in this file, can be found 
4 # in the file README.win32 and the Developer's Guide (available online).
5
6
7
8 ##### Versions #####
9
10 # The current Wireshark version
11 # It's highly recommended to leave MAJOR/MINOR/MICRO unchanged
12 VERSION_MAJOR=0
13 VERSION_MINOR=99
14 VERSION_MICRO=5
15 # It's recommended to change VERSION_EXTRA for your own custom builds
16 # e.g. "-SVN-12345"
17 VERSION_EXTRA=
18
19 # The version of the wiretap library (recommended: leave unchanged)
20 WTAP_VERSION_MAJOR=0
21 WTAP_VERSION_MINOR=3
22 WTAP_VERSION_MICRO=1
23
24
25
26 ##### Microsoft Visual C / Studio Variant #####
27 # for the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
28 # only one of the following MSVC_VARIANT settings should be used
29
30 # "Microsoft Visual Studio 6.0" - THE ONLY RECOMMENDED
31 # Visual C++ 6.0, _MSC_VER 1200, msvcrt.dll (version 6)
32 MSVC_VARIANT=MSVC6
33
34 # "Microsoft Visual Studio .NET (2002)" - NOT YET WORKING
35 # Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
36 #MSVC_VARIANT=MSVC2002
37
38 # "Microsoft Visual Studio .NET 2003" - NOT YET WORKING
39 # Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
40 #MSVC_VARIANT=MSVC2003
41
42 # "Microsoft Visual C++ Toolkit 2003" - NOT YET WORKING
43 # needs additional Platform SDK installation
44 # Visual C++ 7.1, _MSC_VER 1310, msvcr71.dll
45 #MSVC_VARIANT=VC2003TOOLKIT
46
47 # "Microsoft Visual Studio 2005" - NOT YET WORKING
48 # "Microsoft Visual C++ 2005 Express Edition" - EXPERIMENTAL
49 # The "Express Edition" needs additional Platform SDK installation
50 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
51 #MSVC_VARIANT=MSVC2005
52
53
54
55 ##### Libraries #####
56
57
58 # Base directory, where your libraries reside, which needs to be 
59 # compiling the sources. This setting is used only inside this file.
60 #
61 WIRESHARK_LIBS=C:\wireshark-win32-libs
62
63 #
64 # Mandatory: GLib settings
65 #
66 # Current versions of GTK+ 1.3 require GLib 2.0.  Earlier versions of
67 # GTK+ 1.3 are buggy; we don't recommend using them, and we don't
68 # support them.  Upgrade to at least GLib 2.0.
69 #
70 GLIB_VERSION=2.0
71 GLIB_DIR=$(WIRESHARK_LIBS)\glib
72
73 #
74 # Mandatory: GTK (& related) settings
75 #
76 # It's possible, to build both GTK version 1 and 2 at the same time,
77 # or only one of the versions. GTK version 2 is recommended.
78
79 # If you want building with GTK+ 1.3, set GTK1_DIR to the pathname of the 
80 # "gtk+" directory; if you want building with GTK+ 2.x, set GTK2_DIR to 
81 # the pathname of the directory in which the "include" and "lib" directories 
82 # reside.
83 #
84 GTK1_DIR=$(WIRESHARK_LIBS)\gtk+
85 GTK2_DIR=$(WIRESHARK_LIBS)\gtk2
86
87 #
88 # Mandatory for GTK >= 2: Version numbers of gtk2 and pango.
89 #
90 # (MAJOR + MINOR Version number but without MICRO version number) 
91 # These macros are used by the nsis installer script and by the setup target.
92 #
93 # GTK 2.6 is the mainline since Ethereal 0.10.14
94 #GTK2_INST_VERSION=2.6
95 #PANGO_INST_VERSION=1.8
96 # Support for GTK 2.8 
97 #GTK2_INST_VERSION=2.8
98 #PANGO_INST_VERSION=1.14
99 # Support for GTK 2.10 is currently experimental ...
100 GTK2_INST_VERSION=2.10
101 PANGO_INST_VERSION=1.14
102
103 #
104 # If you have GTK-Wimp, set this to the pathname of the directory in
105 # which the files are stored.
106 #
107 # If you don't have GTK-Wimp, comment this line out, so that GTK-Wimp isn't
108 # defined.
109 #
110 # Please note: GTK 2.8 (and later?) includes GTK-Wimp
111 # (in this case these GTK-Wimp related settings will have no effect)
112 #
113 GTK_WIMP_DIR=$(WIRESHARK_LIBS)\gtk-wimp\gtk-wimp-0.7.0-bin
114
115 #
116 # Optional: WinPcap developer's pack to capture network traffic.
117 #
118 # The WinPcap developer's pack version Wireshark is build with.
119 #
120 # If you don't have the WPdpack, comment this line out, so that 
121 # WINPCAP_VERSION isn't defined.
122 #
123 #WINPCAP_VERSION=3.0
124 WINPCAP_VERSION=3.1
125 # XXX - what to set for 4.0 beta 1?
126 #
127 # If you have the WinPcap developer's pack, set this to the directory 
128 # in which the WinPcap developer's pack resides.
129 #
130 # If you don't have the WPdpack, comment this line out, so that 
131 # PCAP_DIR isn't defined.
132 #
133 PCAP_DIR=$(WIRESHARK_LIBS)\WPdpack
134
135 #
136 # Optional: The ZLib enables unzipping of gzip compressed capture files 
137 # "on the fly".
138 #
139 # If you have Zlib, set this to directory in which the Zlib headers 
140 # and .lib file are stored.
141 #
142 # If you don't have Zlib, comment this line out, so that ZLIB_DIR isn't
143 # defined.
144 #
145 # XXX - ZLIB must be recompiled on MSVC 2005 because of C runtime lib (msvcr)
146 # problems, simply disable it for now on MSVC 2005 (and other none 6 versions)
147 !IF "$(MSVC_VARIANT)" == "MSVC6"
148 ZLIB_DIR=$(WIRESHARK_LIBS)\zlib123-dll
149 !ENDIF
150
151 #
152 # Optional: The Net-SNMP library enables SNMP OID to name resolvings
153 # for the MIBs available.
154 #
155 # If you have Net-SNMP, set this to the pathname of the directory in
156 # which the Net-SNMP headers and .lib file are stored.
157 #
158 # If you don't have Net-SNMP, comment this line out, so that NET_SNMP_DIR
159 # isn't defined.
160 #
161 NET_SNMP_DIR=$(WIRESHARK_LIBS)\net-snmp-5.3.1
162
163 #
164 # Optional: the ADNS library enables asynchronous (nonblocking) DNS 
165 # name resolvings.
166 #
167 # If you have GNU ADNS, set this to the directory in which the GNU ADNS 
168 # .lib file is stored.
169 #
170 # If you don't have GNU ADNS, comment this line out, so that ADNS_DIR
171 # isn't defined.
172 #
173 ADNS_DIR=$(WIRESHARK_LIBS)\adns-1.0-win32-05
174
175 #
176 # Optional: the PCRE (Perl Compatible Regular Expressions) library 
177 # enables regular expressions for display filters.
178 #
179 # If you have the PCRE library, set this to the directory in which 
180 # the GNUWIN32 pcre-lib package is stored.
181 #
182 # If you don't have PCRE, comment this line out, so that PCRE_DIR
183 # isn't defined.
184 #
185 PCRE_DIR=$(WIRESHARK_LIBS)\pcre-6.4
186
187 #
188 # Optional: the GNUTLS library enables ssl decryption.
189 #
190 # If you have the GNUTLS library, set this to the directory where 
191 # the lib and include files are stored.
192 #
193 # If you don't have GNUTLS, comment this line out, so that GNUTLS_DIR
194 # isn't defined.
195 #
196 # XXX - GNUTLS headers doesn't compile on MSVC 2005
197 !IF "$(MSVC_VARIANT)" == "MSVC6"
198 GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-1.6.0-1
199 !ENDIF
200
201 #
202 # Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
203 #
204 # If you have the kerberos for windows (mit) library, set this to the 
205 # directory where the kfw package is stored.
206 #
207 # If you don't have KFW, comment this line out, so that KFW_DIR
208 # isn't defined.
209 #
210 KFW_DIR=$(WIRESHARK_LIBS)\kfw-2.5
211
212 #
213 # Optional: the Nettle library enables ??? decryption.
214 #
215 # If you have the Nettle encryption library, set this to the 
216 # directory in which the nettle package is stored.
217 #
218 # If you don't have Nettle, comment this line out, so that NETTLE_DIR
219 # isn't defined.
220 #
221 # NETTLE_DIR=$(WIRESHARK_LIBS)\nettle-1.10
222
223 #
224 # Optional: the LUA library enables scripting support.
225 #
226 # If you have the LUA library, set this to the directory in which 
227 # the LUA package is stored.
228 #
229 # If you don't have LUA, comment this line out, so that LUA_DIR
230 # isn't defined.
231 #
232 LUA_DIR=$(WIRESHARK_LIBS)\lua5.1
233
234 #
235 # Optional: the PORTAUDIO library enables audio output for RTP streams.
236 #
237 # If you have the PORTAUDIO library (used for rtp_player), set this to 
238 # the directory in which the PORTAUDIO library is stored.
239 #
240 # If you don't have PORTAUDIO, comment this line out, so that 
241 # PORTAUDIO_DIR isn't defined.
242 #
243 #PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v18_1
244 PORTAUDIO_DIR=$(WIRESHARK_LIBS)\portaudio_v19
245
246 #
247 # Version number of PortAudio
248
249 #PORTAUDIO_VERSION=18
250 PORTAUDIO_VERSION=19
251
252 #
253 # Mandatory for GTK >= 2: Iconv
254 #
255 # Set ICONV_DIR to the directory in which the
256 # ICONV include files and library resides.
257 #
258 ICONV_DIR=$(WIRESHARK_LIBS)\libiconv-1.9.1.bin.woe32
259
260 #
261 # Mandatory for GTK >= 2: Gettext
262 #
263 # Set GETTEXT_DIR to the directory in which the
264 # GETTEXT include files and library resides.
265 #
266 #GETTEXT_DIR=$(WIRESHARK_LIBS)\gettext-runtime-0.13.1
267 GETTEXT_DIR=$(WIRESHARK_LIBS)\gettext-0.14.5
268
269 #
270 # Optional: AirPcap developer's pack to capture wireless network traffic 
271 # incl. 802.11 management frames.
272 #
273 # If you have the AirPcap developer's pack, set this to the directory 
274 # in which the AirPcap developer's pack resides.
275 #
276 # If you don't have the AirPcap developer's pack, comment this line out, 
277 # so that AIRPCAP_DIR isn't defined.
278 #
279 #AIRPCAP_DIR=$(WIRESHARK_LIBS)\AirPcap
280
281
282
283 ##### Tools #####
284
285 # Set the following mandatory commands to find the tools.
286 # The easiest way is to use the corresponding packages from cygwin.
287
288 # Set up the path to the cygwin binaries
289 CYGWIN_PATH=c:\cygwin\bin
290
291 # command for a shell (cygwin's bash package recommended)
292 SH_PROG=bash
293
294 # bash versions after 3.1.6 need the 'igncr' shell option to be able to
295 #  process scripts in windows 'native format' (dos crlf format). 
296 # The following !IF results in the option being used only if it is available
297 #  since using it on bash version 3.1.6 (or earlier) is not required and
298 #  will cause an error message.
299 !if "$(SH_PROG)"=="bash" && [$(CYGWIN_PATH)\bash -c "set -o igncr" 2>nul: ] == 0
300 SH_FLAGS=-o igncr
301 !endif
302
303 SH=$(SH_PROG) $(SH_FLAGS)
304
305
306 # command for perl (cygwin's perl package recommended)
307 PERL=perl
308
309 # command for pod2man and pod2html 
310 # (part of the perl package, usually leave these unchanged)
311 POD2MAN=$(SH) pod2man
312 POD2HTML=$(SH) pod2html
313
314 # command for native windows python (recommended)
315 PYTHON="C:/python24/python.exe"
316 # add native python to the path (not needed if cygwin's python is used)
317 PATH=c:\python24;$(PATH)
318
319 # command for python (cygwin's python package, not recommended)
320 #PYTHON=env python
321
322 # command for lex/flexx (cygwin's flex recommended)
323 LEX=flex
324
325 # command for yacc/bison (cygwin's bison recommended)
326 YACC=bison
327
328 #
329 # Optional: To build the NSIS installer.
330 #
331 # If you have the NSIS package, set this to the NSIS executable.
332 #
333 # If you don't have NSIS, comment this line out, so that MAKENSIS
334 # isn't defined.
335 #
336 MAKENSIS="C:/program files/nsis/makensis.exe"
337
338 #
339 # Optional: To build the developers documentation with doxygen and dot.
340 # Currently experimental only.
341 #
342 # You will have to download and install:
343 # Doxygen from: www.doxygen.org
344 # Graphviz from: http://www.research.att.com/sw/tools/graphviz/
345 #
346 # If you have doxygen, set this to the doxygen executable.
347 #
348 # If you don't want the developers documentation (or don't have the tools),
349 # comment this line out, so that DOXYGEN isn't defined.
350 #
351 #DOXYGEN="C:/program files/doxygen/bin/doxygen.exe"
352
353 #
354 # Optional: To build compressed html help format .chm and use it as online help format.
355 # You will have to download and install the html help compiler from:
356 #
357 # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html
358 # /hwMicrosoftHTMLHelpDownloads.asp 
359 #
360 # Then point HHC_DIR to the html help dir (where hhc.exe resides).
361 #
362 # If you don't want the online help (or don't have the tools),
363 # comment this line out, so that HHC_DIR isn't defined.
364 #
365 #HHC_DIR="C:/Program Files/HTML Help Workshop/"
366
367
368
369 ##### Flags, PATHs and Miscellaneous #####
370
371 # Compiler flags:
372 # /W3  warning level 3 (0 less - 4 most, 1 default)
373 # /Zi  create .pdb file for debugging
374 # /D_CRT_SECURE_NO_DEPRECATE don't warn for "insecure" calls, see MSDN "Security Enhancements in the CRT"
375 # /D_CRT_NONSTDC_NO_DEPRECATE don't warn for "Deprecated CRT Functions" as MSDN calls this
376 #
377 !IF "$(MSVC_VARIANT)" == "MSVC6"
378 LOCAL_CFLAGS=/Zi /W3
379 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
380 LOCAL_CFLAGS=/Zi /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
381 !ELSE
382 !ERROR MSVC_VARIANT unknown
383 !ENDIF
384
385 # Linker flags:
386 # /DEBUG  generate debug info
387 # /PROFILE generate map file(s) for profiling
388 # /DEFAULTLIB:xxx use xxx as the standard C library
389 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
390
391 !IF "$(MSVC_VARIANT)" == "MSVC6"
392 LOCAL_LDFLAGS=/DEBUG 
393 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
394 #LOCAL_LDFLAGS=/DEBUG /DEFAULTLIB:msvcrt /NODEFAULTLIB:libc /NODEFAULTLIB:libcmt
395 LOCAL_LDFLAGS=/DEBUG /DEFAULTLIB:msvcrt /NODEFAULTLIB:libc /NODEFAULTLIB:libcmt
396 !ELSE
397 !ERROR MSVC_VARIANT unknown
398 !ENDIF
399
400 WS_PLUGIN_LDFLAGS=/DEBUG /NOLOGO /INCREMENTAL:no /MACHINE:I386 
401
402
403 # Set PDB_FILE according to your VC++ version 
404 PDB_FILE=vc*.pdb
405
406
407 # Optional: Use the User's Guide as the online help system
408 # (currently experimental).
409 #
410 # If you don't have the User's Guide, comment this line out, so that 
411 # ENABLE_WSUG isn't defined.
412 #
413 #ENABLE_WSUG=USE
414
415 #
416 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
417 # XCOPY under Windows NT doesn't support the "/Y" flag.  This works
418 # around that bug.
419 # XXX - This apparently doesn't work for some versions of nmake:
420 # http://support.microsoft.com/default.aspx?scid=kb;en-us;86814
421 # It looks like we'll have to call "set copycmd=/y" before we run xcopy.
422 COPYCMD=/y
423
424 #
425 # If you don't want to build libwireshark.dll, you should comment out the
426 # following line. (Note: for plugin support this option must stay activated)
427 ENABLE_LIBWIRESHARK=USE
428
429 #
430 # install (debug) directory for Wireshark GTK1 version (relative to your source dir)
431 INSTALL1_DIR=wireshark-gtk1
432
433 #
434 # install (debug) directory for Wireshark GTK2 version (relative to your source dir)
435 INSTALL2_DIR=wireshark-gtk2
436
437
438
439 ##############################################################################
440 #
441 # You should not have to change anything below this comment.
442 # If you do, it's a deficiency in the Makefile.nmake files;
443 # either tell wireshark-dev@wireshark.org about it, including
444 # details of why you had to change it, or fix config.nmake
445 # and any Makefile.nmake files that need to be changed, and
446 # send us the patches, along with details of why the change
447 # was necessary.
448 #
449 ##############################################################################
450
451 !IFDEF ENABLE_LIBWIRESHARK
452 # Uncomment next line to link plugins with the import library of libwireshark.dll 
453 LINK_PLUGINS_WITH_LIBWIRESHARK=USE
454 !ENDIF
455
456 #
457 # The RC_VERSION should be comma-separated, not dot-separated, 
458 # as per Graham Bloice's message in
459 #
460 #       http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
461 #
462 # "The RC_VERSION variable in config.nmake should be comma separated. 
463 # This allows the resources to be built correctly and the version
464 # number to be correctly displayed in the explorer properties dialog
465 # for the executables, and XP's tooltip, rather than 0.0.0.0."
466 #
467
468 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)$(VERSION_EXTRA)
469 RC_VERSION=$(VERSION_MAJOR),$(VERSION_MINOR),$(VERSION_MICRO)
470
471 WTAP_VERSION=$(WTAP_VERSION_MAJOR).$(WTAP_VERSION_MINOR).$(WTAP_VERSION_MICRO)
472 RC_WTAP_VERSION=$(WTAP_VERSION_MAJOR),$(WTAP_VERSION_MINOR),$(WTAP_VERSION_MICRO)
473
474
475 GLIB_CFLAGS=/I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
476         /I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
477 GCC_GLIB_CFLAGS=-I$(GLIB_DIR)\include\glib-$(GLIB_VERSION) \
478         -I$(GLIB_DIR)\lib\glib-$(GLIB_VERSION)\include
479 GLIB_LIBS=$(GLIB_DIR)\lib\glib-$(GLIB_VERSION).lib \
480         $(GLIB_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
481         $(GLIB_DIR)\lib\gobject-$(GLIB_VERSION).lib
482
483 # GTK+ 1.3
484 GTK1_CFLAGS=$(GLIB_CFLAGS) /I$(GTK1_DIR)\include /I$(GTK1_DIR)\include\gdk \
485         /I$(GTK1_DIR)\lib\gtk+\include
486 GTK1_LIBS=$(GTK1_DIR)\lib\gtk.lib \
487         $(GTK1_DIR)\lib\gdk.lib \
488         $(GLIB_LIBS)
489
490 # GTK+ 2.x
491 GTK2_CFLAGS=$(GLIB_CFLAGS) /I$(GTK2_DIR)\include\gtk-2.0 \
492         /I$(GTK2_DIR)\lib\gtk-2.0\include \
493         /I$(GTK2_DIR)\include\atk-1.0 \
494         /I$(GTK2_DIR)\include\cairo \
495         /I$(GTK2_DIR)\include\pango-1.0
496 GTK2_LIBS=$(GTK2_DIR)\lib\gtk-win32-2.0.lib \
497         $(GTK2_DIR)\lib\gdk-win32-2.0.lib \
498         $(GTK2_DIR)\lib\gdk_pixbuf-2.0.lib \
499         $(GTK2_DIR)\lib\pango-1.0.lib \
500         $(GLIB_LIBS)
501
502 !IF "$(GTK2_INST_VERSION)" == "2.10"
503 GTK2_LIB_DIR=2.10.0
504 NEED_LIBPNG_DLL=USE
505 NEED_CAIRO_DLL=USE
506 GTK_WIMP_DIR=DUMMY_TO_USE_WIMP
507 GTK_WIMP_DLLSRC_DIR=$(GTK2_DIR)\lib\gtk-2.0\2.10.0\engines
508 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.10.0\engines
509 GTK_WIMP_RCSRC_DIR=$(GTK2_DIR)\share\themes\MS-Windows\gtk-2.0
510 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
511 !ELSEIF "$(GTK2_INST_VERSION)" == "2.8"
512 # the lib dir of GTK2.6 didn't changed since 2.4.0
513 GTK2_LIB_DIR=2.4.0
514 NEED_LIBPNG_DLL=USE
515 NEED_CAIRO_DLL=USE
516 GTK_WIMP_DIR=DUMMY_TO_USE_WIMP
517 GTK_WIMP_DLLSRC_DIR=$(GTK2_DIR)\lib\gtk-2.0\2.4.0\engines
518 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.4.0\engines
519 GTK_WIMP_RCSRC_DIR=$(GTK2_DIR)\share\themes\MS-Windows\gtk-2.0
520 GTK_WIMP_RCDST_DIR=etc\gtk-2.0
521 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
522 GTK2_LIB_DIR=2.4.0
523 GTK_WIMP_DLLSRC_DIR=$(GTK_WIMP_DIR)
524 GTK_WIMP_DLLDST_DIR=lib\gtk-2.0\2.4.0\engines
525 GTK_WIMP_RCSRC_DIR=$(GTK_WIMP_DIR)\Theme\gtk-2.0
526 GTK_WIMP_RCDST_DIR=share\themes\Default\gtk-2.0
527 GTK_THEME_DIR=$(GTK_WIMP_DIR)\Theme\gtk-2.0
528 !ENDIF
529
530 # the lib dir of PANGO changed in 1.12
531 !IF "$(PANGO_INST_VERSION)" == "1.14"
532 PANGO_LIB_DIR=1.5.0
533 !ELSEIF "$(PANGO_INST_VERSION)" == "1.10"
534 PANGO_LIB_DIR=1.4.0
535 !ELSEIF "$(PANGO_INST_VERSION)" == "1.8"
536 PANGO_LIB_DIR=1.4.0
537 !ELSEIF "$(PANGO_INST_VERSION)" == "1.4"
538 PANGO_LIB_DIR=1.4.0
539 !ELSEIF "$(PANGO_INST_VERSION)" == "1.2"
540 PANGO_LIB_DIR=1.2.0
541 !ENDIF
542
543 !IFDEF AIRPCAP_DIR
544 AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
545 AIRPDCAP_CONFIG=^#define HAVE_AIRPDCAP 1
546 !ELSE
547 AIRPCAP_CONFIG=
548 AIRPDCAP_CONFIG=
549 !ENDIF
550
551 !IFDEF PCAP_DIR
552 # Nmake uses carets to escape special characters
553 WINPCAP_CONFIG=^#define HAVE_LIBPCAP 1
554 !IF "$(WINPCAP_VERSION)" == "3.0" || "$(WINPCAP_VERSION)" == "3.1"
555 PCAP_FINDALLDEVS_CONFIG=^#define HAVE_PCAP_FINDALLDEVS 1
556 PCAP_DATALINK_NAME_TO_VAL_CONFIG=^#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
557 PCAP_DATALINK_VAL_TO_NAME_CONFIG=^#define HAVE_PCAP_DATALINK_VAL_TO_NAME 1
558 # PCAP_BREAKLOOP won't have any benefit on Win32, but breaks compatibility with 3.0
559 #!IF "$(WINPCAP_VERSION)" == "3.1"
560 #PCAP_BREAKLOOP_CONFIG=^#define HAVE_PCAP_BREAKLOOP 1
561 #!ELSE
562 PCAP_BREAKLOOP_CONFIG=
563 #!ENDIF
564 WPCAP_CONSTIFIED_CONFIG=^#define WPCAP_CONSTIFIED 1
565 !ELSE
566 PCAP_FINDALLDEVS_CONFIG=
567 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
568 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
569 PCAP_BREAKLOOP_CONFIG=
570 WPCAP_CONSTIFIED=
571 !ENDIF
572 !ELSE
573 WINPCAP_CONFIG=
574 PCAP_FINDALLDEVS_CONFIG=
575 PCAP_DATALINK_NAME_TO_VAL_CONFIG=
576 PCAP_DATALINK_VAL_TO_NAME_CONFIG=
577 PCAP_BREAKLOOP_CONFIG=
578 WPCAP_CONSTIFIED=
579 !ENDIF
580
581 !IFDEF ZLIB_DIR
582 ZLIB_PATH=$(ZLIB_DIR)
583 ZLIB_CFLAGS=/I$(ZLIB_DIR)\include
584 ZLIB_LIBS=$(ZLIB_DIR)\lib\zdll.lib
585 # Nmake uses carets to escape special characters
586 ZLIB_CONFIG=^#define HAVE_LIBZ 1
587 !else
588 ZLIB_CFLAGS=
589 ZLIB_LIBS=
590 ZLIB_CONFIG=
591 !ENDIF
592
593 !IFDEF NET_SNMP_DIR
594 NET_SNMP_CFLAGS=/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32
595 NET_SNMP_LIBS=$(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib
596 # Nmake uses carets to escape special characters
597 NET_SNMP_CONFIG=^#define HAVE_NET_SNMP 1
598 !else
599 NET_SNMP_CFLAGS=
600 NET_SNMP_LIBS=
601 NET_SNMP_CONFIG=
602 !ENDIF
603
604 !IFDEF ADNS_DIR
605 ADNS_PATH=$(ADNS_DIR)\adns_win32\lib
606 ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
607 ADNS_LIBS=$(ADNS_DIR)\adns_win32\lib\adns_dll.lib
608 # Nmake uses carets to escape special characters
609 ADNS_CONFIG=^#define HAVE_GNU_ADNS 1
610 !else
611 ADNS_CFLAGS=
612 ADNS_LIBS=
613 ADNS_CONFIG=
614 !ENDIF
615
616 !IFDEF KFW_DIR
617 KFW_PATH=$(KFW_DIR)\bin
618 KFW_CFLAGS=/I$(KFW_DIR)\inc
619 KFW_LIBS=$(KFW_DIR)\lib\krb5_32.lib
620 # Nmake uses carets to escape special characters
621 KFW_CONFIG=^#define HAVE_MIT_KERBEROS 1
622 !else
623 KFW_CFLAGS=
624 KFW_LIBS=
625 KFW_CONFIG=
626 !ENDIF
627
628 !IFDEF PCRE_DIR
629 PCRE_PATH=$(PCRE_DIR)\bin
630 PCRE_CFLAGS=/I$(PCRE_DIR)\include
631 PCRE_LIBS=$(PCRE_DIR)\lib\pcre.lib
632 # Nmake uses carets to escape special characters
633 PCRE_CONFIG=^#define HAVE_LIBPCRE 1
634 !else
635 PCRE_CFLAGS=
636 PCRE_LIBS=
637 PCRE_CONFIG=
638 !ENDIF
639
640 !IFDEF NETTLE_DIR
641 NETTLE_CFLAGS=/I$(NETTLE_DIR)
642 NETTLE_LIBS=$(NETTLE_DIR)\libnettle.lib
643 # Nmake uses carets to escape special characters
644 NETTLE_CONFIG=^#define HAVE_LIBNETTLE 1
645 !else
646 NETTLE_CFLAGS=
647 NETTLE_LIBS=
648 NETTLE_CONFIG=
649 !ENDIF
650
651 !IFDEF GNUTLS_DIR
652 GNUTLS_PATH=$(GNUTLS_DIR)
653 GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include
654 GNUTLS_LIBS=\
655         $(GNUTLS_DIR)\bin\libtasn1-3.lib        \
656         $(GNUTLS_DIR)\bin\libgpg-error-0.lib    \
657         $(GNUTLS_DIR)\bin\libgcrypt-11.lib      \
658         $(GNUTLS_DIR)\bin\libgnutls-13.lib
659 # Nmake uses carets to escape special characters
660 GNUTLS_CONFIG=^#define HAVE_LIBGNUTLS 1
661 LIBGCRYPT_CONFIG=^#define HAVE_LIBGCRYPT 1
662 !else
663 GNUTLS_CFLAGS=
664 GNUTLS_LIBS=
665 GNUTLS_CONFIG=
666 LIBGCRYPT_CONFIG=
667 !ENDIF
668
669 !IFDEF LUA_DIR
670 LUA_CFLAGS=/I$(LUA_DIR)\include
671 LUA_LIBS=$(LUA_DIR)\lib\dll\lua5.1.lib
672 # Nmake uses carets to escape special characters
673 LUA_CONFIG=^#define HAVE_LUA 1
674 LUA_VERSION=^#define HAVE_LUA_5_1 1
675 !else
676 LUA_CFLAGS=
677 LUA_LIBS=
678 LUA_CONFIG=
679 !ENDIF
680
681 !IFDEF PORTAUDIO_DIR
682 # Nmake uses carets to escape special characters
683 PORTAUDIO_CONFIG=^#define HAVE_LIBPORTAUDIO 1
684 !IF "$(PORTAUDIO_VERSION)" == "18"
685 # V18 uses API version 1 and v19 API version 2
686 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\pa_common
687 PORTAUDIO_API_CONFIG=^#define PORTAUDIO_API_1 1
688 !ELSE
689 PORTAUDIO_CFLAGS=/I$(PORTAUDIO_DIR)\include /I$(PORTAUDIO_DIR)\src\common
690 !ENDIF
691
692 !else
693 PORTAUDIO_CFLAGS=
694 PORTAUDIO_CONFIG=
695 !ENDIF
696
697 !IFDEF HHC_DIR
698 HHC_CFLAGS=/I$(HHC_DIR)\include -DHHC_DIR
699 HHC_LIBS=$(HHC_DIR)\lib\htmlhelp.lib
700 !ELSE
701 HHC_CFLAGS=
702 HHC_LIBS=
703 !ENDIF
704
705 !IFDEF ENABLE_LIBWIRESHARK
706 LIBWIRESHARK_CONFIG=^#define HAVE_LIBWIRESHARKDLL 1
707 !ELSE
708 LIBWIRESHARK_CONFIG=
709 !ENDIF
710
711 !IFDEF ENABLE_WSUG
712 WSUG_CFLAGS=-DENABLE_WSUG
713 !ELSE
714 WSUG_CFLAGS=
715 !ENDIF
716
717 # Construct the path
718 PATH=$(PATH);$(CYGWIN_PATH);$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ICONV_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH)