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