aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/Makefile.am
blob: 597e77d27b7ab286b281d3266f7df4434d96a767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Makefile.am
# Automake file for Wiretap
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

include Makefile.common
include $(top_srcdir)/Makefile.am.inc

AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) -DWS_BUILD_DLL $(GLIB_CFLAGS)

noinst_LTLIBRARIES = libwiretap_generated.la
lib_LTLIBRARIES = libwiretap.la
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libwiretap_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@

CLEANFILES = \
	libwiretap.a		\
	libwiretap.la		\
	libwiretap_generated.a	\
	libwiretap_generated.la	\
	*~

MAINTAINERCLEANFILES = \
	$(GENERATED_FILES)	\
	Makefile.in

#Since code generated by lex may trigger gcc warnings, we are now generating two
#libraries.  A single library is generated with the lex code without the barrier
#"stop on warning". An other library is generated from the remaining source
#files with the "stop on warning" barrier.
libwiretap_la_SOURCES = \
	$(NONGENERATED_C_FILES)	\
	$(NONGENERATED_HEADER_FILES)

libwiretap_generated_la_SOURCES = \
	$(GENERATED_C_FILES)

libwiretap_generated_la_CFLAGS = $(GENERATED_CFLAGS)

BUILT_SOURCES = $(GENERATED_HEADER_FILES)

EXTRA_DIST = \
	.editorconfig		\
	README.airmagnet	\
	README.developer	\
	Makefile.common		\
	Makefile.nmake		\
	CMakeLists.txt		\
	$(GENERATOR_FILES) 	\
	$(GENERATED_FILES)

libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)

libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la

k12text_lex.h : k12text.c

ascend_scanner_lex.h : ascend_scanner.c

ascend.h: ascend.c

ascend.c: $(srcdir)/ascend.y ascend_scanner_lex.h
	@if [ -z "$(YACC)" ]; then \
		echo "Neither bison nor byacc has been found"; \
		exit 1; \
	fi
	$(AM_V_YACC)$(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y

# ABI compliance checker can be obtained from
# http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
# Checked using version 1.21.12
dumpabi-libwiretap: all abi-descriptor.xml
	rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
	mkdir abi-check-headers
	cp *.h ../ws_symbol_export.h abi-check-headers/
	abi-compliance-checker -log-path abi_logs/log.txt -l libwiretap -v1 `readlink .libs/libwiretap.so | sed 's/.*\.so\.//'` \
		-relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
		cat logs/libwiretap/[0-9]*/log.txt
	cp -f abi_dumps/libwiretap/libwiretap_* .libs/
	cd .libs && ln -sf libwiretap_*.abi.tar.gz libwiretap.abi.tar.gz

maintainer-clean-local: clean-dumpabi-libwiretap

.PHONY: clean-dumpabi-libwiretap

clean-dumpabi-libwiretap:
	rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz abi_logs abi-descriptor.xml

checkapi:
## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
##	$(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput \
	$(PERL) $(top_srcdir)/tools/checkAPIs.pl -g termoutput -build \
	-sourcedir=$(srcdir) \
	$(NONGENERATED_C_FILES) $(GENERATOR_FILES)