2 # Automake file for Wiretap
4 # Wireshark - Network traffic analyzer
5 # By Gerald Combs <gerald@wireshark.org>
6 # Copyright 1998 Gerald Combs
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 include $(top_srcdir)/Makefile.am.inc
24 AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) -DWS_BUILD_DLL $(GLIB_CFLAGS)
26 noinst_LTLIBRARIES = libwiretap_generated.la
27 lib_LTLIBRARIES = libwiretap.la
29 # C source files that are part of the Wiretap source; this includes only
30 # .c files, not YACC or Lex or... files (as Makefile.nmake maps this list
31 # into a list of object files by replacing ".c" with ".obj") or files
32 # generated from YACC or Lex files (as Automake doesn't want them in
33 # _SOURCES variables).
34 NONGENERATED_C_FILES = \
74 nettrace_3gpp_32_423.c \
75 network_instruments.c \
95 # Header files that are not generated from other files
96 NONGENERATED_HEADER_FILES = \
137 nettrace_3gpp_32_423.h \
138 network_instruments.h \
161 # Files that generate compileable files
167 # The C source files they generate.
168 GENERATED_C_FILES = \
173 # The header files that they generate.
174 GENERATED_HEADER_FILES = \
176 ascend_scanner_lex.h \
179 # All the generated files.
180 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
182 #Since code generated by lex may trigger gcc warnings, we are now generating two
183 #libraries. A single library is generated with the lex code without the barrier
184 #"stop on warning". An other library is generated from the remaining source
185 #files with the "stop on warning" barrier.
186 libwiretap_la_SOURCES = \
187 $(NONGENERATED_C_FILES) \
188 $(NONGENERATED_HEADER_FILES) \
191 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
192 libwiretap_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
194 libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
196 libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la
198 libwiretap_generated_la_SOURCES = \
201 libwiretap_generated_la_CFLAGS = $(GENERATED_CFLAGS)
206 libwiretap_generated.a \
207 libwiretap_generated.la \
213 MAINTAINERCLEANFILES = \
217 BUILT_SOURCES = $(GENERATED_HEADER_FILES) ws_version_info.c
227 k12text_lex.h : k12text.c
229 ascend_scanner_lex.h : ascend_scanner.c
233 ascend.c: $(srcdir)/ascend.y ascend_scanner_lex.h
234 @if [ -z "$(YACC)" ]; then \
235 echo "Neither bison nor byacc has been found"; \
238 $(AM_V_YACC)$(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y
240 ws_version_info.c: $(top_srcdir)/ws_version_info.c
241 $(AM_V_LN_S)$(LN_S) $<
243 # ABI compliance checker can be obtained from
244 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
245 # Checked using version 1.21.12
246 dumpabi-libwiretap: all abi-descriptor.xml
247 rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
248 mkdir abi-check-headers
249 cp *.h ../ws_symbol_export.h abi-check-headers/
250 abi-compliance-checker -log-path abi_logs/log.txt -l libwiretap -v1 `readlink .libs/libwiretap.so | sed 's/.*\.so\.//'` \
251 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
252 cat logs/libwiretap/[0-9]*/log.txt
253 cp -f abi_dumps/libwiretap/libwiretap_* .libs/
254 cd .libs && ln -sf libwiretap_*.abi.tar.gz libwiretap.abi.tar.gz
256 maintainer-clean-local: clean-dumpabi-libwiretap
258 .PHONY: clean-dumpabi-libwiretap
260 clean-dumpabi-libwiretap:
261 rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz abi_logs abi-descriptor.xml
264 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
265 ## $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput \
266 $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g termoutput -build \
267 -sourcedir=$(srcdir) $(NONGENERATED_C_FILES)