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