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 = \
135 nettrace_3gpp_32_423.h \
136 network_instruments.h \
155 PUBLIC_HEADER_FILES = \
163 # Files that generate compileable files
169 # The C source files they generate.
170 GENERATED_C_FILES = \
175 # The header files that they generate.
176 GENERATED_HEADER_FILES = \
178 ascend_scanner_lex.h \
181 # All the generated files.
182 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
184 #Since code generated by lex may trigger gcc warnings, we are now generating two
185 #libraries. A single library is generated with the lex code without the barrier
186 #"stop on warning". An other library is generated from the remaining source
187 #files with the "stop on warning" barrier.
188 libwiretap_la_SOURCES = \
189 $(NONGENERATED_C_FILES) \
190 $(NONGENERATED_HEADER_FILES) \
193 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
194 libwiretap_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
196 libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
198 libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la
200 libwiretap_generated_la_SOURCES = \
203 libwiretap_generated_la_CFLAGS = $(GENERATED_CFLAGS)
205 subpkgincludedir = $(pkgincludedir)/wiretap
207 subpkginclude_HEADERS = $(PUBLIC_HEADER_FILES)
212 libwiretap_generated.a \
213 libwiretap_generated.la \
219 MAINTAINERCLEANFILES = \
223 BUILT_SOURCES = $(GENERATED_HEADER_FILES) ws_version_info.c
233 k12text_lex.h : k12text.c
235 ascend_scanner_lex.h : ascend_scanner.c
239 ascend.c: $(srcdir)/ascend.y ascend_scanner_lex.h
240 @if [ -z "$(YACC)" ]; then \
241 echo "Neither bison nor byacc has been found"; \
244 $(AM_V_YACC)$(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y
246 ws_version_info.c: $(top_srcdir)/ws_version_info.c
247 $(AM_V_LN_S)$(LN_S) $<
249 # ABI compliance checker can be obtained from
250 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
251 # Checked using version 1.21.12
253 # (f)lex generated headers are not part of API and may not include
254 # all needed headers for used types
255 dumpabi-libwiretap: all abi-descriptor.xml
256 rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
257 mkdir abi-check-headers
258 cp *.h ../ws_symbol_export.h abi-check-headers/
259 rm abi-check-headers/*_lex.h abi-check-headers/ascend.h
260 abi-compliance-checker -log-path abi_logs/log.txt -l libwiretap -v1 `readlink .libs/libwiretap.so | sed 's/.*\.so\.//'` \
261 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
263 cp -f abi_dumps/libwiretap/libwiretap_* .libs/
264 cd .libs && ln -sf libwiretap_*.abi.tar.gz libwiretap.abi.tar.gz
266 maintainer-clean-local: clean-dumpabi-libwiretap
268 .PHONY: clean-dumpabi-libwiretap
270 clean-dumpabi-libwiretap:
271 rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz abi_logs abi-descriptor.xml
274 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
275 ## $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput \
276 $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g termoutput -build \
277 -sourcedir=$(srcdir) $(NONGENERATED_C_FILES)