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