Move the declarations of the routines in "gtk/file_dlg.c" out of
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.164 2000/02/11 03:17:42 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 EXTRA_PROGRAMS = ethereal_static
26 bin_PROGRAMS = ethereal editcap tethereal
27
28 man_MANS = ethereal.1 editcap.1 tethereal.1
29
30 sysconf_DATA = manuf
31
32 # Any POSIX-compatible YACC should honor the -p flag
33 YFLAGS=-d -p dfilter_
34
35 DISSECTOR_SOURCES = \
36         packet-aarp.c  \
37         packet-afs.c   \
38         packet-afs.h   \
39         packet-arp.c   \
40         packet-arp.h   \
41         packet-ascend.c\
42         packet-atalk.c \
43         packet-atalk.h \
44         packet-atm.c   \
45         packet-auto_rp.c   \
46         packet-bgp.c   \
47         packet-bgp.h   \
48         packet-bootp.c \
49         packet-bootparams.c \
50         packet-bootparams.h \
51         packet-bpdu.c  \
52         packet-cdp.c   \
53         packet-cgmp.c  \
54         packet-clip.c  \
55         packet-data.c  \
56         packet-dns.c   \
57         packet-dns.h   \
58         packet-eth.c   \
59         packet-fddi.c  \
60         packet-ftp.c   \
61         packet-giop.c  \
62         packet-gre.c   \
63         packet-hsrp.c  \
64         packet-http.c  \
65         packet-icmpv6.c\
66         packet-icp.c   \
67         packet-icq.c   \
68         packet-imap.c   \
69         packet-ip.c    \
70         packet-ip.h    \
71         packet-ipp.c   \
72         packet-ipsec.c \
73         packet-ipv6.c  \
74         packet-ipv6.h  \
75         packet-ipx.c   \
76         packet-ipx.h   \
77         packet-irc.c   \
78         packet-isakmp.c\
79         packet-isis.h  \
80         packet-isis.c  \
81         packet-isis-clv.h \
82         packet-isis-clv.c \
83         packet-isis-hello.h \
84         packet-isis-hello.c \
85         packet-isis-lsp.h \
86         packet-isis-lsp.c \
87         packet-isis-snp.h \
88         packet-isis-snp.c \
89         packet-isl.c   \
90         packet-l2tp.c  \
91         packet-lapb.c  \
92         packet-lapd.c  \
93         packet-ldap.c  \
94         packet-llc.c   \
95         packet-lpd.c   \
96         packet-mapi.c  \
97         packet-mount.c \
98         packet-mount.h \
99         packet-nbipx.c \
100         packet-nbns.c  \
101         packet-ncp.c   \
102         packet-ncp.h   \
103         packet-netbios.c \
104         packet-netbios.h \
105         packet-nfs.c   \
106         packet-nfs.h   \
107         packet-nlm.c   \
108         packet-nlm.h   \
109         packet-nntp.c  \
110         packet-ntp.c  \
111         packet-ntp.h  \
112         packet-null.c  \
113         packet-osi.c   \
114         packet-ospf.c  \
115         packet-ospf.h  \
116         packet-pim.c   \
117         packet-pop.c   \
118         packet-portmap.c   \
119         packet-portmap.h   \
120         packet-ppp.c   \
121         packet-pppoe.c \
122         packet-pptp.c  \
123         packet-q2931.c \
124         packet-q931.c  \
125         packet-q931.h  \
126         packet-radius.c\
127         packet-raw.c   \
128         packet-rip.c   \
129         packet-rip.h   \
130         packet-ripng.c \
131         packet-ripng.h \
132         packet-rpc.c   \
133         packet-rpc.h   \
134         packet-rsvp.c  \
135         packet-rsvp.h  \
136         packet-rtsp.c  \
137         packet-rx.c  \
138         packet-rx.h  \
139         packet-sap.c   \
140         packet-sdp.c   \
141         packet-smb.c   \
142         packet-sna.c   \
143         packet-sna.h   \
144         packet-snmp.c   \
145         packet-snmp.h   \
146         packet-srvloc.c \
147         packet-sscop.c \
148         packet-stat.c   \
149         packet-stat.h   \
150         packet-tacacs.c \
151         packet-tcp.c   \
152         packet-telnet.c\
153         packet-tftp.c  \
154         packet-time.c  \
155         packet-tns.c \
156         packet-tns.h \
157         packet-tr.c    \
158         packet-trmac.c \
159         packet-udp.c   \
160         packet-v120.c \
161         packet-vines.c \
162         packet-vines.h \
163         packet-vlan.c \
164         packet-vrrp.c \
165         packet-vtp.c  \
166         packet-wccp.c\
167         packet-who.c\
168         packet-x25.c   \
169         packet-yhoo.c  \
170         packet-yhoo.h  \
171         packet-ypbind.c \
172         packet-ypbind.h \
173         packet-ypserv.c \
174         packet-ypserv.h \
175         packet-ypxfr.c \
176         packet-ypxfr.h 
177
178 ETHEREAL_COMMON_SOURCES = \
179         alignment.h    \
180         asn1.c         \
181         asn1.h         \
182         column.c       \
183         column.h       \
184         conversation.c \
185         conversation.h \
186         dfilter-int.h  \
187         dfilter-grammar.y \
188         dfilter-scanner.l \
189         dfilter.c      \
190         dfilter.h      \
191         ethertype.c    \
192         etypes.h       \
193         follow.c       \
194         follow.h       \
195         inet_v6defs.h  \
196         ipproto.c      \
197         ipv4.c         \
198         ipv4.h         \
199         nlpid.h        \
200         oui.h          \
201         packet.c       \
202         packet.h       \
203         plugins.c      \
204         plugins.h      \
205         prefs.c        \
206         prefs.h        \
207         print.c        \
208         print.h        \
209         proto.c        \
210         proto.h        \
211         ps.c           \
212         ps.h           \
213         register.c     \
214         register.h     \
215         resolv.c       \
216         resolv.h       \
217         smb.h          \
218         timestamp.h    \
219         util.c         \
220         util.h         \
221         xdlc.c         \
222         xdlc.h
223
224 ethereal_SOURCES = \
225         $(DISSECTOR_SOURCES) \
226         $(ETHEREAL_COMMON_SOURCES) \
227         capture.c      \
228         capture.h      \
229         colors.c       \
230         colors.h       \
231         file.c         \
232         file.h         \
233         globals.h      \
234         menu.h         \
235         simple_dialog.h \
236         summary.c      \
237         summary.h      \
238         ui_util.h
239
240 ethereal_static_SOURCES = \
241         $(ethereal_SOURCES)
242
243 EXTRA_ethereal_SOURCES = \
244         dfilter-grammar.c \
245         dfilter-grammar.h \
246         dfilter-scanner.c \
247         snprintf.c      \
248         snprintf.h      \
249         snprintf-imp.h  \
250         strerror.c      \
251         strerror.h      \
252         strncasecmp.c   \
253         mkstemp.c       \
254         mkstemp.h       \
255         inet_aton.c     \
256         inet_pton.c     \
257         inet_ntop.c
258
259 # Optional objects that I know how to build. These will be
260 # linked into the ethereal executable.
261 # They will also be linked into the tethereal executable; if this
262 # list ever grows to include something that can't be linked with
263 # tethereal, or if tethereal needs something that ethereal doesn't,
264 # we should probably split this into stuff needed both
265 # by ethereal and tethereal and stuff needed only by one or the
266 # other.
267 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
268         @STRNCASECMP_O@ @MKSTEMP_O@ \
269         @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ 
270
271 # Additional libs that I know how to build. These will be
272 # linked into the ethereal executable.
273 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a
274
275 # This is the automake dependency variable for the executable
276 ethereal_DEPENDENCIES = \
277         $(ethereal_optional_objects)    \
278         $(ethereal_additional_libs)     \
279         plugins/gryphon/gryphon.la
280
281 ethereal_static_DEPENDENCIES = \
282         $(ethereal_optional_objects)    \
283         $(ethereal_additional_libs)
284
285 # This automake variable adds to the link-line for the executable.
286 #
287 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
288 # they are included in @GTK_LIBS@, and doesn't have to be linked with
289 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
290 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
291 # applications are X applications).
292 ethereal_LDADD = \
293         $(ethereal_optional_objects)    \
294         $(ethereal_additional_libs)     \
295         @SNMP_LIBS@                     \
296         "-dlopen" self  \
297         "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@
298
299 ethereal_static_LDADD = \
300         $(ethereal_optional_objects)    \
301         $(ethereal_additional_libs) \
302         @SNMP_LIBS@                     \
303         @PCAP_LIBS@ @GTK_LIBS@
304
305 ethereal_LDFLAGS = -export-dynamic
306 ethereal_static_LDFLAGS = -Wl,-static
307
308 tethereal_SOURCES = \
309         $(DISSECTOR_SOURCES) \
310         $(ETHEREAL_COMMON_SOURCES) \
311         tethereal.c
312
313 # Additional libs that I know how to build. These will be
314 # linked into the tethereal executable.
315 tethereal_additional_libs = wiretap/libwiretap.a
316
317 # This is the automake dependency variable for the executable
318 tethereal_DEPENDENCIES = \
319         $(ethereal_optional_objects)    \
320         $(tethereal_additional_libs)    \
321         plugins/gryphon/gryphon.la
322
323 # This automake variable adds to the link-line for the executable
324 tethereal_LDADD = wiretap/libwiretap.a  \
325         $(ethereal_optional_objects)    \
326         $(tethereal_additional_libs)    \
327         @SNMP_LIBS@                     \
328         "-dlopen" self  \
329         "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
330         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
331
332 tethereal_LDFLAGS = -export-dynamic
333
334 editcap_SOURCES = editcap.c
335
336 # This is the automake dependency variable for the executable
337 editcap_DEPENDENCIES = wiretap/libwiretap.a
338
339 # This automake variable adds to the link-line for the executable
340 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
341
342 #
343 # Build "register.c", which contains a function "register_all_protocols()"
344 # that calls the register routines for all protocols.
345 #
346 # We do this by grepping through sources.  If that turns out to be too slow,
347 # maybe we could just require every .o file to have an register routine
348 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
349 #
350 # Formatting conventions:  The name of the proto_register_* routines must
351 # start in column zero, or must be preceded only by "void " starting in
352 # column zero, and must not be inside #if.
353 #
354 # We assume that all dissector routines are in "packet-XXX.c" files,
355 # or in "packet.c".
356 #
357 # For some unknown reason, having a big "for" loop in the Makefile
358 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
359 # they seem to pass only the first few names in the list to the shell,
360 # for some reason.
361 #
362 # Therefore, we have a script to generate the "register.c" file.
363 #
364 # The first argument is the directory in which the source files live.
365 # All subsequent arguments are the files to scan.
366 #
367 register.c: packet.c $(DISSECTOR_SOURCES)
368         @echo Making register.c
369         @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
370
371 ps.c: print.ps rdps
372         ./rdps $(srcdir)/print.ps ps.c
373
374 rdps: rdps.c
375         $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
376
377 randpkt.o: randpkt.c
378         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
379
380 randpkt: randpkt.o wiretap/libwiretap.a
381         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
382
383 DISTCLEANFILES =        \
384         register.c      \
385         rdps            \
386         ps.c            \
387         *~
388
389 EXTRA_DIST = \
390         config.h.win32          \
391         debian/README.debian    \
392         debian/changelog        \
393         debian/control          \
394         debian/copyright        \
395         debian/dirs             \
396         debian/docs             \
397         debian/menu             \
398         debian/postinst         \
399         debian/prerm            \
400         debian/rules            \
401         doc/Makefile.in         \
402         doc/Makefile.am         \
403         doc/dfilter2pod.in      \
404         doc/editcap.pod         \
405         doc/ethereal.pod.template \
406         doc/proto_tree          \
407         doc/randpkt.txt         \
408         doc/tethereal.pod.template \
409         editcap.c               \
410         ethereal.spec.in         \
411         image/ethereal48x48-trans.png  \
412         image/ethereal48x48.png \
413         image/icon-excl.xpm     \
414         image/icon-ethereal.xpm \
415         INSTALL.configure       \
416         Makefile.nmake          \
417         make-reg-dotc           \
418         manuf                   \
419         print.ps                \
420         README.aix              \
421         README.hpux             \
422         README.irix             \
423         README.linux            \
424         README.tru64            \
425         README.vmware           \
426         README.win32            \
427         randpkt.c               \
428         rdps.c                  \
429         TODO
430
431 if SETUID_INSTALL
432 install-exec-hook:
433         -chmod +s $(DESTDIR)$(bindir)/ethereal
434         -chmod +s $(DESTDIR)$(bindir)/tethereal
435         -chmod +s $(DESTDIR)$(bindir)/ethereal_static
436 endif
437
438 #
439 # Currently register.c can be included in the distribution because
440 # we always build all protocol dissectors. We used to have to check
441 # whether or not to build the snmp dissector. If we again need to
442 # variably build something, making register.c non-portable, uncomment
443 # the dist-hook line below.
444 #
445 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
446 # its contents depend on the configuration, and therefore we want it
447 # to be built when the first "make" is done; however, Automake insists
448 # on putting *all* source into the distribution.
449 #
450 # We work around this by having a "dist-hook" rule that deletes
451 # "register.c", so that "dist" won't pick it up.
452 #
453 #dist-hook:
454 #       @rm -f $(distdir)/register.c
455
456 SUBDIRS = wiretap gtk plugins @ethereal_SUBDIRS@
457
458 ethereal.1: ethereal doc/ethereal.pod.template
459         (cd doc ; \
460         $(MAKE) ../ethereal.1 )
461
462 tethereal.1: tethereal doc/tethereal.pod.template
463         (cd doc ; \
464         $(MAKE) ../tethereal.1 )
465
466 editcap.1: doc/editcap.pod
467         (cd doc ; \
468         $(MAKE) ../editcap.1 )
469
470 dfilter-scanner.c : dfilter-scanner.l
471         $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c
472
473 libtool: $(LIBTOOL_DEPS)
474         $(SHELL) ./config.status --recheck