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