@@ -257,11 +257,6 @@ Makefile: $(version-obj-y)
COMMON_LDADDS = libqemuutil.a
-scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
-ifdef CONFIG_MPATH
-scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
-endif
-
clean: recurse-clean
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
@@ -6222,7 +6222,6 @@ if test "$softmmu" = yes ; then
fi
mpath=no
fi
- tools="$tools scsi/qemu-pr-helper\$(EXESUF)"
else
if test "$virtfs" = yes; then
error_exit "VirtFS is supported only on Linux"
@@ -112,6 +112,10 @@ if 'CONFIG_XKBCOMMON' in config_host
link_args: config_host['XKBCOMMON_LIBS'].split())
endif
rt = cc.find_library('rt', required: false)
+libmpathpersist = declare_dependency()
+if config_host.has_key('CONFIG_MPATH')
+ libmpathpersist = cc.find_library('mpathpersist')
+endif
libiscsi = declare_dependency()
if 'CONFIG_LIBISCSI' in config_host
libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
@@ -582,6 +586,7 @@ foreach target : target_dirs
endforeach
# Other build targets
+
if 'CONFIG_GUEST_AGENT' in config_host
subdir('qga')
endif
@@ -622,6 +627,11 @@ if have_tools
dependencies: [qemuutil, libcap_ng],
install: true,
install_dir: get_option('libexecdir'))
+
+ executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'),
+ dependencies: [authz, crypto, io, qom, qemuutil,
+ libcap_ng, libudev, libmpathpersist],
+ install: true)
endif
if 'CONFIG_IVSHMEM' in config_host