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