aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/Makefile.am
blob: 1b67cb3adbff836e100c62def5c85507dd975db3 (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# 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 $(top_srcdir)/Makefile.am.inc

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

noinst_LTLIBRARIES = libwiretap_generated.la
lib_LTLIBRARIES = libwiretap.la

# C source files that are part of the Wiretap source; this includes only
# .c files, not YACC or Lex or... files (as Makefile.nmake maps this list
# into a list of object files by replacing ".c" with ".obj") or files
# generated from YACC or Lex files (as Automake doesn't want them in
# _SOURCES variables).
NONGENERATED_C_FILES = \
	5views.c		\
	aethra.c		\
	ascendtext.c		\
	atm.c			\
	ber.c			\
	btsnoop.c		\
	camins.c		\
	capsa.c			\
	catapult_dct2000.c	\
	commview.c		\
	cosine.c		\
	csids.c			\
	daintree-sna.c		\
	dbs-etherwatch.c	\
	dct3trace.c		\
	erf.c			\
	eyesdn.c		\
	file_access.c		\
	file_wrappers.c		\
	hcidump.c		\
	i4btrace.c		\
	ipfix.c			\
	iptrace.c		\
	iseries.c		\
	mime_file.c		\
	json.c			\
	k12.c			\
	lanalyzer.c		\
	logcat_text.c		\
	logcat.c		\
	libpcap.c		\
	merge.c			\
	mpeg.c			\
	mplog.c			\
	mp2t.c			\
	netmon.c		\
	netscaler.c		\
	netscreen.c		\
	nettl.c			\
	nettrace_3gpp_32_423.c	\
	network_instruments.c	\
	netxray.c		\
	ngsniffer.c		\
	packetlogger.c		\
	pcap-common.c		\
	pcapng.c		\
	peekclassic.c           \
	peektagged.c		\
	pppdump.c		\
	radcom.c		\
	snoop.c			\
	stanag4607.c		\
	tnef.c			\
	toshiba.c		\
	visual.c		\
	vms.c			\
	vwr.c			\
	wtap.c			\
	wtap_opttypes.c

# Header files that are not generated from other files
NONGENERATED_HEADER_FILES = \
	5views.h		\
	aethra.h		\
	ascendtext.h		\
	ascend-int.h		\
	atm.h			\
	ber.h			\
	btsnoop.h		\
	camins.h		\
	capsa.h			\
	catapult_dct2000.h	\
	commview.h		\
	cosine.h		\
	csids.h			\
	daintree-sna.h		\
	dbs-etherwatch.h	\
	dct3trace.h		\
	erf.h			\
	eyesdn.h		\
	hcidump.h		\
	i4btrace.h		\
	i4b_trace.h		\
	ipfix.h			\
	iptrace.h		\
	iseries.h		\
	json.h			\
	mime_file.h		\
	k12.h			\
	lanalyzer.h		\
	libpcap.h		\
	logcat.h		\
	logcat_text.h		\
	mpeg.h			\
	mplog.h			\
	mp2t.h			\
	netmon.h		\
	netscreen.h		\
	netscaler.h		\
	nettl.h			\
	nettrace_3gpp_32_423.h	\
	network_instruments.h	\
	netxray.h		\
	ngsniffer.h		\
	packetlogger.h		\
	pcap-common.h		\
	pcapng.h		\
	peekclassic.h           \
	peektagged.h		\
	pppdump.h		\
	radcom.h		\
	snoop.h			\
	stanag4607.h		\
	tnef.h			\
	toshiba.h		\
	visual.h		\
	vms.h			\
	vwr.h			\
	wtap-int.h

PUBLIC_HEADER_FILES = \
	file_wrappers.h		\
	merge.h			\
	pcap-encap.h		\
	pcapng_module.h		\
	wtap.h			\
	wtap_opttypes.h

# Files that generate compileable files
GENERATOR_FILES = \
       ascend.y			\
       ascend_scanner.l		\
       k12text.l

# The C source files they generate.
GENERATED_C_FILES = \
	ascend.c		\
	ascend_scanner.c	\
	k12text.c

# The header files that they generate.
GENERATED_HEADER_FILES = \
	ascend.h		\
	ascend_scanner_lex.h	\
	k12text_lex.h

# All the generated files.
GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)

#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)	\
	ws_version_info.c

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

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

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

libwiretap_generated_la_SOURCES = \
	$(GENERATED_C_FILES)

libwiretap_generated_la_CFLAGS = $(GENERATED_CFLAGS)

subpkgincludedir = $(pkgincludedir)/wiretap

subpkginclude_HEADERS = $(PUBLIC_HEADER_FILES)

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

DISTCLEANFILES = \
	ws_version_info.c

MAINTAINERCLEANFILES = \
	$(GENERATED_FILES)	\
	Makefile.in

BUILT_SOURCES = $(GENERATED_HEADER_FILES) ws_version_info.c

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

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

ws_version_info.c: $(top_srcdir)/ws_version_info.c
	$(AM_V_LN_S)$(LN_S) $<

# ABI compliance checker can be obtained from
# http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
# Checked using version 1.21.12
#
# (f)lex generated headers are not part of API and may not include
# all needed headers for used types
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/
	rm abi-check-headers/*_lex.h abi-check-headers/ascend.h
	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 abi_logs/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)