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