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