Fix a gcc -Wshadow warning.
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Wireshark
3 #
4 # $Id$
5 #
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 1998 Gerald Combs
9 #
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23
24 ACLOCAL_AMFLAGS = `./aclocal-flags`
25
26 INCLUDES= @LUA_INCLUDES@
27
28 if HAVE_LIBPY
29 py_dissectors_dir = -DPYTHON_DIR=\"@pythondir@\"
30 else
31 py_dissectors_dir = -DPYTHON_DIR=
32 endif
33
34
35 if HAVE_WARNINGS_AS_ERRORS
36 AM_CLEAN_CFLAGS = -Werror
37 endif
38
39 bin_PROGRAMS = \
40         @wireshark_bin@ \
41         @tshark_bin@    \
42         @text2pcap_bin@ \
43         @mergecap_bin@  \
44         @capinfos_bin@  \
45         @editcap_bin@   \
46         @randpkt_bin@   \
47         @dftest_bin@    \
48         @dumpcap_bin@   \
49         @rawshark_bin@
50 bin_SCRIPTS = @idl2wrs_bin@
51
52 EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \
53         randpkt text2pcap dumpcap rawshark
54 EXTRA_SCRIPTS = idl2wrs
55
56 idl2wrs: tools/idl2wrs.sh Makefile
57         cp tools/idl2wrs.sh idl2wrs
58         chmod +x idl2wrs
59
60 #
61 # Wireshark configuration files are put in $(pkgdatadir).
62 #
63 pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
64         smi_modules ipmap.html
65
66 #
67 # Install the Diameter DTD and XML files in the "diameter" subdirectory
68 # of that directory.
69 #
70 diameterdir = $(pkgdatadir)/diameter
71 diameter_DATA = \
72         diameter/chargecontrol.xml \
73         diameter/dictionary.dtd \
74         diameter/dictionary.xml \
75         diameter/eap.xml \
76         diameter/Ericsson.xml \
77         diameter/etsie2e4.xml \
78         diameter/gqpolicy.xml \
79         diameter/imscxdx.xml \
80         diameter/mobileipv4.xml \
81         diameter/mobileipv6.xml \
82         diameter/nasreq.xml \
83         diameter/sip.xml \
84         diameter/sunping.xml \
85         diameter/TGPPGmb.xml \
86         diameter/TGPPRx.xml \
87         diameter/TGPPSh.xml
88
89 #
90 # Install the DTDs directory files in the "dtds" subdirectory
91 # of that directory
92 #
93 dtdsdir = $(pkgdatadir)/dtds
94 dtds_DATA = \
95         dtds/dc.dtd \
96         dtds/itunes.dtd \
97         dtds/mscml.dtd \
98         dtds/pocsettings.dtd \
99         dtds/presence.dtd \
100         dtds/reginfo.dtd \
101         dtds/rlmi.dtd \
102         dtds/rss.dtd \
103         dtds/smil.dtd \
104         dtds/xcap-caps.dtd \
105         dtds/xcap-error.dtd \
106         dtds/watcherinfo.dtd
107
108 #
109 # Install the RADIUS directory files in the "radius" subdirectory
110 # of that directory.
111 #
112 radiusdir = $(pkgdatadir)/radius
113 radius_DATA = \
114         radius/README.radius_dictionary  \
115         radius/dictionary  \
116         radius/dictionary.3com  \
117         radius/dictionary.3gpp  \
118         radius/dictionary.3gpp2  \
119         radius/dictionary.acc  \
120         radius/dictionary.airespace \
121         radius/dictionary.alcatel  \
122         radius/dictionary.alteon  \
123         radius/dictionary.altiga  \
124         radius/dictionary.alvarion \
125         radius/dictionary.apc \
126         radius/dictionary.aptis  \
127         radius/dictionary.aruba  \
128         radius/dictionary.ascend  \
129         radius/dictionary.asn \
130         radius/dictionary.avaya \
131         radius/dictionary.azaire \
132         radius/dictionary.bay  \
133         radius/dictionary.bintec  \
134         radius/dictionary.bristol  \
135         radius/dictionary.cablelabs  \
136         radius/dictionary.cabletron  \
137         radius/dictionary.chillispot \
138         radius/dictionary.cisco  \
139         radius/dictionary.cisco.bbsm  \
140         radius/dictionary.cisco.vpn3000  \
141         radius/dictionary.cisco.vpn5000  \
142         radius/dictionary.clavister \
143         radius/dictionary.colubris  \
144         radius/dictionary.columbia_university  \
145         radius/dictionary.compat  \
146         radius/dictionary.cosine  \
147         radius/dictionary.dhcp \
148         radius/dictionary.digium \
149         radius/dictionary.epygi \
150         radius/dictionary.ericsson  \
151         radius/dictionary.erx  \
152         radius/dictionary.extreme  \
153         radius/dictionary.fortinet \
154         radius/dictionary.foundry  \
155         radius/dictionary.freeradius  \
156         radius/dictionary.freeradius.internal  \
157         radius/dictionary.freeswitch \
158         radius/dictionary.gandalf  \
159         radius/dictionary.garderos  \
160         radius/dictionary.gemtek  \
161         radius/dictionary.h3c \
162         radius/dictionary.hp \
163         radius/dictionary.huawei \
164         radius/dictionary.infonet \
165         radius/dictionary.ipunplugged \
166         radius/dictionary.issanni \
167         radius/dictionary.itk  \
168         radius/dictionary.jradius \
169         radius/dictionary.juniper  \
170         radius/dictionary.karlnet  \
171         radius/dictionary.lancom \
172         radius/dictionary.livingston  \
173         radius/dictionary.localweb  \
174         radius/dictionary.lucent \
175         radius/dictionary.manzara \
176         radius/dictionary.merit  \
177         radius/dictionary.microsoft  \
178         radius/dictionary.mikrotik  \
179         radius/dictionary.motorola \
180         radius/dictionary.navini  \
181         radius/dictionary.netscreen  \
182         radius/dictionary.networkphysics \
183         radius/dictionary.nexans \
184         radius/dictionary.nokia  \
185         radius/dictionary.nokia.conflict \
186         radius/dictionary.nomadix  \
187         radius/dictionary.nortel \
188         radius/dictionary.ntua \
189         radius/dictionary.openser \
190         radius/dictionary.packeteer \
191         radius/dictionary.patton \
192         radius/dictionary.propel  \
193         radius/dictionary.prosoft \
194         radius/dictionary.quiconnect \
195         radius/dictionary.quintum  \
196         radius/dictionary.redback  \
197         radius/dictionary.redcreek  \
198         radius/dictionary.rfc2865 \
199         radius/dictionary.rfc2866 \
200         radius/dictionary.rfc2867 \
201         radius/dictionary.rfc2868 \
202         radius/dictionary.rfc2869 \
203         radius/dictionary.rfc3162 \
204         radius/dictionary.rfc3576 \
205         radius/dictionary.rfc3580 \
206         radius/dictionary.rfc4072 \
207         radius/dictionary.rfc4372 \
208         radius/dictionary.rfc4675 \
209         radius/dictionary.rfc4679 \
210         radius/dictionary.rfc4818 \
211         radius/dictionary.rfc4849 \
212         radius/dictionary.rfc5090 \
213         radius/dictionary.rfc5176 \
214         radius/dictionary.riverstone \
215         radius/dictionary.roaringpenguin \
216         radius/dictionary.shasta  \
217         radius/dictionary.shiva  \
218         radius/dictionary.slipstream \
219         radius/dictionary.sofaware \
220         radius/dictionary.sonicwall  \
221         radius/dictionary.springtide  \
222         radius/dictionary.starent  \
223         radius/dictionary.t_systems_nova  \
224         radius/dictionary.telebit  \
225         radius/dictionary.telkom \
226         radius/dictionary.trapeze  \
227         radius/dictionary.tropos \
228         radius/dictionary.tunnel  \
229         radius/dictionary.unisphere  \
230         radius/dictionary.unix  \
231         radius/dictionary.usr  \
232         radius/dictionary.utstarcom \
233         radius/dictionary.valemount  \
234         radius/dictionary.versanet  \
235         radius/dictionary.vqp \
236         radius/dictionary.walabi \
237         radius/dictionary.waverider \
238         radius/dictionary.wimax  \
239         radius/dictionary.wispr  \
240         radius/dictionary.xedia \
241         radius/dictionary.xylan \
242         radius/dictionary.zyxel
243
244 #
245 # Install the tpncp directory files in the "tpncp" subdirectory
246 # of that directory
247 #
248 tpncpdir = $(pkgdatadir)/tpncp
249 tpncp_DATA = \
250         tpncp/tpncp.dat
251
252
253 #
254 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
255 # of that directory
256 #
257 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
258 wimaxasncp_DATA = \
259         wimaxasncp/dictionary.xml \
260         wimaxasncp/dictionary.dtd
261
262 PLATFORM_SRC = capture-pcap-util-unix.c
263
264 if HAVE_PLUGINS
265 -include plugins/Custom.make
266 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
267         -dlopen plugins/asn1/asn1.la \
268         -dlopen plugins/docsis/docsis.la \
269         -dlopen plugins/ethercat/ethercat.la \
270         -dlopen plugins/giop/cosnaming.la \
271         -dlopen plugins/giop/coseventcomm.la \
272         -dlopen plugins/gryphon/gryphon.la \
273         -dlopen plugins/interlink/interlink.la \
274         -dlopen plugins/irda/irda.la \
275         -dlopen plugins/m2m/m2m.la \
276         -dlopen plugins/mate/mate.la \
277         -dlopen plugins/opcua/opcua.la \
278         -dlopen plugins/profinet/profinet.la \
279         -dlopen plugins/sercosiii/sercosiii.la \
280         -dlopen plugins/stats_tree/stats_tree.la \
281         -dlopen plugins/unistim/unistim.la \
282         -dlopen plugins/wimax/wimax.la
283
284 WTAP_PLUGIN_SOURCES = \
285        epan/plugins.c \
286        epan/report_err.c \
287        epan/filesystem.c
288
289 else            # HAVE_PLUGINS
290
291 plugin_ldadd =
292 WTAP_PLUGIN_SOURCES =
293
294 endif           # HAVE_PLUGINS
295
296 include Makefile.common
297
298 # Optional objects that I know how to build. These will be
299 # linked into the wireshark executable.
300 # They will also be linked into the tshark executable; if this
301 # list ever grows to include something that can't be linked with
302 # tshark, or if tshark needs something that wireshark doesn't,
303 # we should probably split this into stuff needed both
304 # by wireshark and tshark and stuff needed only by one or the
305 # other.
306 wireshark_optional_objects = @GETOPT_O@ @STRERROR_O@ \
307         @STRNCASECMP_O@ @STRPTIME_O@
308
309 if ENABLE_STATIC
310 wireshark_LDFLAGS = -Wl,-static -all-static
311 else
312 wireshark_LDFLAGS = -export-dynamic
313 endif
314
315 # Libraries and plugin flags with which to link wireshark.
316 #
317 # Note that Wireshark doesn't have to be linked with @GLIB_LIBS@, as
318 # they are included in @GTK_LIBS@, and doesn't have to be linked with
319 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
320 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
321 # applications are X applications).
322 wireshark_LDADD = \
323         $(wireshark_optional_objects)   \
324         gtk/libui.a                     \
325         codecs/libcodec.a               \
326         wiretap/libwiretap.la           \
327         epan/libwireshark.la            \
328         wsutil/libwsutil.la             \
329         @INET_PTON_LO@                  \
330         @INET_NTOP_LO@                  \
331         @SSL_LIBS@                      \
332         $(plugin_ldadd)                 \
333         @PCRE_LIBS@                     \
334         @PCAP_LIBS@                     \
335         @GTK_LIBS@                      \
336         @C_ARES_LIBS@                   \
337         @ADNS_LIBS@                     \
338         @KRB5_LIBS@                     \
339         @FRAMEWORKS@                    \
340         @LIBGCRYPT_LIBS@                \
341         @LIBGNUTLS_LIBS@                \
342         @LIBSMI_LDFLAGS@                \
343         @PORTAUDIO_LIBS@
344 wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
345
346 if ENABLE_STATIC
347 tshark_LDFLAGS = -Wl,-static -all-static
348 else
349 tshark_LDFLAGS = -export-dynamic
350 endif
351
352 # Libraries and plugin flags with which to link tshark.
353 tshark_LDADD = \
354         $(wireshark_optional_objects)   \
355         wiretap/libwiretap.la           \
356         epan/libwireshark.la            \
357         wsutil/libwsutil.la             \
358         @INET_PTON_LO@                  \
359         @INET_NTOP_LO@                  \
360         @SSL_LIBS@                      \
361         $(plugin_ldadd)                 \
362         @PCRE_LIBS@                     \
363         @GLIB_LIBS@ -lm                 \
364         @PCAP_LIBS@                     \
365         @SOCKET_LIBS@                   \
366         @NSL_LIBS@                      \
367         @C_ARES_LIBS@                   \
368         @ADNS_LIBS@                     \
369         @KRB5_LIBS@                     \
370         @FRAMEWORKS@                    \
371         @LIBGCRYPT_LIBS@                \
372         @LIBGNUTLS_LIBS@                \
373         @LIBSMI_LDFLAGS@
374 tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
375
376 if ENABLE_STATIC
377 rawshark_LDFLAGS = -Wl,-static -all-static
378 else
379 rawshark_LDFLAGS = -export-dynamic
380 endif
381
382 # Libraries and plugin flags with which to link rawshark.
383 rawshark_LDADD = \
384         $(wireshark_optional_objects)   \
385         wiretap/libwiretap.la           \
386         epan/libwireshark.la            \
387         wsutil/libwsutil.la             \
388         @INET_PTON_LO@                  \
389         @INET_NTOP_LO@                  \
390         @SSL_LIBS@                      \
391         $(plugin_ldadd)                 \
392         @PCRE_LIBS@                     \
393         @GLIB_LIBS@ -lm                 \
394         @PCAP_LIBS@                     \
395         @SOCKET_LIBS@                   \
396         @NSL_LIBS@                      \
397         @C_ARES_LIBS@                   \
398         @ADNS_LIBS@                     \
399         @KRB5_LIBS@                     \
400         @FRAMEWORKS@                    \
401         @LIBGCRYPT_LIBS@                \
402         @LIBGNUTLS_LIBS@                \
403         @LIBSMI_LDFLAGS@
404 rawshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
405
406 # Optional objects that I know how to build, and that are needed by
407 # text2pcap.
408 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
409
410 # Libraries with which to link text2pcap.
411 text2pcap_LDADD = \
412         $(text2pcap_optional_objects)   \
413         wiretap/libwiretap.la           \
414         wsutil/libwsutil.la             \
415         @GLIB_LIBS@ -lm
416 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
417 # which is generated (and therefore not always clean).
418 # We could generate text2pcap.o as a library with -Werror but for now it
419 # doesn't seem worth the effort.
420 #text2pcap_CFLAGS = $(AM_CLEAN_CFLAGS)
421
422 # Libraries with which to link mergecap.
423 mergecap_LDADD = \
424         wiretap/libwiretap.la           \
425         wsutil/libwsutil.la             \
426         @GLIB_LIBS@
427 mergecap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
428
429 # Libraries with which to link capinfos.
430 capinfos_LDADD = \
431         wiretap/libwiretap.la           \
432         wsutil/libwsutil.la             \
433         @GLIB_LIBS@                     \
434         @LIBGCRYPT_LIBS@
435 capinfos_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
436
437 # Libraries with which to link editcap.
438 editcap_LDADD = \
439         wiretap/libwiretap.la           \
440         wsutil/libwsutil.la             \
441         @GLIB_LIBS@
442 editcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
443
444 # Libraries with which to link randpkt.
445 randpkt_LDADD = \
446         wiretap/libwiretap.la           \
447         wsutil/libwsutil.la             \
448         @GLIB_LIBS@ -lm                 \
449         @PCAP_LIBS@                     \
450         @SOCKET_LIBS@                   \
451         @NSL_LIBS@                      \
452         @C_ARES_LIBS@                   \
453         @ADNS_LIBS@
454 randpkt_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
455
456 # Libraries and plugin flags with which to link dftest.
457 dftest_LDADD = \
458         $(wireshark_optional_objects)   \
459         wiretap/libwiretap.la           \
460         wsutil/libwsutil.la             \
461         epan/libwireshark.la            \
462         @SSL_LIBS@                      \
463         $(plugin_ldadd)                 \
464         @PCRE_LIBS@                     \
465         @GLIB_LIBS@ -lm                 \
466         @PCAP_LIBS@                     \
467         @SOCKET_LIBS@                   \
468         @NSL_LIBS@                      \
469         @C_ARES_LIBS@                   \
470         @ADNS_LIBS@                     \
471         @KRB5_LIBS@                     \
472         @LIBGCRYPT_LIBS@                \
473         @LIBGNUTLS_LIBS@                \
474         @LIBSMI_LDFLAGS@
475 dftest_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
476
477 # Libraries with which to link dumpcap.
478 dumpcap_LDADD = \
479         wiretap/libwiretap.la           \
480         wsutil/libwsutil.la             \
481         @INET_NTOP_LO@                  \
482         @GLIB_LIBS@                     \
483         @PCAP_LIBS@                     \
484         @SOCKET_LIBS@                   \
485         @NSL_LIBS@                      \
486         @FRAMEWORKS@                    \
487         @LIBGCRYPT_LIBS@                \
488         @LIBGNUTLS_LIBS@                \
489         @LIBCAP_LIBS@
490 dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
491
492 # Common headers
493 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
494         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(PY_CFLAGS)
495
496 #
497 # Build the version string
498 #
499 # FORCE is the portable version of .PHONY
500 FORCE:
501
502 svnversion.h: FORCE
503         $(PERL) $(srcdir)/make-version.pl $(srcdir)
504
505 #
506 # Build shell scripts by doing variable substitution.
507 # Taken from autoconf 2.13.
508 #
509 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
510
511 SUFFIXES = .sh
512 .sh:
513         rm -f $@ $@.tmp
514         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
515
516 #
517 # Build "tshark-tap-register.c", which contains a function
518 # "register_all_tap_listeners()"
519 # that calls the register routines for all tshark tap listeners.
520 #
521 # We do this by grepping through sources.
522 #
523 # Formatting conventions:  The name of the tap_listener_register_*
524 # routines must start in column zero, or must be preceded only by
525 # "void " starting in column zero, and must not be inside #if.
526 #
527 # The first argument is the directory in which the source files live.
528 # All subsequent arguments are the files to scan.
529 #
530 tshark-tap-register.c: $(TSHARK_TAP_SRC) $(srcdir)/tools/make-tapreg-dotc
531         @echo Making tshark-tap-register.c
532         @$(srcdir)/tools/make-tapreg-dotc tshark-tap-register.c $(srcdir) $(TSHARK_TAP_SRC)
533
534 ps.c: print.ps $(srcdir)/tools/rdps.py
535         $(PYTHON) $(srcdir)/tools/rdps.py $(srcdir)/print.ps ps.c
536
537 #
538 # XXX - "svnversion.h" is distributed in the release tarball; should
539 # we be deleting it with "make clean", or should we only do that with
540 # "make maintainer-clean"?
541 #
542 CLEANFILES =            \
543         svnversion.h    \
544         idl2wrs         \
545         *~              \
546         vgcore.*
547
548 #
549 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
550 # list of files removed by "make distclean"?  (It's deliberately
551 # included in that list.)
552 #
553 DISTCLEANFILES = \
554         ps.c
555
556 MAINTAINERCLEANFILES =          \
557         $(GENERATED_FILES)      \
558         Makefile.in             \
559         aclocal.m4              \
560         config.h.in             \
561         configure               \
562         depcomp                 \
563         install-sh              \
564         ltmain.sh               \
565         missing
566
567 EXTRA_DIST = \
568         INSTALL.configure       \
569         Makefile.am.inc         \
570         Makefile.common         \
571         Makefile.nmake          \
572         Makefile.nmake.inc      \
573         README.aix              \
574         README.bsd              \
575         README.hpux             \
576         README.irix             \
577         README.linux            \
578         README.macos            \
579         README.tru64            \
580         README.vmware           \
581         README.windows          \
582         aclocal-fallback/glib-2.0.m4 \
583         aclocal-fallback/gtk-2.0.m4 \
584         aclocal-flags           \
585         adns_dll.dep            \
586         adns_dll.rc             \
587         autogen.sh              \
588         capinfos.c              \
589         capture-wpcap.c         \
590         capture-wpcap.h         \
591         capture_wpcap_packet.c  \
592         capture_wpcap_packet.h  \
593         cfilters                \
594         colorfilters            \
595         config.h.win32          \
596         config.nmake            \
597         debian/changelog        \
598         debian/compat           \
599         debian/control          \
600         debian/copyright        \
601         debian/dirs             \
602         debian/headers-check.c  \
603         debian/patches/00list   \
604         debian/patches/03_preferences.dpatch \
605         debian/postinst         \
606         debian/pycompat         \
607         debian/pyversions       \
608         debian/rules            \
609         debian/README.source    \
610         debian/tshark.files     \
611         debian/tshark.manpages  \
612         debian/watch            \
613         debian/wireshark-common.files \
614         debian/wireshark-common.manpages \
615         debian/wireshark-common.shlibs \
616         debian/wireshark-dev.docs \
617         debian/wireshark-dev.files \
618         debian/wireshark-dev.header-files \
619         debian/wireshark-dev.manpages \
620         debian/wireshark-dev.prerm \
621         debian/wireshark-root.desktop \
622         debian/wireshark.desktop \
623         debian/wireshark.files \
624         debian/wireshark.manpages \
625         debian/wireshark.menu   \
626         dfilters                \
627         doxygen.cfg.in          \
628         dumpcap.c       \
629         editcap.c               \
630         fix/FIX.xml             \
631         fix/FIX40.xml           \
632         fix/FIX41.xml           \
633         fix/FIX42.xml           \
634         fix/FIX43.xml           \
635         fix/FIX44.xml           \
636         fix/README              \
637         fix/Values.xsl          \
638         fix/hfDecl.xsl          \
639         fix/hfField.xsl         \
640         fix/hfList.xsl          \
641         idl/cosnaming.idl       \
642         idl/tango.idl   \
643         idl/parlay/am.idl       \
644         idl/parlay/cccs.idl     \
645         idl/parlay/cm.idl       \
646         idl/parlay/common_cc_data.idl   \
647         idl/parlay/cs.idl       \
648         idl/parlay/dsc.idl      \
649         idl/parlay/fw_data.idl  \
650         idl/parlay/fw_if.idl    \
651         idl/parlay/fw_if_access.idl     \
652         idl/parlay/fw_if_app.idl        \
653         idl/parlay/fw_if_entop.idl      \
654         idl/parlay/fw_if_service.idl    \
655         idl/parlay/gcc_data.idl \
656         idl/parlay/gcc_interfaces.idl   \
657         idl/parlay/gms.idl      \
658         idl/parlay/mm.idl       \
659         idl/parlay/mmccs.idl    \
660         idl/parlay/mmm.idl      \
661         idl/parlay/mpcc_data.idl        \
662         idl/parlay/mpcc_interfaces.idl  \
663         idl/parlay/osa.idl      \
664         idl/parlay/pam_data.idl \
665         idl/parlay/pam_interfaces.idl   \
666         idl/parlay/Parlay.idl   \
667         idl/parlay/policy_data.idl      \
668         idl/parlay/policy_interfaces.idl        \
669         idl/parlay/README.parlay        \
670         idl/parlay/termcap.idl  \
671         idl/parlay/ui_data.idl  \
672         idl/parlay/ui_interfaces.idl    \
673         image/capinfos.rc.in    \
674         image/clist_ascend.xpm  \
675         image/clist_descend.xpm \
676         image/dn_arrow.xpm      \
677         image/dumpcap.rc.in     \
678         image/editcap.rc.in     \
679         image/file_dlg_win32.rc \
680         image/hi16-app-wireshark.png    \
681         image/hi32-app-wireshark.png    \
682         image/hi48-app-wireshark.png    \
683         image/icon_layout_1.xpm \
684         image/icon_layout_2.xpm \
685         image/icon_layout_3.xpm \
686         image/icon_layout_4.xpm \
687         image/icon_layout_5.xpm \
688         image/icon_layout_6.xpm \
689         image/libwireshark.rc.in        \
690         image/libwsutil.rc.in   \
691         image/lo16-app-wireshark.png    \
692         image/lo32-app-wireshark.png    \
693         image/lo48-app-wireshark.png    \
694         image/Makefile.nmake    \
695         image/mergecap.rc.in    \
696         image/nsis-checked.bmp  \
697         image/nsis-unchecked.bmp        \
698         image/rawshark.rc.in    \
699         image/README.image      \
700         image/stock_dialog_error_48.xpm \
701         image/stock_dialog_info_48.xpm  \
702         image/stock_dialog_question_48.xpm      \
703         image/stock_dialog_stop_48.xpm  \
704         image/stock_dialog_warning_48.xpm       \
705         image/text2pcap.rc.in   \
706         image/toolbar/analyze_24.xpm \
707         image/toolbar/audio_player_24.xpm       \
708         image/toolbar/autoscroll_24.xpm \
709         image/toolbar/capture_airpcap_16.xpm \
710         image/toolbar/capture_capture_16.xpm \
711         image/toolbar/capture_details_16.xpm \
712         image/toolbar/capture_details_24.xpm \
713         image/toolbar/capture_ethernet_16.xpm  \
714         image/toolbar/capture_filter_24.xpm     \
715         image/toolbar/capture_interfaces_24.xpm \
716         image/toolbar/capture_options_24.xpm    \
717         image/toolbar/capture_prepare_16.xpm \
718         image/toolbar/capture_restart_24.xpm    \
719         image/toolbar/capture_start_24.xpm      \
720         image/toolbar/capture_stop_24.xpm       \
721         image/toolbar/checkbox_16.xpm   \
722         image/toolbar/colorize_24.xpm   \
723         image/toolbar/conversations_16.xpm      \
724         image/toolbar/decode_24.xpm     \
725         image/toolbar/decode_as_16.xpm  \
726         image/toolbar/display_filter_24.xpm     \
727         image/toolbar/endpoints_16.xpm  \
728         image/toolbar/expert_info_16.xpm        \
729         image/toolbar/file_set_list_16.xpm      \
730         image/toolbar/file_set_next_16.xpm      \
731         image/toolbar/file_set_previous_16.xpm  \
732         image/toolbar/flow_graph_16.xpm \
733         image/toolbar/graphs_16.xpm     \
734         image/toolbar/icon_color_0.xpm  \
735         image/toolbar/icon_color_1.xpm  \
736         image/toolbar/icon_color_2.xpm  \
737         image/toolbar/icon_color_3.xpm  \
738         image/toolbar/icon_color_4.xpm  \
739         image/toolbar/icon_color_5.xpm  \
740         image/toolbar/icon_color_6.xpm  \
741         image/toolbar/icon_color_7.xpm  \
742         image/toolbar/icon_color_8.xpm  \
743         image/toolbar/icon_color_9.xpm  \
744         image/toolbar/internet_24.xpm   \
745         image/toolbar/modem_16.png      \
746         image/toolbar/modem_16.xpm      \
747         image/toolbar/network_bluetooth_16.png  \
748         image/toolbar/network_usb.svg           \
749         image/toolbar/network_usb_16.png        \
750         image/toolbar/network_virtual_16.xpm    \
751         image/toolbar/network_wired_16.png      \
752         image/toolbar/network_wireless_16.png   \
753         image/toolbar/resize_columns_24.xpm     \
754         image/toolbar/telephone_16.xpm  \
755         image/toolbar/telephony_16.xpm  \
756         image/toolbar/time_24.xpm       \
757         image/toolbar/voip_flow_24.xpm  \
758         image/toolbar/web_support_24.xpm        \
759         image/toolbar/wep_closed_24.xpm \
760         image/toolbar/wiki_24.xpm       \
761         image/tshark.rc.in      \
762         image/up_arrow.xpm      \
763         image/voip_bg.xpm       \
764         image/voip_select.xpm   \
765         image/wireshark.exe.manifest.in \
766         image/wireshark.ico     \
767         image/wireshark.rc.in   \
768         image/WiresharkDoc-128.png      \
769         image/WiresharkDoc-16.png       \
770         image/WiresharkDoc-24.png       \
771         image/WiresharkDoc-256.png      \
772         image/WiresharkDoc-32.png       \
773         image/WiresharkDoc-48.png       \
774         image/WiresharkDoc-64.png       \
775         image/wiresharkdoc.ico  \
776         image/wiresharkinst.ico \
777         image/wiretap.rc.in     \
778         image/wsicon.svg        \
779         image/wsicon16.png      \
780         image/wsicon16.xpm      \
781         image/wsicon256.png     \
782         image/wsicon32.png      \
783         image/wsicon32.xpm      \
784         image/wsicon48.png      \
785         image/wsicon48.xpm      \
786         image/wsicon64.png      \
787         image/wsicon64.xpm      \
788         image/wsiconcap.svg     \
789         image/wsiconcap16.xpm   \
790         image/wsiconcap256.png  \
791         image/wsiconcap32.xpm   \
792         image/wsiconcap48.xpm   \
793         image/wsiconinst.svg    \
794         image/wsiconinst256.png \
795         image/wslogo.eps        \
796         image/wslogo.svg        \
797         image/wssplash-dev.xpm  \
798         image/wssplash.xpm      \
799         ipmap.html      \
800         make-manuf              \
801         make-version.pl         \
802         manuf                   \
803         manuf.tmpl              \
804         mergecap.c              \
805         print.ps                \
806         $(diameter_DATA)        \
807         $(dtds_DATA)            \
808         $(radius_DATA)          \
809         $(tpncp_DATA)           \
810         $(wimaxasncp_DATA)      \
811         randpkt.c               \
812         smi_modules             \
813         text2pcap-scanner.l     \
814         text2pcap.c             \
815         text2pcap.h             \
816         services                \
817         wireshark.desktop       \
818         wka.tmpl
819
820 install-exec-hook:
821 if HAVE_DUMPCAP_GROUP
822         -chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
823 endif
824 if SETCAP_INSTALL
825         -$(SETCAP) cap_net_raw,cap_net_admin+eip $(DESTDIR)$(bindir)/dumpcap
826         -chmod o-rws $(DESTDIR)$(bindir)/dumpcap
827 else
828 if SETUID_INSTALL
829         -chmod o-rws $(DESTDIR)$(bindir)/dumpcap
830         -chmod +s $(DESTDIR)$(bindir)/dumpcap
831 endif
832 endif
833
834
835 DIST_SUBDIRS = asn1 codecs doc epan gtk help packaging plugins tools wiretap wsutil docbook
836
837 if HAVE_PLUGINS
838 SUBDIRS = tools wsutil wiretap epan plugins packaging help @wireshark_SUBDIRS@ . doc
839 else
840 SUBDIRS = tools wsutil wiretap epan packaging help @wireshark_SUBDIRS@ . doc
841 endif
842
843 help/faq.txt: $(srcdir)/help/faq.py
844         (cd help ; \
845         $(MAKE) faq.txt ;)
846
847 libtool: $(LIBTOOL_DEPS)
848         $(SHELL) ./config.status --recheck
849
850 # Used by svr4-package and osx-package
851 # We load top_stagedir with an explicit path so that libtool doesn't freak.
852 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/staging
853 stagedir=$(top_stagedir)/$(PACKAGE).inst
854
855 host_cpu=@host_cpu@
856 host_os=@host_os@
857
858 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
859         @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
860                 rm -rf $(stagedir) ; \
861                 $(MAKE) DESTDIR=$(stagedir) install; \
862                 $(srcdir)/packaging/svr4/mkpkg \
863                         $(PACKAGE) \
864                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
865                         $(prefix) \
866                         $(top_stagedir) ; \
867         else \
868                 echo "Error: SVR4 packaging tools not found." ; \
869                 echo "Package build abandoned." ; \
870         fi
871
872 solaris-package: svr4-package
873
874 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
875 rpm-package: dist
876         if test x$(HAVE_RPM) = xyes ; then \
877                 cd $(rpm_topdir) ; \
878                 mkdir -p BUILD RPMS SOURCES ; \
879                 cd SOURCES ; \
880                 ln -s ../../../$(distdir).tar.bz2 ; \
881                 ln -s ../../../wireshark.desktop ; \
882                 ln -s ../../../image/wsicon64.png wireshark.png ; \
883                 cd .. ; \
884                 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/wireshark.spec && \
885                         echo "Package successfully built in `pwd`/RPMS." ; \
886         else \
887                 echo "Error: RPM executable and/or source directory not found." ; \
888         fi
889 srpm-package: dist
890         if test x$(HAVE_RPM) = xyes ; then \
891                 cd $(rpm_topdir) ; \
892                 mkdir -p BUILD SRPMS SOURCES ; \
893                 cd SOURCES ; \
894                 ln -s ../../../$(distdir).tar.bz2 ; \
895                 ln -s ../../../wireshark.desktop ; \
896                 ln -s ../../../image/wsicon64.png wireshark.png ; \
897                 cd .. ; \
898                 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/wireshark.spec && \
899                         echo "Package successfully built in `pwd`/SRPMS." ; \
900         else \
901                 echo "Error: RPM executable and/or source directory not found." ; \
902         fi
903
904 debian-package: debian/rules
905         @if test x$(HAVE_DPKG_BUILDPACKAGE) = xyes ; then \
906                 dpkg-buildpackage -rfakeroot -us -uc ; \
907         else \
908                 echo "Error: Debian packaging tools not found." ; \
909                 echo "Package build abandoned." ; \
910         fi
911
912 # XXX - This assumes we're building from the source directory.
913 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
914         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
915                 rm -rf $(stagedir) ; \
916                 $(MAKE) DESTDIR=$(stagedir) install; \
917                 cd $(srcdir)/packaging/macosx ;  \
918                 ./osx-app.sh -bp ../staging/$(PACKAGE).inst$(bindir) ; \
919         else \
920                 echo "Error: OS X packaging tools not found." ; \
921                 echo "Package build abandoned." ; \
922         fi
923
924 osx-package: osx-app
925         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
926                 cd $(srcdir)/packaging/macosx ;  \
927                 ./osx-dmg.sh ; \
928         fi
929
930 osx-install: osx-app
931         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
932                 echo "Copying Wireshark.app to /Applications" ; \
933                 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ;  \
934         fi
935
936 clean-local:
937         rm -rf $(top_stagedir)
938
939 checkapi_local:
940         $(PERL) tools/checkAPIs.pl \
941         $(TSHARK_TAP_SRC)
942 #       $(wireshark_SOURCES)
943 #       $(EXTRA_wireshark_SOURCES)
944
945 checkapi: checkapi_local
946         cd wiretap && $(MAKE) checkapi
947         cd ../codecs && $(MAKE) checkapi
948 ##      cd ../gtk && $(MAKE) checkapi
949 ##      cd ../epan && $(MAKE) checkapi
950 ##      cd ../epan/crypt && $(MAKE) checkapi
951         cd ../dfilter && $(MAKE) checkapi
952 ##      cd ../ftypes && $(MAKE) checkapi
953 ##      cd ../wslua && $(MAKE) checkapi
954         cd ../dissectors && $(MAKE) checkapi
955         cd ../../plugins && $(MAKE) checkapi
956         cd ../wsutil && $(MAKE) checkapi