ILMI is just SNMP-over-ATM AAL5; if the SNMP dissector is available,
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.111 1999/11/18 07:29:53 guy 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-bgp.h   \
45         packet-bootp.c \
46         packet-bootparams.c \
47         packet-bootparams.h \
48         packet-bpdu.c  \
49         packet-cdp.c   \
50         packet-clip.c  \
51         packet-data.c  \
52         packet-dns.c   \
53         packet-dns.h   \
54         packet-eth.c   \
55         packet-fddi.c  \
56         packet-ftp.c   \
57         packet-giop.c  \
58         packet-gre.c   \
59         packet-http.c  \
60         packet-icmpv6.c\
61         packet-icp.c   \
62         packet-icq.c   \
63         packet-imap.c   \
64         packet-ip.c    \
65         packet-ip.h    \
66         packet-ipp.c   \
67         packet-ipsec.c \
68         packet-ipv6.c  \
69         packet-ipv6.h  \
70         packet-ipx.c   \
71         packet-ipx.h   \
72         packet-isakmp.c\
73         packet-lapb.c  \
74         packet-lapd.c  \
75         packet-llc.c   \
76         packet-lpd.c   \
77         packet-mapi.c  \
78         packet-mount.c \
79         packet-mount.h \
80         packet-nbipx.c \
81         packet-nbns.c  \
82         packet-ncp.c   \
83         packet-ncp.h   \
84         packet-netbios.c \
85         packet-netbios.h \
86         packet-nfs.c   \
87         packet-nfs.h   \
88         packet-nlm.c   \
89         packet-nlm.h   \
90         packet-nntp.c  \
91         packet-ntp.c  \
92         packet-ntp.h  \
93         packet-null.c  \
94         packet-osi.c   \
95         packet-ospf.c  \
96         packet-ospf.h  \
97         packet-pim.c   \
98         packet-pop.c   \
99         packet-portmap.c   \
100         packet-portmap.h   \
101         packet-ppp.c   \
102         packet-pppoe.c \
103         packet-pptp.c  \
104         packet-q931.c   \
105         packet-radius.c\
106         packet-raw.c   \
107         packet-rpc.c   \
108         packet-rpc.h   \
109         packet-rip.c   \
110         packet-rip.h   \
111         packet-ripng.c \
112         packet-ripng.h \
113         packet-rsvp.c  \
114         packet-rsvp.h  \
115         packet-rtsp.c  \
116         packet-rx.c  \
117         packet-rx.h  \
118         packet-sap.c   \
119         packet-sdp.c   \
120         packet-smb.c   \
121         packet-sna.c   \
122         packet-sna.h   \
123         packet-stat.c   \
124         packet-stat.h   \
125         packet-tcp.c   \
126         packet-telnet.c\
127         packet-tftp.c  \
128         packet-tr.c    \
129         packet-trmac.c \
130         packet-udp.c   \
131         packet-vines.c \
132         packet-vines.h \
133         packet-vlan.c \
134         packet-x25.c   \
135         packet-yhoo.c  \
136         packet-yhoo.h  \
137         packet-ypbind.c \
138         packet-ypbind.h \
139         packet-ypserv.c \
140         packet-ypserv.h \
141         packet-ypxfr.c \
142         packet-ypxfr.h 
143
144 ethereal_SOURCES = \
145         alignment.h    \
146         capture.c      \
147         capture.h      \
148         colors.c       \
149         colors.h       \
150         column.c       \
151         column.h       \
152         conversation.c \
153         conversation.h \
154         dfilter-int.h  \
155         dfilter-grammar.y \
156         dfilter-scanner.l \
157         dfilter.c      \
158         dfilter.h      \
159         ethertype.c    \
160         etypes.h       \
161         file.c         \
162         file.h         \
163         follow.c       \
164         follow.h       \
165         globals.h      \
166         inet_v6defs.h  \
167         ipproto.c      \
168         ipv4.c         \
169         ipv4.h         \
170         packet.c       \
171         packet.h       \
172         prefs.c        \
173         prefs.h        \
174         print.c        \
175         print.h        \
176         proto.c        \
177         proto.h        \
178         ps.c           \
179         ps.h           \
180         register.c     \
181         register.h     \
182         resolv.c       \
183         resolv.h       \
184         smb.h          \
185         summary.c      \
186         summary.h      \
187         timestamp.h    \
188         util.c         \
189         util.h         \
190         xdlc.c         \
191         xdlc.h         \
192         $(DISSECTOR_SOURCES)
193
194 EXTRA_ethereal_SOURCES = \
195         dfilter-grammar.c \
196         dfilter-grammar.h \
197         dfilter-scanner.c \
198         packet-snmp.c   \
199         packet-snmp.h   \
200         snprintf.c      \
201         snprintf.h      \
202         snprintf-imp.h  \
203         strerror.c      \
204         strerror.h      \
205         strncasecmp.c   \
206         mkstemp.c       \
207         inet_aton.c     \
208         inet_pton.c     \
209         inet_ntop.c
210
211 ethereal_DEPENDENCIES = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
212 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
213 wiretap/libwiretap.a gtk/libui.a
214 ethereal_LDADD = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
215 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
216 wiretap/libwiretap.a gtk/libui.a \
217 @SNMP_A@
218
219 #
220 # Build "register.c", which contains a function "register_all_protocols()"
221 # that calls the register routines for all protocols.
222 #
223 # We do this by grepping through sources.  If that turns out to be too slow,
224 # maybe we could just require every .o file to have an register routine
225 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
226 #
227 # Formatting conventions:  The name of the proto_register_* routines must
228 # start in column zero, or must be preceded only by "void " starting in
229 # column zero, and must not be inside #if.
230 #
231 # We assume that all dissector routines are in "packet-XXX.c" files,
232 # or in "packet.c".
233 #
234 # For some unknown reason, having a big "for" loop in the Makefile
235 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
236 # they seem to pass only the first few names in the list to the shell,
237 # for some reason.
238 #
239 # Therefore, we have a script to generate the "register.c" file.
240 #
241 # The first argument is the directory in which the source files live.
242 # All subsequent arguments are the files to scan.
243 #
244 register.c: packet.c $(DISSECTOR_SOURCES) @SNMP_C@
245         @echo Making register.c
246         @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES) @SNMP_C@
247
248 ps.c: print.ps rdps
249         ./rdps $(srcdir)/print.ps ps.c
250
251 rdps: rdps.c
252         $(CC) -o rdps $(srcdir)/rdps.c
253
254 randpkt.o: randpkt.c
255         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
256
257 randpkt: randpkt.o wiretap/libwiretap.a
258         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
259
260 DISTCLEANFILES =        \
261         register.c      \
262         rdps            \
263         ps.c            \
264         *~
265
266 EXTRA_DIST = \
267         config.h.win32          \
268         doc/Makefile.in         \
269         doc/Makefile.am         \
270         doc/dfilter2pod.in      \
271         doc/ethereal.pod.template \
272         doc/randpkt.txt         \
273         ethereal.spec.in         \
274         image/icon-excl.xpm     \
275         image/icon-ethereal.xpm \
276         Makefile.nmake          \
277         make-reg-dotc           \
278         manuf                   \
279         print.ps                \
280         README.irix             \
281         README.linux            \
282         README.tru64            \
283         README.win32            \
284         randpkt.c               \
285         rdps.c
286
287 #
288 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
289 # its contents depend on the configuration, and therefore we want it
290 # to be built when the first "make" is done; however, Automake insists
291 # on putting *all* source into the distribution.
292 #
293 # We work around this by having a "disk-hook" rule that deletes
294 # "register.c", so that "dist" won't pick it up.
295 #
296 dist-hook:
297         @rm -f $(distdir)/register.c
298
299 SUBDIRS = wiretap gtk @ethereal_SUBDIRS@
300
301 ethereal.1: ethereal doc/ethereal.pod.template
302         (cd doc ; \
303         $(MAKE) ../ethereal.1 )
304
305 dfilter-scanner.c : dfilter-scanner.l
306         $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c