plugins: Fix paths to match WSUG
[metze/wireshark/wip.git] / wsutil / Makefile.am
1 # Makefile.am
2 #
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
6 #
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation; either version 2
10 # of the License, or (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
21 include $(top_srcdir)/Makefile.am.inc
22
23 AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) -DWS_BUILD_DLL \
24         -DTOP_SRCDIR=\"$(abs_top_srcdir)\"      \
25         -DDATAFILE_DIR=\"$(pkgdatadir)\"        \
26         -DEXTCAP_DIR=\"$(extcapdir)\"           \
27         -DPLUGIN_DIR=\"$(pkglibdir)/plugins\"   \
28         -DJSMN_STRICT                           \
29         $(GLIB_CFLAGS) $(LIBGCRYPT_CFLAGS)      \
30         $(LIBGNUTLS_CFLAGS)
31
32 # Optional headers for ABI checking
33 wsutil_optional_abi_includes =
34
35 if HAVE_MACOS_FRAMEWORKS
36 wsutil_optional_abi_includes += cfutils.h
37 endif
38
39 # Header files that don't declare replacement functions for functions
40 # present in the APIs/ABIs of some, but not all, targets.
41 libwsutil_nonrepl_INCLUDES = \
42         adler32.h               \
43         base32.h                \
44         base64.h                \
45         bits_count_ones.h       \
46         bits_ctz.h              \
47         bitswap.h               \
48         buffer.h                \
49         clopts_common.h         \
50         cmdarg_err.h            \
51         color.h                 \
52         copyright_info.h        \
53         cpu_info.h              \
54         crash_info.h            \
55         crc6.h                  \
56         crc7.h                  \
57         crc8.h                  \
58         crc10.h                 \
59         crc11.h                 \
60         crc16.h                 \
61         crc16-plain.h           \
62         crc32.h                 \
63         eax.h                   \
64         filesystem.h            \
65         frequency-utils.h       \
66         g711.h                  \
67         glib-compat.h           \
68         inet_addr.h             \
69         inet_ipv6.h             \
70         interface.h             \
71         jsmn.h                  \
72         mpeg-audio.h            \
73         nstime.h                \
74         os_version_info.h       \
75         pint.h                  \
76         plugins.h               \
77         privileges.h            \
78         processes.h             \
79         report_message.h        \
80         sign_ext.h              \
81         sober128.h              \
82         socket.h                \
83         str_util.h              \
84         strnatcmp.h             \
85         strtoi.h                \
86         tempfile.h              \
87         time_util.h             \
88         type_util.h             \
89         unicode-utils.h         \
90         utf8_entities.h         \
91         ws_cpuid.h              \
92         ws_mempbrk.h            \
93         ws_mempbrk_int.h        \
94         ws_printf.h             \
95         wsjsmn.h                \
96         xtea.h
97
98 # Header files for functions in libwsutil's ABI on this platform.
99 libwsutil_abi_INCLUDES = \
100         $(libwsutil_nonrepl_INCLUDES)   \
101         $(wsutil_optional_abi_includes)
102
103 # Optional objects that I know how to build. These will be
104 # linked into libwsutil if necessary.
105 wsutil_optional_objects =
106
107 if SSE42_SUPPORTED
108 wsutil_optional_objects += libwsutil_sse42.la
109 endif
110
111 noinst_LTLIBRARIES = libwsutil_sse42.la
112
113 lib_LTLIBRARIES = libwsutil.la
114
115 subpkgincludedir = $(pkgincludedir)/wsutil
116
117 subpkginclude_HEADERS = \
118         $(libwsutil_nonrepl_INCLUDES)
119
120 libwsutil_la_SOURCES = \
121         adler32.c               \
122         airpdcap_wep.c          \
123         base32.c                \
124         base64.c                \
125         bitswap.c               \
126         buffer.c                \
127         clopts_common.c         \
128         cmdarg_err.c            \
129         copyright_info.c        \
130         cpu_info.c              \
131         crash_info.c            \
132         crc6.c                  \
133         crc7.c                  \
134         crc8.c                  \
135         crc10.c                 \
136         crc11.c                 \
137         crc16.c                 \
138         crc16-plain.c           \
139         crc32.c                 \
140         eax.c                   \
141         filesystem.c            \
142         frequency-utils.c       \
143         g711.c                  \
144         glib-compat.c           \
145         inet_addr.c             \
146         interface.c             \
147         jsmn.c                  \
148         mpeg-audio.c            \
149         nstime.c                \
150         os_version_info.c       \
151         plugins.c               \
152         privileges.c            \
153         report_message.c        \
154         rsa.c                   \
155         sober128.c              \
156         str_util.c              \
157         strtoi.c                \
158         strnatcmp.c             \
159         tempfile.c              \
160         time_util.c             \
161         type_util.c             \
162         unicode-utils.c         \
163         ws_mempbrk.c            \
164         wsgcrypt.c              \
165         wsjsmn.c                \
166         xtea.c
167
168 if HAVE_MACOS_FRAMEWORKS
169 libwsutil_la_SOURCES += cfutils.c cfutils.h
170 endif
171
172 libwsutil_sse42_la_SOURCES = \
173         ws_mempbrk_sse42.c
174
175 libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_SSE42)
176
177 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
178 libwsutil_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
179
180 libwsutil_la_LIBADD = \
181         $(LTLIBOBJS)                    \
182         @COREFOUNDATION_FRAMEWORKS@     \
183         @GLIB_LIBS@                     \
184         @LIBGCRYPT_LIBS@                \
185         @LIBGNUTLS_LIBS@                \
186         $(wsutil_optional_objects)
187
188 EXTRA_libwsutil_la_DEPENDENCIES = \
189         $(wsutil_optional_objects)
190
191 EXTRA_DIST = \
192         .editorconfig           \
193         cfutils.c               \
194         cfutils.h               \
195         CMakeLists.txt          \
196         file_util.c             \
197         file_util.h             \
198         getopt_long.c           \
199         getopt_long.h           \
200         inet_addr-int.h         \
201         inet_aton.c             \
202         inet_aton.h             \
203         inet_ntop.c             \
204         inet_pton.c             \
205         popcount.c              \
206         popcount.h              \
207         rsa.h                   \
208         strptime.c              \
209         strptime.h              \
210         win32-utils.c           \
211         win32-utils.h           \
212         ws_mempbrk_sse42.c      \
213         wsgcrypt.h              \
214         wsgetopt.h              \
215         wspcap.h                \
216         xtea.h
217
218 CLEANFILES = \
219         libwsutil.a     \
220         libwsutil.la    \
221         *~
222
223 MAINTAINERCLEANFILES = \
224         Makefile.in
225
226 # ABI compliance checker can be obtained from
227 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
228 # Checked using version 1.21.12
229 dumpabi-libwsutil: all abi-descriptor.xml
230         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
231         mkdir abi-check-headers
232         cp ../config.h ../ws_symbol_export.h $(libwsutil_abi_INCLUDES) abi-check-headers/
233         abi-compliance-checker -log-path abi_logs/log.txt -l libwsutil -v1 `readlink .libs/libwsutil.so | sed 's/.*\.so\.//'` \
234                 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
235                 cat abi_logs/log.txt
236         cp -f abi_dumps/libwsutil/libwsutil_* .libs/
237         cd .libs && ln -sf libwsutil_*.abi.tar.gz libwsutil.abi.tar.gz
238
239 maintainer-clean-local: clean-dumpabi-libwsutil
240
241 .PHONY: clean-dumpabi-libwsutil
242
243 clean-dumpabi-libwsutil:
244         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz abi_logs abi-descriptor.xml
245
246 checkapi:
247         $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g termoutput -build \
248         -sourcedir=$(srcdir) \
249         $(LIBWSUTIL_SRC)
250
251 #       $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput \
252 #       -sourcedir=$(srcdir) \
253 #       file_util.c unicode-utils.c
254
255 #
256 # Editor modelines  -  https://www.wireshark.org/tools/modelines.html
257 #
258 # Local variables:
259 # c-basic-offset: 8
260 # tab-width: 8
261 # indent-tabs-mode: t
262 # End:
263 #
264 # vi: set shiftwidth=8 tabstop=8 noexpandtab:
265 # :indentSize=8:tabSize=8:noTabs=false:
266 #