Added mount dissector.
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.105 1999/11/11 21:21:59 nneul Exp $
5 #
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@zing.org>
8 # Copyright 1998 Gerald Combs
9 #
10
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (at your option) any later version.
15
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24
25 bin_PROGRAMS = ethereal
26
27 man_MANS = ethereal.1
28
29 sysconf_DATA = manuf
30
31 # Any POSIX-compatible YACC should honor the -p flag
32 YFLAGS=-d -p dfilter_
33
34 DISSECTOR_SOURCES = \
35         packet-aarp.c  \
36         packet-afs.c   \
37         packet-afs.h   \
38         packet-arp.c   \
39         packet-ascend.c\
40         packet-atalk.c \
41         packet-atalk.h \
42         packet-atm.c   \
43         packet-bgp.c   \
44         packet-bootp.c \
45         packet-bootparams.c \
46         packet-bootparams.h \
47         packet-bpdu.c  \
48         packet-cdp.c   \
49         packet-clip.c  \
50         packet-data.c  \
51         packet-dns.c   \
52         packet-dns.h   \
53         packet-eth.c   \
54         packet-fddi.c  \
55         packet-ftp.c   \
56         packet-giop.c  \
57         packet-gre.c   \
58         packet-http.c  \
59         packet-icmpv6.c\
60         packet-icp.c   \
61         packet-icq.c   \
62         packet-imap.c   \
63         packet-ip.c    \
64         packet-ip.h    \
65         packet-ipp.c   \
66         packet-ipsec.c \
67         packet-ipv6.c  \
68         packet-ipv6.h  \
69         packet-ipx.c   \
70         packet-ipx.h   \
71         packet-isakmp.c\
72         packet-lapb.c  \
73         packet-lapd.c  \
74         packet-llc.c   \
75         packet-lpd.c   \
76         packet-mount.c \
77         packet-mount.h \
78         packet-nbipx.c \
79         packet-nbns.c  \
80         packet-ncp.c   \
81         packet-ncp.h   \
82         packet-netbios.c \
83         packet-netbios.h \
84         packet-nfs.c   \
85         packet-nfs.h   \
86         packet-nntp.c  \
87         packet-ntp.c  \
88         packet-ntp.h  \
89         packet-null.c  \
90         packet-osi.c   \
91         packet-ospf.c  \
92         packet-ospf.h  \
93         packet-pim.c   \
94         packet-pop.c   \
95         packet-portmap.c   \
96         packet-portmap.h   \
97         packet-ppp.c   \
98         packet-pppoe.c \
99         packet-pptp.c  \
100         packet-q931.c   \
101         packet-radius.c\
102         packet-raw.c   \
103         packet-rpc.c   \
104         packet-rpc.h   \
105         packet-rip.c   \
106         packet-rip.h   \
107         packet-ripng.c \
108         packet-ripng.h \
109         packet-rsvp.c  \
110         packet-rsvp.h  \
111         packet-rtsp.c  \
112         packet-rx.c  \
113         packet-rx.h  \
114         packet-sdp.c   \
115         packet-smb.c   \
116         packet-sna.c   \
117         packet-sna.h   \
118         packet-stat.c   \
119         packet-stat.h   \
120         packet-tcp.c   \
121         packet-telnet.c\
122         packet-tftp.c  \
123         packet-tr.c    \
124         packet-trmac.c \
125         packet-udp.c   \
126         packet-vines.c \
127         packet-vines.h \
128         packet-vlan.c \
129         packet-x25.c   \
130         packet-yhoo.c  \
131         packet-yhoo.h  \
132         packet-ypbind.c \
133         packet-ypbind.h \
134         packet-ypserv.c \
135         packet-ypserv.h \
136         packet-ypxfr.c \
137         packet-ypxfr.h 
138
139 ethereal_SOURCES = \
140         alignment.h    \
141         capture.c      \
142         capture.h      \
143         colors.c       \
144         colors.h       \
145         column.c       \
146         column.h       \
147         conversation.c \
148         conversation.h \
149         dfilter-int.h  \
150         dfilter-grammar.y \
151         dfilter-scanner.l \
152         dfilter.c      \
153         dfilter.h      \
154         ethertype.c    \
155         etypes.h       \
156         file.c         \
157         file.h         \
158         follow.c       \
159         follow.h       \
160         globals.h      \
161         inet_v6defs.h  \
162         ipproto.c      \
163         packet.c       \
164         packet.h       \
165         prefs.c        \
166         prefs.h        \
167         print.c        \
168         print.h        \
169         proto.c        \
170         proto.h        \
171         ps.c           \
172         ps.h           \
173         register.c     \
174         register.h     \
175         resolv.c       \
176         resolv.h       \
177         smb.h          \
178         summary.c      \
179         summary.h      \
180         timestamp.h    \
181         util.c         \
182         util.h         \
183         xdlc.c         \
184         xdlc.h         \
185         $(DISSECTOR_SOURCES)
186
187 EXTRA_ethereal_SOURCES = \
188         dfilter-grammar.c \
189         dfilter-grammar.h \
190         dfilter-scanner.c \
191         packet-snmp.c   \
192         snprintf.c      \
193         snprintf.h      \
194         snprintf-imp.h  \
195         strerror.c      \
196         strerror.h      \
197         strncasecmp.c   \
198         mkstemp.c       \
199         inet_aton.c     \
200         inet_pton.c     \
201         inet_ntop.c
202
203 ethereal_DEPENDENCIES = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
204 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
205 wiretap/libwiretap.a gtk/libui.a
206 ethereal_LDADD = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
207 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
208 wiretap/libwiretap.a gtk/libui.a \
209 @SNMP_A@
210
211 #
212 # Build "register.c", which contains a function "register_all_protocols()"
213 # that calls the register routines for all protocols.
214 #
215 # We do this by grepping through sources.  If that turns out to be too slow,
216 # maybe we could just require every .o file to have an register routine
217 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
218 #
219 # Formatting conventions:  The name of the proto_register_* routines must
220 # start in column zero, or must be preceded only by "void " starting in
221 # column zero, and must not be inside #if.
222 #
223 # We assume that all dissector routines are in "packet-XXX.c" files,
224 # or in "packet.c".
225 #
226 # For some unknown reason, having a big "for" loop in the Makefile
227 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
228 # they seem to pass only the first few names in the list to the shell,
229 # for some reason.
230 #
231 # Therefore, we have a script to generate the "register.c" file.
232 #
233 # The first argument is the directory in which the source files live.
234 # All subsequent arguments are the files to scan.
235 #
236 register.c: packet.c $(DISSECTOR_SOURCES) @SNMP_C@
237         @echo Making register.c
238         @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES) @SNMP_C@
239
240 ps.c: print.ps rdps
241         ./rdps $(srcdir)/print.ps ps.c
242
243 rdps: rdps.c
244         $(CC) -o rdps $(srcdir)/rdps.c
245
246 randpkt.o: randpkt.c
247         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
248
249 randpkt: randpkt.o wiretap/libwiretap.a
250         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
251
252 DISTCLEANFILES =        \
253         register.c      \
254         rdps            \
255         ps.c            \
256         *~
257
258 EXTRA_DIST = \
259         config.h.win32          \
260         doc/Makefile.in         \
261         doc/Makefile.am         \
262         doc/dfilter2pod.in      \
263         doc/ethereal.pod.template \
264         doc/randpkt.txt         \
265         ethereal.spec.in         \
266         image/icon-excl.xpm     \
267         image/icon-ethereal.xpm \
268         Makefile.nmake          \
269         make-reg-dotc           \
270         manuf                   \
271         print.ps                \
272         README.irix             \
273         README.linux            \
274         README.tru64            \
275         README.win32            \
276         randpkt.c               \
277         rdps.c
278
279 #
280 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
281 # its contents depend on the configuration, and therefore we want it
282 # to be built when the first "make" is done; however, Automake insists
283 # on putting *all* source into the distribution.
284 #
285 # We work around this by having a "disk-hook" rule that deletes
286 # "register.c", so that "dist" won't pick it up.
287 #
288 dist-hook:
289         @rm -f $(distdir)/register.c
290
291 SUBDIRS = wiretap gtk @ethereal_SUBDIRS@
292
293 ethereal.1: ethereal doc/ethereal.pod.template
294         (cd doc ; \
295         $(MAKE) ../ethereal.1 )
296
297 dfilter-scanner.c : dfilter-scanner.l
298         $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c