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