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