Take the "simple_dialog()" stuff out of "ui_util.h" and "gtk/ui_util.c",
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.142 2000/01/03 06:59:06 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 ## 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-lapb.c  \
97         packet-lapd.c  \
98         packet-ldap.c  \
99         packet-llc.c   \
100         packet-lpd.c   \
101         packet-mapi.c  \
102         packet-mount.c \
103         packet-mount.h \
104         packet-nbipx.c \
105         packet-nbns.c  \
106         packet-ncp.c   \
107         packet-ncp.h   \
108         packet-netbios.c \
109         packet-netbios.h \
110         packet-nfs.c   \
111         packet-nfs.h   \
112         packet-nlm.c   \
113         packet-nlm.h   \
114         packet-nntp.c  \
115         packet-ntp.c  \
116         packet-ntp.h  \
117         packet-null.c  \
118         packet-osi.c   \
119         packet-ospf.c  \
120         packet-ospf.h  \
121         packet-pim.c   \
122         packet-pop.c   \
123         packet-portmap.c   \
124         packet-portmap.h   \
125         packet-ppp.c   \
126         packet-pppoe.c \
127         packet-pptp.c  \
128         packet-q2931.c \
129         packet-q931.c  \
130         packet-q931.h  \
131         packet-radius.c\
132         packet-raw.c   \
133         packet-rip.c   \
134         packet-rip.h   \
135         packet-ripng.c \
136         packet-ripng.h \
137         packet-rpc.c   \
138         packet-rpc.h   \
139         packet-rsvp.c  \
140         packet-rsvp.h  \
141         packet-rtsp.c  \
142         packet-rx.c  \
143         packet-rx.h  \
144         packet-sap.c   \
145         packet-sdp.c   \
146         packet-smb.c   \
147         packet-sna.c   \
148         packet-sna.h   \
149         packet-snmp.c   \
150         packet-snmp.h   \
151         packet-srvloc.c \
152         packet-sscop.c \
153         packet-stat.c   \
154         packet-stat.h   \
155         packet-tacacs.c \
156         packet-tcp.c   \
157         packet-telnet.c\
158         packet-tftp.c  \
159         packet-tns.c \
160         packet-tns.h \
161         packet-tr.c    \
162         packet-trmac.c \
163         packet-udp.c   \
164         packet-v120.c \
165         packet-vines.c \
166         packet-vines.h \
167         packet-vlan.c \
168         packet-vrrp.c \
169         packet-wccp.c\
170         packet-who.c\
171         packet-x25.c   \
172         packet-yhoo.c  \
173         packet-yhoo.h  \
174         packet-ypbind.c \
175         packet-ypbind.h \
176         packet-ypserv.c \
177         packet-ypserv.h \
178         packet-ypxfr.c \
179         packet-ypxfr.h 
180
181 ethereal_SOURCES = \
182         alignment.h    \
183         asn1.c         \
184         asn1.h         \
185         capture.c      \
186         capture.h      \
187         colors.c       \
188         colors.h       \
189         column.c       \
190         column.h       \
191         conversation.c \
192         conversation.h \
193         dfilter-int.h  \
194         dfilter-grammar.y \
195         dfilter-scanner.l \
196         dfilter.c      \
197         dfilter.h      \
198         ethertype.c    \
199         etypes.h       \
200         file.c         \
201         file.h         \
202         follow.c       \
203         follow.h       \
204         globals.h      \
205         inet_v6defs.h  \
206         ipproto.c      \
207         ipv4.c         \
208         ipv4.h         \
209         menu.h         \
210         oui.h          \
211         packet.c       \
212         packet.h       \
213         plugins.c      \
214         plugins.h      \
215         prefs.c        \
216         prefs.h        \
217         print.c        \
218         print.h        \
219         proto.c        \
220         proto.h        \
221         ps.c           \
222         ps.h           \
223         register.c     \
224         register.h     \
225         resolv.c       \
226         resolv.h       \
227         simple_dialog.h \
228         smb.h          \
229         summary.c      \
230         summary.h      \
231         timestamp.h    \
232         util.c         \
233         util.h         \
234         ui_util.h      \
235         xdlc.c         \
236         xdlc.h         \
237         $(DISSECTOR_SOURCES)
238
239 EXTRA_ethereal_SOURCES = \
240         dfilter-grammar.c \
241         dfilter-grammar.h \
242         dfilter-scanner.c \
243         snprintf.c      \
244         snprintf.h      \
245         snprintf-imp.h  \
246         strerror.c      \
247         strerror.h      \
248         strncasecmp.c   \
249         mkstemp.c       \
250         inet_aton.c     \
251         inet_pton.c     \
252         inet_ntop.c
253
254 ethereal_DEPENDENCIES = @SNPRINTF_O@ @STRERROR_O@ \
255         @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
256         wiretap/libwiretap.a gtk/libui.a \
257         @LIBLTDL@ \
258         plugins/gryphon/gryphon.la
259 ethereal_LDADD = @SNPRINTF_O@ @STRERROR_O@ \
260         @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
261         wiretap/libwiretap.a gtk/libui.a \
262         @SNMP_A@ \
263         @LIBLTDL@ "-dlopen" self \
264         "-dlopen" plugins/gryphon/gryphon.la
265 ethereal_LDFLAGS = -export-dynamic
266
267
268 #
269 # Build "register.c", which contains a function "register_all_protocols()"
270 # that calls the register routines for all protocols.
271 #
272 # We do this by grepping through sources.  If that turns out to be too slow,
273 # maybe we could just require every .o file to have an register routine
274 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
275 #
276 # Formatting conventions:  The name of the proto_register_* routines must
277 # start in column zero, or must be preceded only by "void " starting in
278 # column zero, and must not be inside #if.
279 #
280 # We assume that all dissector routines are in "packet-XXX.c" files,
281 # or in "packet.c".
282 #
283 # For some unknown reason, having a big "for" loop in the Makefile
284 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
285 # they seem to pass only the first few names in the list to the shell,
286 # for some reason.
287 #
288 # Therefore, we have a script to generate the "register.c" file.
289 #
290 # The first argument is the directory in which the source files live.
291 # All subsequent arguments are the files to scan.
292 #
293 register.c: packet.c $(DISSECTOR_SOURCES)
294         @echo Making register.c
295         @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
296
297 ps.c: print.ps rdps
298         ./rdps $(srcdir)/print.ps ps.c
299
300 rdps: rdps.c
301         $(CC) -o rdps $(srcdir)/rdps.c
302
303 editcap.o: editcap.c
304         $(COMPILE) -c $(srcdir)/editcap.c
305
306 editcap: editcap.o wiretap/libwiretap.a
307         $(LINK) -o editcap editcap.o wiretap/libwiretap.a `glib-config --libs` -lz
308
309 randpkt.o: randpkt.c
310         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
311
312 randpkt: randpkt.o wiretap/libwiretap.a
313         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
314
315 DISTCLEANFILES =        \
316         register.c      \
317         rdps            \
318         ps.c            \
319         *~
320
321 EXTRA_DIST = \
322         config.h.win32          \
323         doc/Makefile.in         \
324         doc/Makefile.am         \
325         doc/dfilter2pod.in      \
326         doc/ethereal.pod.template \
327         doc/proto_tree          \
328         doc/randpkt.txt         \
329         editcap.c               \
330         ethereal.spec.in         \
331         image/ethereal48x48-trans.png  \
332         image/ethereal48x48.png \
333         image/icon-excl.xpm     \
334         image/icon-ethereal.xpm \
335         INSTALL.configure       \
336         Makefile.nmake          \
337         make-reg-dotc           \
338         manuf                   \
339         print.ps                \
340         README.aix              \
341         README.hpux             \
342         README.irix             \
343         README.linux            \
344         README.tru64            \
345         README.win32            \
346         randpkt.c               \
347         rdps.c                  \
348         TODO
349
350 #
351 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
352 # its contents depend on the configuration, and therefore we want it
353 # to be built when the first "make" is done; however, Automake insists
354 # on putting *all* source into the distribution.
355 #
356 # We work around this by having a "dist-hook" rule that deletes
357 # "register.c", so that "dist" won't pick it up.
358 #
359 dist-hook:
360         @rm -f $(distdir)/register.c
361
362 SUBDIRS = wiretap gtk plugins libltdl @ethereal_SUBDIRS@
363
364 ethereal.1: ethereal doc/ethereal.pod.template
365         (cd doc ; \
366         $(MAKE) ../ethereal.1 )
367
368 dfilter-scanner.c : dfilter-scanner.l
369         $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c
370
371 INCLUDES = -I$(srcdir)/libltdl
372
373 libtool: $(LIBTOOL_DEPS)
374         $(SHELL) ./config.status --recheck