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