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