2 # Automake file for Wiretap
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 1998 Gerald Combs
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 include ../Makefile.am.inc
26 ACLOCAL_AMFLAGS = `../aclocal-flags`
28 include Makefile.common
30 noinst_LTLIBRARIES = libwiretap_generated.la
31 lib_LTLIBRARIES = libwiretap.la
32 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
33 libwiretap_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
35 AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL
37 if HAVE_WARNINGS_AS_ERRORS
38 AM_NON_GENERATED_CFLAGS += -Werror
41 AM_CPPFLAGS = -I$(srcdir)/..
46 libwiretap_generated.a \
47 libwiretap_generated.la \
50 MAINTAINERCLEANFILES = \
54 #Since code generated by lex may trigger gcc warnings, we are now generating two
55 #libraries. A single library is generated with the lex code without the barrier
56 #"stop on warning". An other library is generated from the remaining source
57 #files with the "stop on warning" barrier.
58 libwiretap_la_SOURCES = \
59 $(NONGENERATED_C_FILES) \
60 $(NONGENERATED_HEADER_FILES)
61 libwiretap_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
63 libwiretap_generated_la_SOURCES = \
75 libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
76 libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la
78 RUNLEX = $(top_srcdir)/tools/runlex.sh
80 k12text_lex.h : k12text.c
82 ascend_scanner_lex.h : ascend_scanner.c
84 ascend_scanner.c: ascend.h
89 @if [ -z "$(YACC)" ]; then \
90 echo "Neither bison nor byacc has been found"; \
93 $(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y
95 # ABI compliance checker can be obtained from
96 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
97 # Checked using version 1.21.12
98 dumpabi-libwiretap: all abi-descriptor.xml
99 rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
100 mkdir abi-check-headers
101 cp *.h ../ws_symbol_export.h abi-check-headers/
102 abi-compliance-checker -l libwiretap -v1 `readlink .libs/libwiretap.so | sed 's/.*\.so\.//'` \
103 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
104 cat logs/libwiretap/[0-9]*/log.txt
105 cp -f abi_dumps/libwiretap/libwiretap_* .libs/
106 cd .libs && ln -sf libwiretap_*.abi.tar.gz libwiretap.abi.tar.gz
109 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
110 ## $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)
111 $(PERL) ../tools/checkAPIs.pl -g termoutput -build $(NONGENERATED_C_FILES) $(GENERATOR_FILES)