18
# Automake file for MATE Ethereal plugin
20
# $Id: Makefile.am 18312 2006-06-02 06:53:30Z jmayer $
22
# Wireshark - Network traffic analyzer
23
# By Gerald Combs <gerald@wireshark.org>
24
# Copyright 1998 Gerald Combs
26
# This program is free software; you can redistribute it and/or
27
# modify it under the terms of the GNU General Public License
28
# as published by the Free Software Foundation; either version 2
29
# of the License, or (at your option) any later version.
31
# This program is distributed in the hope that it will be useful,
32
# but WITHOUT ANY WARRANTY; without even the implied warranty of
33
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
# GNU General Public License for more details.
36
# You should have received a copy of the GNU General Public License
37
# along with this program; if not, write to the Free Software
38
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
# Automake file for MATE Wireshark plugin
20
# $Id: Makefile.am 20224 2006-12-27 12:21:30Z jake $
22
# Wireshark - Network traffic analyzer
23
# By Gerald Combs <gerald@wireshark.org>
24
# Copyright 1998 Gerald Combs
26
# This program is free software; you can redistribute it and/or
27
# modify it under the terms of the GNU General Public License
28
# as published by the Free Software Foundation; either version 2
29
# of the License, or (at your option) any later version.
31
# This program is distributed in the hope that it will be useful,
32
# but WITHOUT ANY WARRANTY; without even the implied warranty of
33
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
# GNU General Public License for more details.
36
# You should have received a copy of the GNU General Public License
37
# along with this program; if not, write to the Free Software
38
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
41
# Makefile.common for mate plugin
42
# Contains the stuff from Makefile.am and Makefile.nmake that is
43
# a) common to both files and
44
# b) portable between both files
46
# $Id: Makefile.common 20176 2006-12-19 22:30:38Z jake $
48
# Wireshark - Network traffic analyzer
49
# By Gerald Combs <gerald@wireshark.org>
50
# Copyright 1998 Gerald Combs
52
# This program is free software; you can redistribute it and/or
53
# modify it under the terms of the GNU General Public License
54
# as published by the Free Software Foundation; either version 2
55
# of the License, or (at your option) any later version.
57
# This program is distributed in the hope that it will be useful,
58
# but WITHOUT ANY WARRANTY; without even the implied warranty of
59
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60
# GNU General Public License for more details.
62
# You should have received a copy of the GNU General Public License
63
# along with this program; if not, write to the Free Software
64
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
42
67
top_srcdir = @top_srcdir@
88
113
pluginLTLIBRARIES_INSTALL = $(INSTALL)
89
114
LTLIBRARIES = $(plugin_LTLIBRARIES)
90
115
mate_la_DEPENDENCIES =
91
am_mate_la_OBJECTS = mate_grammar.lo mate_parser.lo mate_plugin.lo \
92
mate_runtime.lo mate_setup.lo mate_util.lo packet-mate.lo
116
am__objects_1 = packet-mate.lo
117
am__objects_2 = mate_setup.lo mate_runtime.lo mate_util.lo \
118
mate_grammar.lo mate_parser.lo
120
am_mate_la_OBJECTS = plugin.lo $(am__objects_1) $(am__objects_2) \
93
122
mate_la_OBJECTS = $(am_mate_la_OBJECTS)
94
123
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
95
124
depcomp = $(SHELL) $(top_srcdir)/depcomp
346
377
wireshark_man = @wireshark_man@
347
378
wiresharkfilter_man = @wiresharkfilter_man@
348
379
INCLUDES = -I$(top_srcdir)
349
plugin_LTLIBRARIES = mate.la
381
# the name of the plugin
384
# the dissector sources (without any helpers)
389
# corresponding headers
390
DISSECTOR_INCLUDES = \
396
# Dissector helpers. They're included in the source files in this
397
# directory, but they're not dissectors themselves, i.e. they're not
398
# used to generate "register.c").
399
DISSECTOR_SUPPORT_SRC = \
406
plugin_LTLIBRARIES = mate.la
411
$(DISSECTOR_SUPPORT_SRC) \
412
$(DISSECTOR_INCLUDES)
363
414
mate_la_LDFLAGS = -module -avoid-version
364
415
mate_la_LIBADD = @PLUGIN_LIBS@
418
# Currently plugin.c can be included in the distribution because
419
# we always build all protocol dissectors. We used to have to check
420
# whether or not to build the snmp dissector. If we again need to
421
# variably build something, making plugin.c non-portable, uncomment
422
# the dist-hook line below.
424
# Oh, yuk. We don't want to include "plugin.c" in the distribution, as
425
# its contents depend on the configuration, and therefore we want it
426
# to be built when the first "make" is done; however, Automake insists
427
# on putting *all* source into the distribution.
429
# We work around this by having a "dist-hook" rule that deletes
430
# "plugin.c", so that "dist" won't pick it up.
433
# @rm -f $(distdir)/plugin.c
457
529
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate_grammar.Plo@am__quote@
458
530
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate_parser.Plo@am__quote@
459
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate_plugin.Plo@am__quote@
460
531
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate_runtime.Plo@am__quote@
461
532
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate_setup.Plo@am__quote@
462
533
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate_util.Plo@am__quote@
463
534
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-mate.Plo@am__quote@
535
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@
466
538
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
667
739
uninstall-pluginLTLIBRARIES
743
# Build plugin.c, which contains the plugin version[] string, a
744
# function plugin_register() that calls the register routines for all
745
# protocols, and a function plugin_reg_handoff() that calls the handoff
746
# registration routines for all protocols.
748
# We do this by scanning sources. If that turns out to be too slow,
749
# maybe we could just require every .o file to have an register routine
750
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
752
# Formatting conventions: The name of the proto_register_* routines an
753
# proto_reg_handoff_* routines must start in column zero, or must be
754
# preceded only by "void " starting in column zero, and must not be
757
# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
759
# For some unknown reason, having a big "for" loop in the Makefile
760
# to scan all the files doesn't work with some "make"s; they seem to
761
# pass only the first few names in the list to the shell, for some
764
# Therefore, we have a script to generate the plugin.c file.
765
# The shell script runs slowly, as multiple greps and seds are run
766
# for each input file; this is especially slow on Windows. Therefore,
767
# if Python is present (as indicated by PYTHON being defined), we run
768
# a faster Python script to do that work instead.
770
# The first argument is the directory in which the source files live.
771
# The second argument is "plugin", to indicate that we should build
772
# a plugin.c file for a plugin.
773
# All subsequent arguments are the files to scan.
775
plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \
776
$(top_srcdir)/tools/make-dissector-reg.py
777
@if test -n $(PYTHON); then \
778
echo Making plugin.c with python ; \
779
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
780
plugin $(DISSECTOR_SRC) ; \
782
echo Making plugin.c with shell script ; \
783
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
784
$(plugin_src) plugin $(DISSECTOR_SRC) ; \
670
787
mate_parser.c : mate_parser.l
671
788
$(LEX) -Pdf_ -omate_parser.c $(srcdir)/mate_parser.l
673
790
mate_grammar.h : mate_grammar.c
674
mate_grammar.c : mate_grammar.lemon mate.h mate_util.h $(LEMON)/lemon
675
$(LEMON)/lemon t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/mate_grammar.lemon || \
791
mate_grammar.c : mate_grammar.lemon mate.h mate_util.h $(LEMON)/lemon$(EXEEXT)
792
$(LEMON)/lemon$(EXEEXT) t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/mate_grammar.lemon || \
676
793
(rm -f grammar.c grammar.h ; false)
677
794
# Tell versions [3.59,3.63) of GNU make to not export all variables.
678
795
# Otherwise a system limit (for SysV at least) may be exceeded.