Do a deep copy in wtap_block_add_custom_option().
[metze/wireshark/wip.git] / wiretap / Makefile.am
1 # Makefile.am
2 # Automake file for Wiretap
3 #
4 # Wireshark - Network traffic analyzer
5 # By Gerald Combs <gerald@wireshark.org>
6 # Copyright 1998 Gerald Combs
7 #
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.
12 #
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.
17 #
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.
21
22 include $(top_srcdir)/Makefile.am.inc
23
24 AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) -DWS_BUILD_DLL $(GLIB_CFLAGS)
25
26 noinst_LTLIBRARIES = libwiretap_generated.la
27 lib_LTLIBRARIES = libwiretap.la
28
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 = \
35         5views.c                \
36         aethra.c                \
37         ascendtext.c            \
38         atm.c                   \
39         ber.c                   \
40         btsnoop.c               \
41         camins.c                \
42         capsa.c                 \
43         catapult_dct2000.c      \
44         commview.c              \
45         cosine.c                \
46         csids.c                 \
47         daintree-sna.c          \
48         dbs-etherwatch.c        \
49         dct3trace.c             \
50         erf.c                   \
51         eyesdn.c                \
52         file_access.c           \
53         file_wrappers.c         \
54         hcidump.c               \
55         i4btrace.c              \
56         ipfix.c                 \
57         iptrace.c               \
58         iseries.c               \
59         mime_file.c             \
60         json.c                  \
61         k12.c                   \
62         lanalyzer.c             \
63         logcat_text.c           \
64         logcat.c                \
65         libpcap.c               \
66         merge.c                 \
67         mpeg.c                  \
68         mplog.c                 \
69         mp2t.c                  \
70         netmon.c                \
71         netscaler.c             \
72         netscreen.c             \
73         nettl.c                 \
74         nettrace_3gpp_32_423.c  \
75         network_instruments.c   \
76         netxray.c               \
77         ngsniffer.c             \
78         packetlogger.c          \
79         pcap-common.c           \
80         pcapng.c                \
81         peekclassic.c           \
82         peektagged.c            \
83         pppdump.c               \
84         radcom.c                \
85         snoop.c                 \
86         stanag4607.c            \
87         tnef.c                  \
88         toshiba.c               \
89         visual.c                \
90         vms.c                   \
91         vwr.c                   \
92         wtap.c                  \
93         wtap_opttypes.c
94
95 # Header files that are not generated from other files
96 NONGENERATED_HEADER_FILES = \
97         5views.h                \
98         aethra.h                \
99         ascendtext.h            \
100         ascend-int.h            \
101         atm.h                   \
102         ber.h                   \
103         btsnoop.h               \
104         camins.h                \
105         capsa.h                 \
106         catapult_dct2000.h      \
107         commview.h              \
108         cosine.h                \
109         csids.h                 \
110         daintree-sna.h          \
111         dbs-etherwatch.h        \
112         dct3trace.h             \
113         erf.h                   \
114         eyesdn.h                \
115         file_wrappers.h         \
116         hcidump.h               \
117         i4btrace.h              \
118         i4b_trace.h             \
119         ipfix.h                 \
120         iptrace.h               \
121         iseries.h               \
122         json.h                  \
123         mime_file.h             \
124         k12.h                   \
125         lanalyzer.h             \
126         libpcap.h               \
127         logcat.h                \
128         logcat_text.h           \
129         merge.h                 \
130         mpeg.h                  \
131         mplog.h                 \
132         mp2t.h                  \
133         netmon.h                \
134         netscreen.h             \
135         netscaler.h             \
136         nettl.h                 \
137         nettrace_3gpp_32_423.h  \
138         network_instruments.h   \
139         netxray.h               \
140         ngsniffer.h             \
141         packetlogger.h          \
142         pcap-common.h           \
143         pcap-encap.h            \
144         pcapng.h                \
145         pcapng_module.h         \
146         peekclassic.h           \
147         peektagged.h            \
148         pppdump.h               \
149         radcom.h                \
150         snoop.h                 \
151         stanag4607.h            \
152         tnef.h                  \
153         toshiba.h               \
154         visual.h                \
155         vms.h                   \
156         vwr.h                   \
157         wtap.h                  \
158         wtap_opttypes.h         \
159         wtap-int.h
160
161 # Files that generate compileable files
162 GENERATOR_FILES = \
163        ascend.y                 \
164        ascend_scanner.l         \
165        k12text.l
166
167 # The C source files they generate.
168 GENERATED_C_FILES = \
169         ascend.c                \
170         ascend_scanner.c        \
171         k12text.c
172
173 # The header files that they generate.
174 GENERATED_HEADER_FILES = \
175         ascend.h                \
176         ascend_scanner_lex.h    \
177         k12text_lex.h
178
179 # All the generated files.
180 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
181
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)    \
189         ws_version_info.c
190
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@
193
194 libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
195
196 libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la
197
198 libwiretap_generated_la_SOURCES = \
199         $(GENERATED_C_FILES)
200
201 libwiretap_generated_la_CFLAGS = $(GENERATED_CFLAGS)
202
203 CLEANFILES = \
204         libwiretap.a            \
205         libwiretap.la           \
206         libwiretap_generated.a  \
207         libwiretap_generated.la \
208         *~
209
210 DISTCLEANFILES = \
211         ws_version_info.c
212
213 MAINTAINERCLEANFILES = \
214         $(GENERATED_FILES)      \
215         Makefile.in
216
217 BUILT_SOURCES = $(GENERATED_HEADER_FILES) ws_version_info.c
218
219 EXTRA_DIST = \
220         .editorconfig           \
221         README.airmagnet        \
222         README.developer        \
223         CMakeLists.txt          \
224         $(GENERATOR_FILES)      \
225         $(GENERATED_FILES)
226
227 k12text_lex.h : k12text.c
228
229 ascend_scanner_lex.h : ascend_scanner.c
230
231 ascend.h: ascend.c
232
233 ascend.c: $(srcdir)/ascend.y ascend_scanner_lex.h
234         @if [ -z "$(YACC)" ]; then \
235                 echo "Neither bison nor byacc has been found"; \
236                 exit 1; \
237         fi
238         $(AM_V_YACC)$(YACC) -d -p ascend -o ascend.c $(srcdir)/ascend.y
239
240 ws_version_info.c: $(top_srcdir)/ws_version_info.c
241         $(AM_V_LN_S)$(LN_S) $<
242
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
255
256 maintainer-clean-local: clean-dumpabi-libwiretap
257
258 .PHONY: clean-dumpabi-libwiretap
259
260 clean-dumpabi-libwiretap:
261         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz abi_logs abi-descriptor.xml
262
263 checkapi:
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)