0740a0a4108e14fc58293b16ec552dc67be4f4d2
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.110 1999/11/17 23:31:22 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-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         snprintf.c      \
200         snprintf.h      \
201         snprintf-imp.h  \
202         strerror.c      \
203         strerror.h      \
204         strncasecmp.c   \
205         mkstemp.c       \
206         inet_aton.c     \
207         inet_pton.c     \
208         inet_ntop.c
209
210 ethereal_DEPENDENCIES = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
211 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
212 wiretap/libwiretap.a gtk/libui.a
213 ethereal_LDADD = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
214 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
215 wiretap/libwiretap.a gtk/libui.a \
216 @SNMP_A@
217
218 #
219 # Build "register.c", which contains a function "register_all_protocols()"
220 # that calls the register routines for all protocols.
221 #
222 # We do this by grepping through sources.  If that turns out to be too slow,
223 # maybe we could just require every .o file to have an register routine
224 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
225 #
226 # Formatting conventions:  The name of the proto_register_* routines must
227 # start in column zero, or must be preceded only by "void " starting in
228 # column zero, and must not be inside #if.
229 #
230 # We assume that all dissector routines are in "packet-XXX.c" files,
231 # or in "packet.c".
232 #
233 # For some unknown reason, having a big "for" loop in the Makefile
234 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
235 # they seem to pass only the first few names in the list to the shell,
236 # for some reason.
237 #
238 # Therefore, we have a script to generate the "register.c" file.
239 #
240 # The first argument is the directory in which the source files live.
241 # All subsequent arguments are the files to scan.
242 #
243 register.c: packet.c $(DISSECTOR_SOURCES) @SNMP_C@
244         @echo Making register.c
245         @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES) @SNMP_C@
246
247 ps.c: print.ps rdps
248         ./rdps $(srcdir)/print.ps ps.c
249
250 rdps: rdps.c
251         $(CC) -o rdps $(srcdir)/rdps.c
252
253 randpkt.o: randpkt.c
254         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
255
256 randpkt: randpkt.o wiretap/libwiretap.a
257         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
258
259 DISTCLEANFILES =        \
260         register.c      \
261         rdps            \
262         ps.c            \
263         *~
264
265 EXTRA_DIST = \
266         config.h.win32          \
267         doc/Makefile.in         \
268         doc/Makefile.am         \
269         doc/dfilter2pod.in      \
270         doc/ethereal.pod.template \
271         doc/randpkt.txt         \
272         ethereal.spec.in         \
273         image/icon-excl.xpm     \
274         image/icon-ethereal.xpm \
275         Makefile.nmake          \
276         make-reg-dotc           \
277         manuf                   \
278         print.ps                \
279         README.irix             \
280         README.linux            \
281         README.tru64            \
282         README.win32            \
283         randpkt.c               \
284         rdps.c
285
286 #
287 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
288 # its contents depend on the configuration, and therefore we want it
289 # to be built when the first "make" is done; however, Automake insists
290 # on putting *all* source into the distribution.
291 #
292 # We work around this by having a "disk-hook" rule that deletes
293 # "register.c", so that "dist" won't pick it up.
294 #
295 dist-hook:
296         @rm -f $(distdir)/register.c
297
298 SUBDIRS = wiretap gtk @ethereal_SUBDIRS@
299
300 ethereal.1: ethereal doc/ethereal.pod.template
301         (cd doc ; \
302         $(MAKE) ../ethereal.1 )
303
304 dfilter-scanner.c : dfilter-scanner.l
305         $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c