mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
meson: src: build libvirt.so library
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
215a753222
commit
b681012422
@ -36,7 +36,6 @@ mod_LTLIBRARIES =
|
||||
INSTALL_DATA_DIRS =
|
||||
INSTALL_DATA_LOCAL =
|
||||
UNINSTALL_LOCAL =
|
||||
libvirt_la_BUILT_LIBADD =
|
||||
SYM_FILES =
|
||||
USED_SYM_FILES =
|
||||
GENERATED_SYM_FILES =
|
||||
@ -66,7 +65,7 @@ COMMON_UNIT_VARS = \
|
||||
|
||||
# Set these variables before we include any of the subdirs as libvirt-admin.la
|
||||
# has to be installed after libvirt.la.
|
||||
lib_LTLIBRARIES += libvirt.la libvirt-qemu.la libvirt-lxc.la
|
||||
lib_LTLIBRARIES += libvirt-qemu.la libvirt-lxc.la
|
||||
|
||||
include util/Makefile.inc.am
|
||||
include cpu_map/Makefile.inc.am
|
||||
@ -207,13 +206,6 @@ check-local: check-protocol check-symfile check-symsorting \
|
||||
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
|
||||
|
||||
|
||||
#########################
|
||||
#
|
||||
# Build up list of libvirt.la source files based on configure conditions
|
||||
#
|
||||
# First deal with sources usable in non-daemon context
|
||||
|
||||
|
||||
# All .syms files should be placed in exactly one of these three lists,
|
||||
# depending on whether they are stored in git and/or used in the build.
|
||||
SYM_FILES += $(USED_SYM_FILES)
|
||||
@ -242,32 +234,7 @@ AUG_GENTEST = $(RUNUTF8) $(PYTHON) $(AUG_GENTEST_SCRIPT)
|
||||
|
||||
BUILT_SOURCES += $(GENERATED_SYM_FILES)
|
||||
|
||||
# Empty source list - it merely links a bunch of convenience libs together
|
||||
libvirt_la_SOURCES =
|
||||
libvirt_la_LDFLAGS = \
|
||||
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
|
||||
-version-info $(LIBVIRT_VERSION_INFO) \
|
||||
$(LIBVIRT_NODELETE) \
|
||||
$(NO_UNDEFINED_LDFLAGS) \
|
||||
$(FLAT_NAMESPACE_FLAGS) \
|
||||
$(AM_LDFLAGS) \
|
||||
$(NULL)
|
||||
libvirt_la_LIBADD += \
|
||||
$(DLOPEN_LIBS) \
|
||||
$(XDR_LIBS) \
|
||||
$(NULL)
|
||||
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
|
||||
# Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we
|
||||
# lose automake's automatic dependencies on an appropriate subset of
|
||||
# $(libvirt_la_LIBADD). But we were careful to create
|
||||
# $(libvirt_la_BUILT_LIBADD) as the subset that automake would have
|
||||
# picked out for us.
|
||||
libvirt_la_DEPENDENCIES = $(libvirt_la_BUILT_LIBADD) $(LIBVIRT_SYMBOL_FILE)
|
||||
|
||||
if WITH_DTRACE_PROBES
|
||||
libvirt_la_BUILT_LIBADD += libvirt_probes.lo
|
||||
libvirt_la_DEPENDENCIES += libvirt_probes.lo libvirt_probes.o
|
||||
nodist_libvirt_la_SOURCES = libvirt_probes.h
|
||||
|
||||
BUILT_SOURCES += libvirt_functions.stp
|
||||
|
||||
|
@ -8,8 +8,6 @@ ACCESS_DRIVER_API_FILES = \
|
||||
|
||||
ACCESS_DRIVER_POLKIT_POLICY = access/org.libvirt.api.policy
|
||||
|
||||
libvirt_la_BUILT_LIBADD += libvirt_driver_access.la
|
||||
|
||||
$(ACCESS_DRIVER_POLKIT_POLICY): $(srcdir)/access/viraccessperm.h \
|
||||
$(top_srcdir)/scripts/genpolkit.py Makefile.am
|
||||
$(AM_V_GEN)$(RUNUTF8) $(PYTHON) \
|
||||
|
@ -75,6 +75,8 @@ virt_access_lib = static_library(
|
||||
]
|
||||
)
|
||||
|
||||
libvirt_libs += virt_access_lib
|
||||
|
||||
access_inc_dir = include_directories('.')
|
||||
|
||||
# Used by others where generated headers are required
|
||||
|
@ -105,4 +105,6 @@ virt_conf_lib = static_library(
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += virt_conf_lib
|
||||
|
||||
conf_inc_dir = include_directories('.')
|
||||
|
@ -17,3 +17,5 @@ cpu_lib = static_library(
|
||||
conf_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += cpu_lib
|
||||
|
@ -53,6 +53,8 @@ if conf.has('WITH_ESX')
|
||||
vmx_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += esx_lib
|
||||
endif
|
||||
|
||||
if conf.has('WITH_ESX')
|
||||
|
@ -37,4 +37,6 @@ if conf.has('WITH_HYPERV')
|
||||
conf_inc_dir,
|
||||
]
|
||||
)
|
||||
|
||||
libvirt_libs += hyperv_lib
|
||||
endif
|
||||
|
@ -18,4 +18,6 @@ hypervisor_lib = static_library(
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += hypervisor_lib
|
||||
|
||||
hypervisor_inc_dir = include_directories('.')
|
||||
|
@ -16,3 +16,5 @@ lock_driver_lib = static_library(
|
||||
conf_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += lock_driver_lib
|
||||
|
@ -36,3 +36,5 @@ log_driver_lib = static_library(
|
||||
xdr_dep,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += log_driver_lib
|
||||
|
@ -123,6 +123,11 @@ else
|
||||
endif
|
||||
|
||||
|
||||
# variables filled by subdirectories
|
||||
|
||||
libvirt_libs = []
|
||||
|
||||
|
||||
# list subdirectories
|
||||
|
||||
subdir('util')
|
||||
@ -189,6 +194,8 @@ driver_lib = static_library(
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += driver_lib
|
||||
|
||||
|
||||
# symbol files for libvirt.so
|
||||
|
||||
@ -218,6 +225,7 @@ libvirt_syms = custom_target(
|
||||
'@OUTPUT@', 'LIBVIRT_PRIVATE_' + meson.project_version(), '@INPUT@',
|
||||
],
|
||||
)
|
||||
libvirt_syms_file = libvirt_syms
|
||||
if host_machine.system() == 'windows'
|
||||
libvirt_def = custom_target(
|
||||
'libvirt.def',
|
||||
@ -228,4 +236,36 @@ if host_machine.system() == 'windows'
|
||||
'@INPUT@', '@OUTPUT@',
|
||||
],
|
||||
)
|
||||
libvirt_syms_file = libvirt_def
|
||||
endif
|
||||
|
||||
|
||||
# libvirt.so library
|
||||
|
||||
libvirt_syms_flags = '@0@@1@'.format(
|
||||
version_script_flags,
|
||||
libvirt_syms_file.full_path(),
|
||||
)
|
||||
|
||||
libvirt_lib = shared_library(
|
||||
'virt',
|
||||
dtrace_gen_objects,
|
||||
dependencies: [
|
||||
src_dep,
|
||||
],
|
||||
link_args: [
|
||||
libvirt_flat_namespace,
|
||||
libvirt_no_undefined,
|
||||
libvirt_nodelete,
|
||||
libvirt_syms_flags,
|
||||
],
|
||||
link_whole: [
|
||||
libvirt_libs,
|
||||
],
|
||||
link_depends: [
|
||||
libvirt_syms_file,
|
||||
],
|
||||
install: true,
|
||||
version: libvirt_lib_version,
|
||||
soversion: libvirt_so_version,
|
||||
)
|
||||
|
@ -17,6 +17,8 @@ if conf.has('WITH_OPENVZ')
|
||||
conf_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += openvz_lib
|
||||
endif
|
||||
|
||||
if conf.has('WITH_OPENVZ')
|
||||
|
@ -56,6 +56,8 @@ if conf.has('WITH_REMOTE')
|
||||
conf_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += remote_driver_lib
|
||||
endif
|
||||
|
||||
if conf.has('WITH_REMOTE')
|
||||
|
@ -112,3 +112,9 @@ rpc_dep = declare_dependency(
|
||||
include_directories: [ rpc_inc_dir ],
|
||||
sources: [ rpc_gen_headers ],
|
||||
)
|
||||
|
||||
libvirt_libs += [
|
||||
virt_rpc_lib,
|
||||
virt_rpc_client_lib,
|
||||
virt_rpc_server_lib,
|
||||
]
|
||||
|
@ -29,3 +29,5 @@ security_driver_lib = static_library(
|
||||
conf_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += security_driver_lib
|
||||
|
@ -20,5 +20,7 @@ if conf.has('WITH_TEST')
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += test_lib
|
||||
|
||||
install_data(test_driver_assets, install_dir: pkgdatadir)
|
||||
endif
|
||||
|
@ -193,4 +193,6 @@ virt_util_lib = static_library(
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += virt_util_lib
|
||||
|
||||
util_inc_dir = include_directories('.')
|
||||
|
@ -15,6 +15,8 @@ if conf.has('WITH_VMWARE')
|
||||
vmx_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += vmware_lib
|
||||
endif
|
||||
|
||||
if conf.has('WITH_VMWARE')
|
||||
|
@ -15,6 +15,8 @@ if conf.has('WITH_VMX')
|
||||
conf_inc_dir,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += vmx_lib
|
||||
endif
|
||||
|
||||
vmx_inc_dir = include_directories('.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user