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