libvirt/tools/Makefile.am

115 lines
3.4 KiB
Makefile
Raw Normal View History

## Copyright (C) 2005-2016 Red Hat, Inc.
## Copyright (C) 2013 Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
maint: use LGPL correctly Several files called out COPYING or COPYING.LIB instead of using the normal boilerplate. It's especially important that we don't call out COPYING from an LGPL file, since COPYING is traditionally used for the GPL. A few files were lacking copyright altogether. * src/rpc/gendispatch.pl: Add missing copyright. * Makefile.nonreentrant: Likewise. * src/check-symfile.pl: Likewise. * src/check-symsorting.pl: Likewise. * src/driver.h: Likewise. * src/internal.h: Likewise. * tools/libvirt-guests.sh.in: Likewise. * tools/virt-pki-validate.in: Mention copyright in comment, not just code. * tools/virt-sanlock-cleanup.in: Likewise. * src/rpc/genprotocol.pl: Spell out license terms. * src/xen/xend_internal.h: Likewise. * src/xen/xend_internal.c: Likewise. * Makefile.am: Likewise. * daemon/Makefile.am: Likewise. * docs/Makefile.am: Likewise. * docs/schemas/Makefile.am: Likewise. * examples/apparmor/Makefile.am: Likewise. * examples/domain-events/events-c/Makefile.am: Likewise. * examples/dominfo/Makefile.am: Likewise. * examples/domsuspend/Makefile.am: Likewise. * examples/hellolibvirt/Makefile.am: Likewise. * examples/openauth/Makefile.am: Likewise. * examples/python/Makefile.am: Likewise. * examples/systemtap/Makefile.am: Likewise. * examples/xml/nwfilter/Makefile.am: Likewise. * gnulib/lib/Makefile.am: Likewise. * gnulib/tests/Makefile.am: Likewise. * include/Makefile.am: Likewise. * include/libvirt/Makefile.am: Likewise. * python/Makefile.am: Likewise. * python/tests/Makefile.am: Likewise. * src/Makefile.am: Likewise. * tests/Makefile.am: Likewise. * tools/Makefile.am: Likewise. * configure.ac: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
2013-05-14 23:42:12 +00:00
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library 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
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
# We do not want to accidentally include stuff from src/
# dir or public API dir. Specific files can
# still be included via their path relative to the root if
# needed
STANDALONE_CPPFLAGS = -I$(top_srcdir)
noinst_LTLIBRARIES =
if WITH_WIRESHARK_DISSECTOR
ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la
wireshark_src_libvirt_la_CFLAGS = \
wireshark: fix compilation errors With meson introduction which is using the same CFLAGS for the whole project some compilation errors were discovered. The wireshark plugin library is the only one in tools directory that is not using AM_CFLAGS. With the AM_CFLAGS we get these errors: ../../tools/wireshark/src/packet-libvirt.c: In function 'dissect_libvirt_fds': ../../tools/wireshark/src/packet-libvirt.c:348:31: error: unused parameter 'tvb' [-Werror=unused-parameter] 348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds) | ~~~~~~~~~~^~~ ../../tools/wireshark/src/packet-libvirt.c:348:41: error: unused parameter 'start' [-Werror=unused-parameter] 348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds) | ~~~~~^~~~~ ../../tools/wireshark/src/packet-libvirt.c:348:55: error: unused parameter 'nfds' [-Werror=unused-parameter] 348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds) | ~~~~~~~^~~~ At top level: ../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_bool' defined but not used [-Werror=unused-function] 64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \ | ^~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:88:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR' 88 | XDR_PRIMITIVE_DISSECTOR(bool, bool_t, boolean) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_float' defined but not used [-Werror=unused-function] 64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \ | ^~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:86:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR' 86 | XDR_PRIMITIVE_DISSECTOR(float, gfloat, float) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_short' defined but not used [-Werror=unused-function] 64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \ | ^~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:80:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR' 80 | XDR_PRIMITIVE_DISSECTOR(short, gint16, int) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c: In function 'dissect_libvirt_message': ../../tools/wireshark/src/packet-libvirt.c:423:34: error: null pointer dereference [-Werror=null-dereference] 423 | vir_xdr_dissector_t xd = find_payload_dissector(proc, type, get_program_data(prog, VIR_PROGRAM_DISSECTORS), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 424 | *(gsize *)get_program_data(prog, VIR_PROGRAM_DISSECTORS_LEN)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-05-20 20:52:05 +00:00
-I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS) $(XDR_CFLAGS) $(AM_CFLAGS)
wireshark_src_libvirt_la_LDFLAGS = -avoid-version -module
wireshark_src_libvirt_la_SOURCES = \
wireshark/src/packet-libvirt.h \
wireshark/src/packet-libvirt.c \
wireshark/src/plugin.c
wireshark/src/packet-libvirt.c: wireshark/src/packet-libvirt.h \
wireshark/src/libvirt/protocol.h
WS_DISSECTOR_PROTO_FILES = \
$(abs_top_srcdir)/src/remote/remote_protocol.x \
$(abs_top_srcdir)/src/remote/qemu_protocol.x \
$(abs_top_srcdir)/src/remote/lxc_protocol.x \
$(abs_top_srcdir)/src/rpc/virkeepaliveprotocol.x
wireshark/src/libvirt/protocol.h: wireshark/util/genxdrstub.pl \
$(WS_DISSECTOR_PROTO_FILES)
$(AM_V_GEN)$(MKDIR_P) wireshark/src/libvirt && \
cd wireshark/src && \
LIBVIRT_VERSION=$(LIBVIRT_VERSION) \
$(PERL) $(abs_top_srcdir)/tools/wireshark/util/genxdrstub.pl \
$(WS_DISSECTOR_PROTO_FILES)
endif WITH_WIRESHARK_DISSECTOR
if WITH_NSS
nss_libnss_libvirt_la_SOURCES =
nss_libnss_libvirt_la_LDFLAGS = \
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_NSS_SYMBOL_FILE) \
$(AM_LDFLAGS) \
-module \
-export-dynamic \
-avoid-version \
-shared \
-shrext .so.$(NSS_SO_VER)
nss_libnss_libvirt_la_LIBADD = \
nss/libnss_libvirt_impl.la
nss_libnss_libvirt_la_DEPENDENCIES = \
$(nss_libnss_libvirt_la_LIBADD) \
$(LIBVIRT_NSS_SYMBOL_FILE)
noinst_LTLIBRARIES += nss/libnss_libvirt_guest_impl.la
nss_libnss_libvirt_guest_impl_la_SOURCES = \
$(LIBVIRT_NSS_SOURCES) \
nss/libvirt_nss_macs.h \
nss/libvirt_nss_macs.c \
$(NULL)
nss_libnss_libvirt_guest_impl_la_CPPFLAGS = $(STANDALONE_CPPFLAGS)
nss_libnss_libvirt_guest_impl_la_CFLAGS = \
-DLIBVIRT_NSS \
-DLIBVIRT_NSS_GUEST \
$(YAJL_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
nss_libnss_libvirt_guest_impl_la_LIBADD = \
$(YAJL_LIBS) \
$(NULL)
nss_libnss_libvirt_guest_la_SOURCES =
nss_libnss_libvirt_guest_la_LDFLAGS = \
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_GUEST_NSS_SYMBOL_FILE) \
$(AM_LDFLAGS) \
-module \
-export-dynamic \
-avoid-version \
-shared \
-shrext .so.$(NSS_SO_VER)
nss_libnss_libvirt_guest_la_LIBADD = \
nss/libnss_libvirt_guest_impl.la
nss_libnss_libvirt_guest_la_DEPENDENCIES = \
$(nss_libnss_libvirt_guest_la_LIBADD) \
$(LIBVIRT_GUEST_NSS_SYMBOL_FILE)
lib_LTLIBRARIES = \
nss/libnss_libvirt.la \
nss/libnss_libvirt_guest.la
endif WITH_NSS