Update Laurent Meyer's e-mail address.
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.591 2003/06/13 22:31:11 guy Exp $
5 #
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@ethereal.com>
8 # Copyright 1998 Gerald Combs
9 #
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23
24 ACLOCAL_AMFLAGS = `./aclocal-flags`
25
26 #
27 # This is a hideous hack.
28 #
29 # Automake needs to know into which sections to install various man
30 # pages; if the names in "man_MANS" have suffixes, it can infer the
31 # sections from the name (e.g., "hello.1" goes in section 1), but if
32 # they don't have suffixes, it can't tell what sections to put them, and
33 # it just gives up and doesn't create any rules to install them (and it
34 # gives up silently, so you have no clue what's wrong).
35 #
36 # Therefore, we can't just set "man_MANS" to a list of variables to be
37 # filled in by the configure script, as those variables don't have man
38 # page section numbers.
39 #
40 # It turns out (although this is not documented anywhere I could find
41 # in the automake Info file) that if you define, instead, variables with
42 # names like "man{section}_MANS", automake will infer that the names in
43 # those variables are the names of man pages to be installed in section
44 # "{section}".
45 #
46 # So, as all our man pages go in section 1, we define "man1_MANS" to
47 # contain all the man page.
48 #
49 # *However*, if "man_MANS" isn't defined at all, automake concludes that
50 # there are no man pages, the fact that, say, "man1_MANS" is defined
51 # nonwithstanding!  (I suspect this is the result of a mistaken attempt
52 # to get people to fix their automake files not to use "MANS"; if "MANS"
53 # is defined, it prints a warning and sets the exit status, but doesn't
54 # exit, and then it just gives up if "man_MANS" isn't defined,
55 # presumably on the theory that the only reason it wouldn't be defined
56 # is because the automake file uses the obsolete "MANS" variable instead
57 # of the shiny new "man_MANS" variable.)
58 #
59 # So we also define "man_MANS", but don't define it as anything;
60 # automake will arrange that the Makefile define it as the union of all
61 # the "man{section}_MANS" variables.
62 #
63 bin_PROGRAMS = @ethereal_bin@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@
64 bin_SCRIPTS = @idl2eth_bin@
65 man1_MANS = @ethereal_man@ @editcap_man@ @mergecap_man@ @tethereal_man@ @text2pcap_man@ @idl2eth_man@
66 man_MANS =
67
68 EXTRA_PROGRAMS = ethereal tethereal editcap mergecap dftest text2pcap
69 EXTRA_SCRIPTS = idl2eth
70
71 #
72 # Ethereal configuration files are put in $(pkgdatadir).  It currently
73 # contains the "manuf" file and a "diameter" directory.
74 #
75 pkgdata_DATA = manuf
76
77 #
78 # Install the Diameter DTD and XML files in the "diameter" subdirectory
79 # of that directory.
80 #
81 diameterdir = $(pkgdatadir)/diameter
82 diameter_DATA = dictionary.dtd dictionary.xml mobileipv4.xml \
83         nasreq.xml sunping.xml
84
85 DISSECTOR_SRC = \
86         packet-aarp.c  \
87         packet-acap.c  \
88         packet-afp.c   \
89         packet-afs.c   \
90         packet-aim.c   \
91         packet-ajp13.c          \
92         packet-ans.c   \
93         packet-aodv.c  \
94         packet-arcnet.c \
95         packet-arp.c   \
96         packet-asap.c  \
97         packet-ascend.c\
98         packet-asf.c   \
99         packet-atalk.c \
100         packet-atm.c   \
101         packet-auto_rp.c   \
102         packet-bacapp.c   \
103         packet-bacnet.c   \
104         packet-beep.c \
105         packet-bgp.c   \
106         packet-bofl.c  \
107         packet-bootp.c \
108         packet-bootparams.c \
109         packet-bpdu.c  \
110         packet-brdwlk.c \
111         packet-bvlc.c \
112         packet-cdp.c   \
113         packet-cgmp.c  \
114         packet-chdlc.c  \
115         packet-clearcase.c  \
116         packet-clip.c  \
117         packet-clnp.c  \
118         packet-cops.c  \
119         packet-cosine.c  \
120         packet-cpha.c  \
121         packet-cups.c  \
122         packet-data.c  \
123         packet-dccp.c \
124         packet-dcerpc.c  \
125         packet-dcerpc-afs4int.c  \
126         packet-dcerpc-atsvc.c \
127         packet-dcerpc-bossvr.c  \
128         packet-dcerpc-browser.c  \
129         packet-dcerpc-cds_clerkserver.c  \
130         packet-dcerpc-cds_solicit.c  \
131         packet-dcerpc-conv.c  \
132         packet-dcerpc-cprpc_server.c  \
133         packet-dcerpc-dce122.c \
134         packet-dcerpc-dfs.c \
135         packet-dcerpc-dnsserver.c \
136         packet-dcerpc-dtsprovider.c \
137         packet-dcerpc-dtsstime_req.c \
138         packet-dcerpc-epm.c  \
139         packet-dcerpc-fldb.c  \
140         packet-dcerpc-ftserver.c \
141         packet-dcerpc-krb5rpc.c \
142         packet-dcerpc-lsa.c \
143         packet-dcerpc-lsa-ds.c \
144         packet-dcerpc-mapi.c  \
145         packet-dcerpc-mgmt.c  \
146         packet-dcerpc-ndr.c  \
147         packet-dcerpc-netlogon.c \
148         packet-dcerpc-nspi.c \
149         packet-dcerpc-oxid.c  \
150         packet-dcerpc-reg.c \
151         packet-dcerpc-remact.c  \
152         packet-dcerpc-rep_proc.c  \
153         packet-dcerpc-roverride.c  \
154         packet-dcerpc-rpriv.c  \
155         packet-dcerpc-rs_acct.c  \
156         packet-dcerpc-rs_attr.c  \
157         packet-dcerpc-rs_misc.c  \
158         packet-dcerpc-rs_pgo.c  \
159         packet-dcerpc-rs_repadm.c  \
160         packet-dcerpc-rs_replist.c  \
161         packet-dcerpc-rs_unix.c  \
162         packet-dcerpc-rsec_login.c  \
163         packet-dcerpc-samr.c \
164         packet-dcerpc-secidmap.c \
165         packet-dcerpc-spoolss.c \
166         packet-dcerpc-srvsvc.c \
167         packet-dcerpc-svcctl.c \
168         packet-dcerpc-tapi.c \
169         packet-dcerpc-tkn4int.c \
170         packet-dcerpc-ubikdisk.c \
171         packet-dcerpc-ubikvote.c \
172         packet-dcerpc-update.c \
173         packet-dcerpc-wkssvc.c \
174         packet-ddtp.c  \
175         packet-dec-bpdu.c \
176         packet-dhcpv6.c \
177         packet-diameter.c \
178         packet-distcc.c \
179         packet-dlsw.c  \
180         packet-dns.c   \
181         packet-dsi.c   \
182         packet-dvmrp.c \
183         packet-eap.c \
184         packet-eapol.c \
185         packet-eigrp.c \
186         packet-enc.c    \
187         packet-enip.c   \
188         packet-esis.c  \
189         packet-eth.c   \
190         packet-etherip.c        \
191         packet-ethertype.c   \
192         packet-fc.c \
193         packet-fcct.c \
194         packet-fcdns.c \
195         packet-fcels.c \
196         packet-fcfcs.c \
197         packet-fcfzs.c \
198         packet-fcip.c \
199         packet-fclctl.c \
200         packet-fcp.c \
201         packet-fcswils.c \
202         packet-fddi.c  \
203         packet-fix.c  \
204         packet-fr.c    \
205         packet-frame.c  \
206         packet-ftp.c   \
207         packet-fw1.c   \
208         packet-giop.c  \
209         packet-gmrp.c \
210         packet-gnutella.c \
211         packet-gre.c   \
212         packet-gssapi.c \
213         packet-gtp.c   \
214         packet-gvrp.c  \
215         packet-h1.c    \
216         packet-h261.c  \
217         packet-hclnfsd.c  \
218         packet-hpext.c \
219         packet-hsrp.c  \
220         packet-http.c  \
221         packet-hyperscsi.c \
222         packet-iapp.c  \
223         packet-ib.c  \
224         packet-icap.c  \
225         packet-icmpv6.c\
226         packet-icp.c   \
227         packet-icq.c   \
228         packet-ieee80211.c \
229         packet-ieee8023.c \
230         packet-igmp.c  \
231         packet-igrp.c  \
232         packet-imap.c   \
233         packet-ip.c    \
234         packet-ipfc.c    \
235         packet-ipmi.c  \
236         packet-ipp.c   \
237         packet-ipsec.c \
238         packet-ipv6.c  \
239         packet-ipx.c   \
240         packet-ipxwan.c \
241         packet-irc.c   \
242         packet-isakmp.c\
243         packet-iscsi.c \
244         packet-isdn.c \
245         packet-isis.c  \
246         packet-isis-clv.c \
247         packet-isis-hello.c \
248         packet-isis-lsp.c \
249         packet-isis-snp.c \
250         packet-isl.c   \
251         packet-isns.c \
252         packet-isup.c  \
253         packet-iua.c   \
254         packet-kadm5.c \
255         packet-kerberos.c \
256         packet-klm.c   \
257         packet-l2tp.c  \
258         packet-lapb.c  \
259         packet-lapbether.c \
260         packet-lapd.c  \
261         packet-ldap.c  \
262         packet-ldp.c   \
263         packet-llc.c   \
264         packet-lmi.c   \
265         packet-lmp.c   \
266         packet-lpd.c   \
267         packet-m2pa.c  \
268         packet-m2tp.c  \
269         packet-m2ua.c  \
270         packet-m3ua.c  \
271         packet-mbtcp.c \
272         packet-mdshdr.c \
273         packet-mip.c  \
274         packet-mip6.c  \
275         packet-mmse.c  \
276         packet-mount.c \
277         packet-mpeg1.c  \
278         packet-mpls.c \
279         packet-mrdisc.c \
280         packet-msdp.c  \
281         packet-msn-messenger.c \
282         packet-msnip.c \
283         packet-msproxy.c \
284         packet-mtp2.c \
285         packet-mtp3.c \
286         packet-mtp3mg.c \
287         packet-mysql.c \
288         packet-nbipx.c \
289         packet-nbns.c  \
290         packet-ncp.c   \
291         packet-ncp2222.c   \
292         packet-ndmp.c  \
293         packet-ndps.c  \
294         packet-netbios.c \
295         packet-netflow.c \
296         packet-nfs.c   \
297         packet-nfsacl.c \
298         packet-nfsauth.c \
299         packet-nisplus.c \
300         packet-nlm.c   \
301         packet-nlsp.c  \
302         packet-nntp.c  \
303         packet-ntlmssp.c  \
304         packet-ntp.c  \
305         packet-null.c  \
306         packet-osi.c   \
307         packet-osi-options.c \
308         packet-ospf.c  \
309         packet-pcnfsd.c \
310         packet-pflog.c \
311         packet-pgm.c   \
312         packet-pim.c   \
313         packet-pop.c   \
314         packet-portmap.c   \
315         packet-ppp.c   \
316         packet-pppoe.c \
317         packet-pptp.c  \
318         packet-prism.c \
319         packet-q2931.c \
320         packet-q931.c  \
321         packet-qllc.c  \
322         packet-quake.c \
323         packet-quake2.c \
324         packet-quake3.c \
325         packet-quakeworld.c \
326         packet-radius.c\
327         packet-ranap.c \
328         packet-raw.c   \
329         packet-rip.c   \
330         packet-ripng.c \
331         packet-rlogin.c \
332         packet-rmcp.c  \
333         packet-rmi.c \
334         packet-rmp.c   \
335         packet-rpc.c   \
336         packet-rpl.c   \
337         packet-rquota.c \
338         packet-rsh.c   \
339         packet-rstat.c \
340         packet-rsvp.c  \
341         packet-rsync.c \
342         packet-rtcp.c  \
343         packet-rtp.c   \
344         packet-rtsp.c  \
345         packet-rwall.c \
346         packet-rx.c  \
347         packet-sadmind.c \
348         packet-sap.c   \
349         packet-sccp.c  \
350         packet-sccpmg.c  \
351         packet-scsi.c  \
352         packet-sctp.c  \
353         packet-sdlc.c  \
354         packet-sdp.c   \
355         packet-sflow.c \
356         packet-sip.c   \
357         packet-skinny.c   \
358         packet-slimp3.c   \
359         packet-sll.c   \
360         packet-slowprotocols.c \
361         packet-smb.c   \
362         packet-smb-browse.c \
363         packet-smb-common.c \
364         packet-smb-logon.c \
365         packet-smb-mailslot.c \
366         packet-smb-pipe.c \
367         packet-smb-sidsnooping.c \
368         packet-smpp.c \
369         packet-smtp.c \
370         packet-sna.c   \
371         packet-snaeth.c \
372         packet-snmp.c   \
373         packet-socks.c \
374         packet-spnego.c \
375         packet-spray.c \
376         packet-srvloc.c \
377         packet-sscop.c \
378         packet-ssh.c   \
379         packet-ssl.c   \
380         packet-stat.c   \
381         packet-stat-notify.c \
382         packet-sua.c   \
383         packet-syslog.c \
384         packet-tacacs.c \
385         packet-tcp.c   \
386         packet-tds.c   \
387         packet-telnet.c\
388         packet-tftp.c  \
389         packet-time.c  \
390         packet-tns.c \
391         packet-tpkt.c  \
392         packet-tr.c    \
393         packet-trmac.c \
394         packet-tsp.c \
395         packet-tzsp.c  \
396         packet-ucp.c   \
397         packet-udp.c   \
398         packet-v120.c \
399         packet-vines.c \
400         packet-vj.c   \
401         packet-vlan.c \
402         packet-vrrp.c \
403         packet-vtp.c  \
404         packet-wap.c \
405         packet-wbxml.c \
406         packet-wccp.c \
407         packet-wcp.c \
408         packet-wfleet-hdlc.c \
409         packet-who.c  \
410         packet-wlancap.c \
411         packet-wsp.c \
412         packet-wtls.c \
413         packet-wtp.c \
414         packet-x11.c   \
415         packet-x25.c   \
416         packet-x29.c   \
417         packet-xdmcp.c \
418         packet-xot.c   \
419         packet-xyplex.c   \
420         packet-yhoo.c  \
421         packet-ymsg.c  \
422         packet-ypbind.c \
423         packet-yppasswd.c \
424         packet-ypserv.c \
425         packet-ypxfr.c \
426         packet-zebra.c
427
428 if HAVE_PLUGINS
429 plugin_libs = \
430         plugins/artnet/artnet.la \
431         plugins/docsis/docsis.la \
432         plugins/giop/cosnaming.la \
433         plugins/giop/coseventcomm.la \
434         plugins/gryphon/gryphon.la \
435         plugins/megaco/megaco.la \
436         plugins/mgcp/mgcp.la \
437         plugins/pcli/pcli.la \
438         plugins/rtnet/rtnet.la 
439
440 if ENABLE_STATIC
441 plugin_ldadd = \
442         plugins/artnet/packet-artnet-static.o \
443         plugins/docsis/packet-bpkmattr-static.o \
444         plugins/docsis/packet-bpkmreq-static.o \
445         plugins/docsis/packet-bpkmrsp-static.o \
446         plugins/docsis/packet-docsis-static.o \
447         plugins/docsis/packet-dsaack-static.o \
448         plugins/docsis/packet-dsareq-static.o \
449         plugins/docsis/packet-dsarsp-static.o \
450         plugins/docsis/packet-dscack-static.o \
451         plugins/docsis/packet-dscreq-static.o \
452         plugins/docsis/packet-dscrsp-static.o \
453         plugins/docsis/packet-dsdreq-static.o \
454         plugins/docsis/packet-dsdrsp-static.o \
455         plugins/docsis/packet-macmgmt-static.o \
456         plugins/docsis/packet-map-static.o \
457         plugins/docsis/packet-regack-static.o \
458         plugins/docsis/packet-regreq-static.o \
459         plugins/docsis/packet-regrsp-static.o \
460         plugins/docsis/packet-rngreq-static.o \
461         plugins/docsis/packet-rngrsp-static.o \
462         plugins/docsis/packet-tlv-static.o \
463         plugins/docsis/packet-uccreq-static.o \
464         plugins/docsis/packet-uccrsp-static.o \
465         plugins/docsis/packet-ucd-static.o \
466         plugins/giop/packet-cosnaming-static.o \
467         plugins/giop/packet-coseventcomm-static.o \
468         plugins/gryphon/packet-gryphon-static.o \
469         plugins/megaco/packet-megaco-static.o \
470         plugins/mgcp/packet-mgcp-static.o \
471         plugins/pcli/packet-pcli-static.o \
472         plugins/rtnet/packet-rtnet-static.o 
473
474 plugin_src = \
475         plugins/artnet/packet-artnet.c \
476         plugins/docsis/packet-bpkmattr.c \
477         plugins/docsis/packet-bpkmreq.c \
478         plugins/docsis/packet-bpkmrsp.c \
479         plugins/docsis/packet-docsis.c \
480         plugins/docsis/packet-dsaack.c \
481         plugins/docsis/packet-dsareq.c \
482         plugins/docsis/packet-dsarsp.c \
483         plugins/docsis/packet-dscack.c \
484         plugins/docsis/packet-dscreq.c \
485         plugins/docsis/packet-dscrsp.c \
486         plugins/docsis/packet-dsdreq.c \
487         plugins/docsis/packet-dsdrsp.c \
488         plugins/docsis/packet-macmgmt.c \
489         plugins/docsis/packet-map.c \
490         plugins/docsis/packet-regack.c \
491         plugins/docsis/packet-regreq.c \
492         plugins/docsis/packet-regrsp.c \
493         plugins/docsis/packet-rngreq.c \
494         plugins/docsis/packet-rngrsp.c \
495         plugins/docsis/packet-tlv.c \
496         plugins/docsis/packet-uccreq.c \
497         plugins/docsis/packet-uccrsp.c \
498         plugins/docsis/packet-ucd.c \
499         plugins/giop/packet-cosnaming.c \
500         plugins/giop/packet-coseventcomm.c \
501         plugins/gryphon/packet-gryphon.c \
502         plugins/megaco/packet-megaco.c \
503         plugins/mgcp/packet-mgcp.c \
504         plugins/pcli/packet-pcli.c \
505         plugins/rtnet/packet-rtnet.c 
506
507 else            # ENABLE_STATIC
508 plugin_ldadd = \
509         "-dlopen" self  \
510         "-dlopen" plugins/artnet/artnet.la \
511         "-dlopen" plugins/docsis/docsis.la \
512         "-dlopen" plugins/giop/cosnaming.la \
513         "-dlopen" plugins/giop/coseventcomm.la \
514         "-dlopen" plugins/gryphon/gryphon.la \
515         "-dlopen" plugins/megaco/megaco.la \
516         "-dlopen" plugins/mgcp/mgcp.la \
517         "-dlopen" plugins/pcli/pcli.la \
518         "-dlopen" plugins/rtnet/rtnet.la 
519
520 plugin_src =
521
522 endif           # ENABLE_STATIC
523
524 else            # HAVE_PLUGINS
525 plugin_src =
526
527 plugin_libs =
528
529 plugin_ldadd =
530 endif           # HAVE_PLUGINS
531
532 noinst_HEADERS = \
533         packet-afp.h   \
534         packet-afs-defs.h \
535         packet-afs-macros.h \
536         packet-afs-register-info.h \
537         packet-afs.h   \
538         packet-arcnet.h \
539         packet-arp.h   \
540         packet-atalk.h \
541         packet-atm.h   \
542         packet-bgp.h   \
543         packet-bootparams.h \
544         packet-chdlc.h \
545         packet-clearcase.h  \
546         packet-clip.h  \
547         packet-data.h \
548         packet-dccp.h \
549         packet-dcerpc-atsvc.h \
550         packet-dcerpc-browser.h \
551         packet-dcerpc-dce122.h \
552         packet-dcerpc-dfs.h \
553         packet-dcerpc-dnsserver.h \
554         packet-dcerpc-lsa.h \
555         packet-dcerpc-mapi.h \
556         packet-dcerpc-netlogon.h \
557         packet-dcerpc-nt.h \
558         packet-dcerpc-reg.h \
559         packet-dcerpc-samr.h \
560         packet-dcerpc-spoolss.h \
561         packet-dcerpc-srvsvc.h \
562         packet-dcerpc-svcctl.h \
563         packet-dcerpc-tapi.h \
564         packet-dcerpc-wkssvc.h \
565         packet-dcerpc.h \
566         packet-ddtp.h  \
567         packet-diameter-defs.h \
568         packet-dns.h   \
569         packet-dvmrp.h \
570         packet-esis.h  \
571         packet-eth.h   \
572         packet-fc.h \
573         packet-fcbls.h \
574         packet-fcct.h \
575         packet-fcdns.h \
576         packet-fcels.h \
577         packet-fcfcs.h \
578         packet-fcfzs.h \
579         packet-fclctl.h \
580         packet-fcp.h \
581         packet-fcswils.h \
582         packet-fddi.h  \
583         packet-frame.h  \
584         packet-giop.h  \
585         packet-gnutella.h \
586         packet-gssapi.h \
587         packet-gtp.h    \
588         packet-hclnfsd.h  \
589         packet-hpext.h  \
590         packet-http.h  \
591         packet-ieee80211.h \
592         packet-ieee8023.h \
593         packet-igmp.h  \
594         packet-ip.h    \
595         packet-ipfc.h  \
596         packet-ipsec.h \
597         packet-ipv6.h  \
598         packet-ipx.h   \
599         packet-isis-clv.h \
600         packet-isis-hello.h \
601         packet-isis-lsp.h \
602         packet-isis-snp.h \
603         packet-isis.h  \
604         packet-isl.h   \
605         packet-kerberos.h \
606         packet-klm.h   \
607         packet-ldap.h  \
608         packet-llc.h   \
609         packet-mip6.h  \
610         packet-mount.h \
611         packet-mrdisc.h \
612         packet-msnip.h \
613         packet-mtp3.h  \
614         packet-ncp-int.h \
615         packet-ndps.h    \
616         packet-netbios.h \
617         packet-nfs.h   \
618         packet-nisplus.h \
619         packet-nlm.h   \
620         packet-ntlmssp.h  \
621         packet-ntp.h  \
622         packet-null.h  \
623         packet-osi-options.h \
624         packet-osi.h   \
625         packet-pcnfsd.h \
626         packet-pflog.h \
627         packet-pim.h   \
628         packet-portmap.h   \
629         packet-ppp.h   \
630         packet-prism.h \
631         packet-q931.h  \
632         packet-raw.h   \
633         packet-ripng.h \
634         packet-rmi.h   \
635         packet-rpc.h   \
636         packet-rquota.h \
637         packet-rsvp.h  \
638         packet-rtcp.h  \
639         packet-rtp.h   \
640         packet-rwall.h  \
641         packet-rx.h  \
642         packet-scsi.h  \
643         packet-sll.h   \
644         packet-smb-browse.h \
645         packet-smb-common.h \
646         packet-smb-logon.h \
647         packet-smb-mailslot.h \
648         packet-smb-pipe.h \
649         packet-smb-sidsnooping.h \
650         packet-sna.h   \
651         packet-snmp.h   \
652         packet-spray.h \
653         packet-stat-notify.h \
654         packet-stat.h   \
655         packet-tcp.h   \
656         packet-tns.h \
657         packet-tpkt.h  \
658         packet-tr.h    \
659         packet-udp.h   \
660         packet-vines.h \
661         packet-vlan.h \
662         packet-wap.h \
663         packet-wccp.h \
664         packet-wlancap.h \
665         packet-wsp.h \
666         packet-wtls.h \
667         packet-wtp.h \
668         packet-x11-keysym.h     \
669         packet-ypbind.h \
670         packet-yppasswd.h \
671         packet-ypserv.h \
672         packet-ypxfr.h
673
674 ETHEREAL_COMMON_SRC = \
675         afn.c          \
676         afn.h          \
677         aftypes.h      \
678         alignment.h    \
679         arcnet_pids.h  \
680         asn1.c         \
681         asn1.h         \
682         bridged_pids.h \
683         capture_stop_conditions.c   \
684         capture_stop_conditions.h   \
685         cfile.c         \
686         cfile.h         \
687         chdlctypes.h   \
688         color.h        \
689         column.c       \
690         column.h       \
691         conditions.c   \
692         conditions.h   \
693         crypt-des.c    \
694         crypt-des.h    \
695         crypt-md4.c    \
696         crypt-md4.h    \
697         crypt-md5.c    \
698         crypt-md5.h    \
699         crypt-rc4.c    \
700         crypt-rc4.h    \
701         packet-dcerpc-nt.c \
702         etypes.h       \
703         file.h         \
704         follow.c       \
705         follow.h       \
706         format-oid.h   \
707         g711.c          \
708         g711.h          \
709         greproto.h     \
710         in_cksum.c     \
711         in_cksum.h     \
712         ipproto.c      \
713         ipproto.h      \
714         llcsaps.h      \
715         nlpid.h        \
716         oui.h          \
717         pcap-util.c    \
718         pcap-util.h    \
719         ppptypes.h     \
720         prefs-int.h    \
721         prefs.c        \
722         prefs.h        \
723         print.c        \
724         print.h        \
725         ps.c           \
726         ps.h           \
727         ptvcursor.c     \
728         ptvcursor.h     \
729         reassemble.c   \
730         reassemble.h   \
731         register.h     \
732         ringbuffer.c   \
733         ringbuffer.h   \
734         rpc_defrag.h   \
735         sctpppids.h    \
736         smb.h          \
737         tap.c           \
738         tap.h           \
739         timestats.c     \
740         timestats.h     \
741         util.c         \
742         util.h         \
743         x11-declarations.h \
744         x11-register-info.h \
745         x264_prt_id.h  \
746         xdlc.c         \
747         xdlc.h         \
748         xmlstub.c      \
749         xmlstub.h
750
751 BUILT_SOURCES = \
752         x11-declarations.h \
753         x11-register-info.h
754
755 ethereal_SOURCES = \
756         $(DISSECTOR_SRC) \
757         $(ETHEREAL_COMMON_SRC) \
758         register.c     \
759         capture.c      \
760         capture.h      \
761         file.c         \
762         filters.c      \
763         filters.h      \
764         globals.h      \
765         menu.h         \
766         progress_dlg.h \
767         proto_hier_stats.h      \
768         proto_hier_stats.c      \
769         simple_dialog.h \
770         statusbar.h    \
771         summary.c      \
772         summary.h      \
773         ui_util.h
774
775 EXTRA_ethereal_SOURCES = \
776         snprintf.c      \
777         snprintf.h      \
778         snprintf-imp.h  \
779         strerror.c      \
780         strerror.h      \
781         strcasecmp.c    \
782         strncasecmp.c   \
783         mkstemp.c       \
784         mkstemp.h       \
785         strptime.c      \
786         strptime.h
787
788 # Optional objects that I know how to build. These will be
789 # linked into the ethereal executable.
790 # They will also be linked into the tethereal executable; if this
791 # list ever grows to include something that can't be linked with
792 # tethereal, or if tethereal needs something that ethereal doesn't,
793 # we should probably split this into stuff needed both
794 # by ethereal and tethereal and stuff needed only by one or the
795 # other.
796 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
797         @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
798
799 # Additional libs that I know how to build. These will be
800 # linked into the ethereal executable.
801 ethereal_additional_libs = \
802         wiretap/libwiretap.a    \
803         gtk/libui.a             \
804         epan/libethereal.a      \
805         epan/ftypes/libftypes.a \
806         epan/dfilter/libdfilter.a
807
808 # This is the automake dependency variable for the executable
809 ethereal_DEPENDENCIES = \
810         $(ethereal_optional_objects)    \
811         $(ethereal_additional_libs)     \
812         $(plugin_libs)
813
814 # This automake variable adds to the link-line for the executable.
815 #
816 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
817 # they are included in @GTK_LIBS@, and doesn't have to be linked with
818 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
819 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
820 # applications are X applications).
821
822 if ENABLE_STATIC
823 ethereal_LDFLAGS = -Wl,-static -all-static
824 else
825 ethereal_LDFLAGS = -export-dynamic
826 endif
827
828 ethereal_LDADD = \
829         $(ethereal_optional_objects)    \
830         $(ethereal_additional_libs)     \
831         @SNMP_LIBS@ @SSL_LIBS@          \
832         $(plugin_ldadd)                 \
833         @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@
834
835 TETHEREAL_TAP_SRC = \
836         tap-dcerpcstat.c        \
837         tap-iostat.c            \
838         tap-iousers.c           \
839         tap-mgcpstat.c          \
840         tap-protocolinfo.c      \
841         tap-protohierstat.c     \
842         tap-rpcstat.c           \
843         tap-rpcprogs.c          \
844         tap-smbsids.c           \
845         tap-smbstat.c
846
847 tethereal_SOURCES = \
848         $(DISSECTOR_SRC) \
849         $(ETHEREAL_COMMON_SRC) \
850         $(TETHEREAL_TAP_SRC) \
851         tethereal-tap-register.c \
852         register.c     \
853         tethereal.c
854
855 # Additional libs that I know how to build. These will be
856 # linked into the tethereal executable.
857 tethereal_additional_libs =             \
858         wiretap/libwiretap.a            \
859         epan/libethereal.a              \
860         epan/ftypes/libftypes.a         \
861         epan/dfilter/libdfilter.a
862
863 # This is the automake dependency variable for the executable
864 tethereal_DEPENDENCIES = \
865         $(ethereal_optional_objects)    \
866         $(tethereal_additional_libs)    \
867         $(plugin_libs)
868
869 # This automake variable adds to the link-line for the executable
870 tethereal_LDADD = \
871         $(ethereal_optional_objects)    \
872         $(tethereal_additional_libs)    \
873         @SNMP_LIBS@ @SSL_LIBS@          \
874         $(plugin_ldadd)                 \
875         @GLIB_LIBS@ -lm                 \
876         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
877
878 if ENABLE_STATIC
879 tethereal_LDFLAGS = -Wl,-static -all-static
880 else
881 tethereal_LDFLAGS = -export-dynamic
882 endif
883
884 # Optional objects that I know how to build, and that are needed by
885 # text2pcap.
886 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
887
888 text2pcap_SOURCES = text2pcap.c text2pcap-scanner.l
889 text2pcap_DEPENDENCIES = text2pcap.h
890
891 # This automake variable adds to the link-line for the executable
892 text2pcap_LDADD = $(text2pcap_optional_objects) \
893         @GLIB_LIBS@ -lm
894
895 mergecap_SOURCES = mergecap.c
896 mergecap_DEPENDENCIES = wiretap/libwiretap.a
897
898 editcap_SOURCES = editcap.c
899
900 # This is the automake dependency variable for the executable
901 editcap_DEPENDENCIES = wiretap/libwiretap.a
902
903 # This automake variable adds to the link-line for the executable
904 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
905 mergecap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
906
907 #
908 # Build various header files for the X11 dissector.
909 #
910 x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
911         $(PERL) $(srcdir)/process-x11-fields.pl <$(srcdir)/x11-fields
912
913 #
914 # Build shell scripts by doing variable substitution.
915 # Taken from autoconf 2.13.
916 #
917 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
918
919 SUFFIXES = .sh
920 .sh:
921         rm -f $@ $@.tmp
922         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
923
924 #
925 # Build "register.c", which contains a function "register_all_protocols()"
926 # that calls the register routines for all protocols.
927 #
928 # We do this by grepping through sources.  If that turns out to be too slow,
929 # maybe we could just require every .o file to have an register routine
930 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
931 #
932 # Formatting conventions:  The name of the proto_register_* routines must
933 # start in column zero, or must be preceded only by "void " starting in
934 # column zero, and must not be inside #if.
935 #
936 # We assume that all dissector routines are in "packet-XXX.c" files.
937 #
938 # For some unknown reason, having a big "for" loop in the Makefile
939 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
940 # they seem to pass only the first few names in the list to the shell,
941 # for some reason.
942 #
943 # Therefore, we have a script to generate the "register.c" file.
944 #
945 # The first argument is the name of the file to write.
946 # The second argument is the directory in which the source files live.
947 # All subsequent arguments are the files to scan.
948 #
949 register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
950         @if test -n $(PYTHON); then \
951                 echo Making register.c with python ; \
952                 $(PYTHON) make-reg-dotc.py . $(DISSECTOR_SRC) ; \
953         else \
954                 echo Making register.c with shell script ; \
955                 $(srcdir)/make-reg-dotc register.c $(srcdir) \
956                         $(plugin_src) $(DISSECTOR_SRC) ; \
957         fi
958
959 #
960 # Build "tethereal-tap-register.c", which contains a function 
961 # "register_all_tap_listeners()"
962 # that calls the register routines for all tehtereal tap listeners.
963 #
964 # We do this by grepping through sources.
965 #
966 # Formatting conventions:  The name of the tap_listener_register_* 
967 # routines must start in column zero, or must be preceded only by 
968 # "void " starting in column zero, and must not be inside #if.
969 #
970 # The first argument is the directory in which the source files live.
971 # All subsequent arguments are the files to scan.
972 #
973 tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) $(srcdir)/make-tapreg-dotc
974         @echo Making tethereal-tap-register.c
975         @$(srcdir)/make-tapreg-dotc tethereal-tap-register.c $(srcdir) $(TETHEREAL_TAP_SRC)
976
977 ps.c: print.ps rdps
978         ./rdps $(srcdir)/print.ps ps.c
979
980 rdps: rdps.c
981         $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
982
983 randpkt.o: randpkt.c
984         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
985
986 randpkt: randpkt.o wiretap/libwiretap.a
987         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
988
989
990 dftest_SOURCES = \
991         $(DISSECTOR_SRC) \
992         $(ETHEREAL_COMMON_SRC) \
993         register.c     \
994         dftest.c
995
996 dftest_additional_libs =                \
997         wiretap/libwiretap.a            \
998         epan/libethereal.a              \
999         epan/ftypes/libftypes.a         \
1000         epan/dfilter/libdfilter.a
1001
1002 dftest_DEPENDENCIES = \
1003         $(ethereal_optional_objects)    \
1004         $(dftest_additional_libs)       \
1005         $(plugin_libs)
1006
1007 # This automake variable adds to the link-line for the executable
1008 dftest_LDADD = \
1009         $(ethereal_optional_objects)    \
1010         $(dftest_additional_libs)       \
1011         @SNMP_LIBS@ @SSL_LIBS@          \
1012         $(plugin_ldadd)                 \
1013         @GLIB_LIBS@ -lm \
1014         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
1015
1016 dftest_LDFLAGS = -export-dynamic
1017
1018 CLEANFILES =    \
1019         idl2eth
1020
1021 DISTCLEANFILES =        \
1022         aclocal-missing/*.m4 \
1023         ps.c            \
1024         rdps            \
1025         *~
1026
1027 MAINTAINERCLEANFILES =          \
1028         register.c              \
1029         ps.c
1030
1031 EXTRA_DIST = \
1032         Ethereal.desktop        \
1033         FAQ                     \
1034         FAQ.include             \
1035         INSTALL.configure       \
1036         Makefile.nmake          \
1037         README.aix              \
1038         README.bsd              \
1039         README.hpux             \
1040         README.irix             \
1041         README.linux            \
1042         README.tru64            \
1043         README.vmware           \
1044         README.win32            \
1045         TODO                    \
1046         aclocal-fallback/glib-2.0.m4 \
1047         aclocal-fallback/glib.m4 \
1048         aclocal-fallback/gtk-2.0.m4 \
1049         aclocal-fallback/gtk.m4 \
1050         aclocal-flags           \
1051         aclocal-missing/dummy   \
1052         autogen.sh              \
1053         capture-wpcap.c         \
1054         capture-wpcap.h         \
1055         cleanbld.bat            \
1056         config.h.win32          \
1057         config.nmake            \
1058         debian/README.debian    \
1059         debian/changelog        \
1060         debian/control          \
1061         debian/copyright        \
1062         debian/dirs             \
1063         debian/docs             \
1064         debian/menu             \
1065         debian/postinst         \
1066         debian/prerm            \
1067         debian/rules            \
1068         dictionary.dtd          \
1069         dictionary.xml          \
1070         doc/Makefile.am         \
1071         doc/Makefile.nmake      \
1072         doc/README.design       \
1073         doc/README.developer    \
1074         doc/README.idl2eth      \
1075         doc/README.plugins      \
1076         doc/README.regression   \
1077         doc/README.tapping      \
1078         doc/README.tvbuff       \
1079         doc/dfilter2pod.pl      \
1080         doc/editcap.pod         \
1081         doc/ethereal.pod.template \
1082         doc/idl2eth.pod         \
1083         doc/mergecap.pod        \
1084         doc/randpkt.txt         \
1085         doc/tethereal.pod.template \
1086         doc/text2pcap.pod       \
1087         editcap.c               \
1088         ethereal_be.py          \
1089         ethereal_gen.py         \
1090         getopt.c                \
1091         getopt.h                \
1092         idl2eth.sh              \
1093         image/Makefile.nmake    \
1094         image/README.image      \
1095         image/clist_ascend.xpm  \
1096         image/clist_descend.xpm \
1097         image/dn_arrow.xpm      \
1098         image/editcap.rc.in     \
1099         image/eexcl3d64.xpm     \
1100         image/eicon3d16.xpm     \
1101         image/eicon3d32.xpm     \
1102         image/eicon3d48.xpm     \
1103         image/eicon3d64.xpm     \
1104         image/elogo3d48x48.png  \
1105         image/ethereal.ico      \
1106         image/ethereal.rc.in    \
1107         image/ethereal48x48-trans.png  \
1108         image/ethereal48x48.png \
1109         image/hi16-app-ethereal.png     \
1110         image/hi32-app-ethereal.png     \
1111         image/hi48-app-ethereal.png     \
1112         image/icon-ethereal.xpm \
1113         image/icon-excl.xpm     \
1114         image/lo16-app-ethereal.png     \
1115         image/lo32-app-ethereal.png     \
1116         image/lo48-app-ethereal.png     \
1117         image/mergecap.rc.in    \
1118         image/nsis-checked.bmp  \
1119         image/nsis-unchecked.bmp        \
1120         image/tethereal.rc.in   \
1121         image/text2pcap.rc.in   \
1122         image/up_arrow.xpm      \
1123         make-manuf              \
1124         make-reg-dotc           \
1125         make-reg-dotc.py        \
1126         make-tapreg-dotc                \
1127         manuf                   \
1128         manuf.tmpl              \
1129         mergecap.c              \
1130         mobileipv4.xml          \
1131         nasreq.xml              \
1132         ncp2222.py              \
1133         packet-ncp2222.inc      \
1134         print.ps                \
1135         process-x11-fields.pl   \
1136         randpkt.c               \
1137         rdps.c                  \
1138         sunping.xml             \
1139         text2pcap-scanner.l     \
1140         text2pcap.c             \
1141         text2pcap.h             \
1142         wka.tmpl                \
1143         x11-fields
1144
1145 if SETUID_INSTALL
1146 install-exec-hook:
1147         -chmod +s $(DESTDIR)$(bindir)/ethereal
1148         -chmod +s $(DESTDIR)$(bindir)/tethereal
1149 else
1150 install-exec-hook:
1151 endif
1152
1153 #
1154 # Currently register.c can be included in the distribution because
1155 # we always build all protocol dissectors. We used to have to check
1156 # whether or not to build the snmp dissector. If we again need to
1157 # variably build something, making register.c non-portable, uncomment
1158 # the dist-hook line below.
1159 #
1160 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
1161 # its contents depend on the configuration, and therefore we want it
1162 # to be built when the first "make" is done; however, Automake insists
1163 # on putting *all* source into the distribution.
1164 #
1165 # We work around this by having a "dist-hook" rule that deletes
1166 # "register.c", so that "dist" won't pick it up.
1167 #
1168 #dist-hook:
1169 #       @rm -f $(distdir)/register.c
1170
1171 DIST_SUBDIRS = tools wiretap doc epan plugins packaging gtk
1172
1173 if HAVE_PLUGINS
1174 SUBDIRS = tools wiretap doc epan plugins packaging @ethereal_SUBDIRS@
1175 else
1176 SUBDIRS = tools wiretap doc epan packaging @ethereal_SUBDIRS@
1177 endif
1178
1179 ethereal.1: ethereal doc/ethereal.pod.template
1180         (cd doc ; \
1181         $(MAKE) ../ethereal.1 )
1182
1183 tethereal.1: tethereal doc/tethereal.pod.template
1184         (cd doc ; \
1185         $(MAKE) ../tethereal.1 )
1186
1187 editcap.1: doc/editcap.pod
1188         (cd doc ; \
1189         $(MAKE) ../editcap.1 )
1190
1191 idl2eth.1: doc/idl2eth.pod
1192         (cd doc ; \
1193         $(MAKE) ../idl2eth.1 )
1194
1195 mergecap.1: doc/mergecap.pod
1196         (cd doc ; \
1197         $(MAKE) ../mergecap.1 )
1198
1199 text2pcap.1: doc/text2pcap.pod
1200         (cd doc ; \
1201         $(MAKE) ../text2pcap.1 )
1202
1203 packet-ncp2222.c : ncp2222.py
1204         $(PYTHON) $(srcdir)/ncp2222.py -o $@
1205
1206 libtool: $(LIBTOOL_DEPS)
1207         $(SHELL) ./config.status --recheck
1208
1209 # We load top_stagedir with an explicit path so that libtool doesn't freak.
1210 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
1211 stagedir=$(top_stagedir)/$(PACKAGE).stage
1212 host_cpu=@host_cpu@
1213 host_os=@host_os@
1214
1215 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
1216         if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1217                 rm -rf $(stagedir) ; \
1218                 $(MAKE) DESTDIR=$(stagedir) install; \
1219                 $(srcdir)/packaging/svr4/mkpkg \
1220                         $(PACKAGE) \
1221                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1222                         $(prefix) \
1223                         $(top_stagedir) ; \
1224         else \
1225                 echo "Error: SVR4 packaging tools not found." ; \
1226                 echo "Package build abandoned." ; \
1227         fi
1228
1229 solaris-package: svr4-package
1230
1231 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
1232 rpm-package: dist
1233         if test x$(HAVE_RPM) = xyes ; then \
1234                 cd $(rpm_topdir) ; \
1235                 mkdir -p BUILD RPMS SOURCES ; \
1236                 cd SOURCES ; \
1237                 ln -s ../../../$(distdir).tar.gz ; \
1238                 cd .. ; \
1239                 rpm --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
1240                         echo "Package successfully built in `pwd`/RPMS." ; \
1241         else \
1242                 echo "Error: RPM executable and/or source directory not found." ; \
1243         fi
1244 srpm-package: dist
1245         if test x$(HAVE_RPM) = xyes ; then \
1246                 cd $(rpm_topdir) ; \
1247                 mkdir -p BUILD SRPMS SOURCES ; \
1248                 cd SOURCES ; \
1249                 ln -s ../../../$(distdir).tar.gz ; \
1250                 cd .. ; \
1251                 rpm --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
1252                         echo "Package successfully built in `pwd`/SRPMS." ; \
1253         else \
1254                 echo "Error: RPM executable and/or source directory not found." ; \
1255         fi
1256
1257 debian-package: debian/rules
1258         dpkg-buildpackage -rfakeroot -us -uc
1259
1260 clean-local:
1261         rm -rf $(top_stagedir)
1262
1263 test-splint: $(ethereal_SOURCES)
1264         splint \
1265                 -gnu-extensions -D_U_=""        \
1266                 -I. `glib-config --cflags` \
1267                 -I./epan \
1268                 -I./tools/lemon \
1269                 -I./wiretap     \
1270                 $(ethereal_SOURCES)