0x2000, for CDP, doesn't appear to be an Ethernet type - it's not
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.149 2000/01/13 00:41:10 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 editcap
26
27 man_MANS = ethereal.1 editcap.1
28
29 sysconf_DATA = manuf
30
31 # Any POSIX-compatible YACC should honor the -p flag
32 YFLAGS=-d -p dfilter_
33
34 ## use @LIBLTDL@ because some broken makes do not accept macros in targets
35 ## we can only do this because our LIBLTDL does not contain ${top_builddir}
36 @LIBLTDL@: libtool libltdl/libtool libltdl/config.h \
37         $(srcdir)/libltdl/ltdl.c $(srcdir)/libltdl/ltdl.h
38         (cd libltdl; $(MAKE) `echo $(LIBLTDL) | sed 's,.*\.\./libltdl/,,g'`)
39 # Without the following line, the check may fail if libltdl/libtool is
40 # removed after libltdl is configured
41 libltdl/libtool libltdl/config.h:
42
43 DISSECTOR_SOURCES = \
44         packet-aarp.c  \
45         packet-afs.c   \
46         packet-afs.h   \
47         packet-arp.c   \
48         packet-arp.h   \
49         packet-ascend.c\
50         packet-atalk.c \
51         packet-atalk.h \
52         packet-atm.c   \
53         packet-auto_rp.c   \
54         packet-bgp.c   \
55         packet-bgp.h   \
56         packet-bootp.c \
57         packet-bootparams.c \
58         packet-bootparams.h \
59         packet-bpdu.c  \
60         packet-cdp.c   \
61         packet-clip.c  \
62         packet-data.c  \
63         packet-dns.c   \
64         packet-dns.h   \
65         packet-eth.c   \
66         packet-fddi.c  \
67         packet-ftp.c   \
68         packet-giop.c  \
69         packet-gre.c   \
70         packet-hsrp.c  \
71         packet-http.c  \
72         packet-icmpv6.c\
73         packet-icp.c   \
74         packet-icq.c   \
75         packet-imap.c   \
76         packet-ip.c    \
77         packet-ip.h    \
78         packet-ipp.c   \
79         packet-ipsec.c \
80         packet-ipv6.c  \
81         packet-ipv6.h  \
82         packet-ipx.c   \
83         packet-ipx.h   \
84         packet-irc.c   \
85         packet-isakmp.c\
86         packet-isis.h  \
87         packet-isis.c  \
88         packet-isis-clv.h \
89         packet-isis-clv.c \
90         packet-isis-hello.h \
91         packet-isis-hello.c \
92         packet-isis-lsp.h \
93         packet-isis-lsp.c \
94         packet-isis-snp.h \
95         packet-isis-snp.c \
96         packet-l2tp.c  \
97         packet-lapb.c  \
98         packet-lapd.c  \
99         packet-ldap.c  \
100         packet-llc.c   \
101         packet-lpd.c   \
102         packet-mapi.c  \
103         packet-mount.c \
104         packet-mount.h \
105         packet-nbipx.c \
106         packet-nbns.c  \
107         packet-ncp.c   \
108         packet-ncp.h   \
109         packet-netbios.c \
110         packet-netbios.h \
111         packet-nfs.c   \
112         packet-nfs.h   \
113         packet-nlm.c   \
114         packet-nlm.h   \
115         packet-nntp.c  \
116         packet-ntp.c  \
117         packet-ntp.h  \
118         packet-null.c  \
119         packet-osi.c   \
120         packet-ospf.c  \
121         packet-ospf.h  \
122         packet-pim.c   \
123         packet-pop.c   \
124         packet-portmap.c   \
125         packet-portmap.h   \
126         packet-ppp.c   \
127         packet-pppoe.c \
128         packet-pptp.c  \
129         packet-q2931.c \
130         packet-q931.c  \
131         packet-q931.h  \
132         packet-radius.c\
133         packet-raw.c   \
134         packet-rip.c   \
135         packet-rip.h   \
136         packet-ripng.c \
137         packet-ripng.h \
138         packet-rpc.c   \
139         packet-rpc.h   \
140         packet-rsvp.c  \
141         packet-rsvp.h  \
142         packet-rtsp.c  \
143         packet-rx.c  \
144         packet-rx.h  \
145         packet-sap.c   \
146         packet-sdp.c   \
147         packet-smb.c   \
148         packet-sna.c   \
149         packet-sna.h   \
150         packet-snmp.c   \
151         packet-snmp.h   \
152         packet-srvloc.c \
153         packet-sscop.c \
154         packet-stat.c   \
155         packet-stat.h   \
156         packet-tacacs.c \
157         packet-tcp.c   \
158         packet-telnet.c\
159         packet-tftp.c  \
160         packet-tns.c \
161         packet-tns.h \
162         packet-tr.c    \
163         packet-trmac.c \
164         packet-udp.c   \
165         packet-v120.c \
166         packet-vines.c \
167         packet-vines.h \
168         packet-vlan.c \
169         packet-vrrp.c \
170         packet-wccp.c\
171         packet-who.c\
172         packet-x25.c   \
173         packet-yhoo.c  \
174         packet-yhoo.h  \
175         packet-ypbind.c \
176         packet-ypbind.h \
177         packet-ypserv.c \
178         packet-ypserv.h \
179         packet-ypxfr.c \
180         packet-ypxfr.h 
181
182 ethereal_SOURCES = \
183         alignment.h    \
184         asn1.c         \
185         asn1.h         \
186         capture.c      \
187         capture.h      \
188         colors.c       \
189         colors.h       \
190         column.c       \
191         column.h       \
192         conversation.c \
193         conversation.h \
194         dfilter-int.h  \
195         dfilter-grammar.y \
196         dfilter-scanner.l \
197         dfilter.c      \
198         dfilter.h      \
199         ethertype.c    \
200         etypes.h       \
201         file.c         \
202         file.h         \
203         follow.c       \
204         follow.h       \
205         globals.h      \
206         inet_v6defs.h  \
207         ipproto.c      \
208         ipv4.c         \
209         ipv4.h         \
210         menu.h         \
211         nlpid.h        \
212         oui.h          \
213         packet.c       \
214         packet.h       \
215         plugins.c      \
216         plugins.h      \
217         prefs.c        \
218         prefs.h        \
219         print.c        \
220         print.h        \
221         proto.c        \
222         proto.h        \
223         ps.c           \
224         ps.h           \
225         register.c     \
226         register.h     \
227         resolv.c       \
228         resolv.h       \
229         simple_dialog.h \
230         smb.h          \
231         summary.c      \
232         summary.h      \
233         timestamp.h    \
234         util.c         \
235         util.h         \
236         ui_util.h      \
237         xdlc.c         \
238         xdlc.h         \
239         $(DISSECTOR_SOURCES)
240
241 EXTRA_ethereal_SOURCES = \
242         dfilter-grammar.c \
243         dfilter-grammar.h \
244         dfilter-scanner.c \
245         snprintf.c      \
246         snprintf.h      \
247         snprintf-imp.h  \
248         strerror.c      \
249         strerror.h      \
250         strncasecmp.c   \
251         mkstemp.c       \
252         inet_aton.c     \
253         inet_pton.c     \
254         inet_ntop.c
255
256 # Optional objects that I know how to build. These will be
257 # linked into the ethereal executable.
258 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@  @STRNCASECMP_O@ @MKSTEMP_O@ \
259         @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ 
260
261 # Additional libs that I know how to build. These will be
262 # linked into the ethereal executable.
263 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a
264
265 # This is the automake dependency variable for the executable
266 ethereal_DEPENDENCIES = \
267         $(ethereal_optional_objects)    \
268         $(ethereal_additional_libs)     \
269         @LIBLTDL@
270         plugins/gryphon/gryphon.la
271
272 # This automake variable adds to the link-line for the executable
273 ethereal_LDADD = \
274         $(ethereal_optional_objects)    \
275         $(ethereal_additional_libs)     \
276         @SNMP_A@                        \
277         @LIBLTDL@ "-dlopen" self        \
278         "-dlopen" plugins/gryphon/gryphon.la @GTK_LIBS@
279
280 ethereal_LDFLAGS = -export-dynamic
281
282 editcap_SOURCES = editcap.c
283 editcap_DEPENDENCIES = wiretap/libwiretap.a
284 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
285
286 #
287 # Build "register.c", which contains a function "register_all_protocols()"
288 # that calls the register routines for all protocols.
289 #
290 # We do this by grepping through sources.  If that turns out to be too slow,
291 # maybe we could just require every .o file to have an register routine
292 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
293 #
294 # Formatting conventions:  The name of the proto_register_* routines must
295 # start in column zero, or must be preceded only by "void " starting in
296 # column zero, and must not be inside #if.
297 #
298 # We assume that all dissector routines are in "packet-XXX.c" files,
299 # or in "packet.c".
300 #
301 # For some unknown reason, having a big "for" loop in the Makefile
302 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
303 # they seem to pass only the first few names in the list to the shell,
304 # for some reason.
305 #
306 # Therefore, we have a script to generate the "register.c" file.
307 #
308 # The first argument is the directory in which the source files live.
309 # All subsequent arguments are the files to scan.
310 #
311 register.c: packet.c $(DISSECTOR_SOURCES)
312         @echo Making register.c
313         @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
314
315 ps.c: print.ps rdps
316         ./rdps $(srcdir)/print.ps ps.c
317
318 rdps: rdps.c
319         $(CC) -o rdps $(srcdir)/rdps.c
320
321 randpkt.o: randpkt.c
322         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
323
324 randpkt: randpkt.o wiretap/libwiretap.a
325         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
326
327 DISTCLEANFILES =        \
328         register.c      \
329         rdps            \
330         ps.c            \
331         *~
332
333 EXTRA_DIST = \
334         config.h.win32          \
335         doc/Makefile.in         \
336         doc/Makefile.am         \
337         doc/dfilter2pod.in      \
338         doc/ethereal.pod.template \
339         doc/proto_tree          \
340         doc/randpkt.txt         \
341         editcap.c               \
342         ethereal.spec.in         \
343         image/ethereal48x48-trans.png  \
344         image/ethereal48x48.png \
345         image/icon-excl.xpm     \
346         image/icon-ethereal.xpm \
347         INSTALL.configure       \
348         Makefile.nmake          \
349         make-reg-dotc           \
350         manuf                   \
351         print.ps                \
352         README.aix              \
353         README.hpux             \
354         README.irix             \
355         README.linux            \
356         README.tru64            \
357         README.vmware           \
358         README.win32            \
359         randpkt.c               \
360         rdps.c                  \
361         TODO
362
363 #
364 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
365 # its contents depend on the configuration, and therefore we want it
366 # to be built when the first "make" is done; however, Automake insists
367 # on putting *all* source into the distribution.
368 #
369 # We work around this by having a "dist-hook" rule that deletes
370 # "register.c", so that "dist" won't pick it up.
371 #
372 dist-hook:
373         @rm -f $(distdir)/register.c
374
375 SUBDIRS = wiretap gtk plugins libltdl @ethereal_SUBDIRS@
376
377 ethereal.1: ethereal doc/ethereal.pod.template
378         (cd doc ; \
379         $(MAKE) ../ethereal.1 )
380
381 editcap.1: doc/editcap.pod
382         (cd doc ; \
383         $(MAKE) ../editcap.1 )
384
385 dfilter-scanner.c : dfilter-scanner.l
386         $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c
387
388 INCLUDES = -I$(srcdir)/libltdl
389
390 libtool: $(LIBTOOL_DEPS)
391         $(SHELL) ./config.status --recheck