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