From: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- Makefile | 1 - Makefile.objs | 7 ++----- Makefile.target | 2 +- io/Makefile.objs | 12 ------------ io/meson.build | 25 +++++++++++++++++++++++++ meson.build | 1 + 6 files changed, 29 insertions(+), 19 deletions(-) delete mode 100644 io/Makefile.objs create mode 100644 io/meson.build
diff --git a/Makefile b/Makefile index d070335..77ac1ea 100644 --- a/Makefile +++ b/Makefile @@ -200,7 +200,6 @@ dummy := $(call unnest-vars,, \ chardev-obj-y \ block-obj-y \ block-obj-m \ - io-obj-y \ common-obj-y \ common-obj-m) diff --git a/Makefile.objs b/Makefile.objs index a5dd228..75d4355c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -21,12 +21,9 @@ authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam) crypto-obj-y = crypto/libcrypto.fa -qom-obj-y = qom/libqom.fa - -####################################################################### -# io-obj-y is code used by both qemu system emulation and qemu-img +io-obj-y = io/libio.fa -io-obj-y = io/ +qom-obj-y = qom/libqom.fa ###################################################################### # Target independent part of system emulation. The long term path is to diff --git a/Makefile.target b/Makefile.target index d8a6491..f912ba0 100644 --- a/Makefile.target +++ b/Makefile.target @@ -179,12 +179,12 @@ include $(SRC_PATH)/Makefile.objs dummy := $(call fix-paths,../,, \ authz-obj-y \ crypto-obj-y \ + io-obj-y \ qom-obj-y) dummy := $(call unnest-vars,.., \ block-obj-y \ block-obj-m \ chardev-obj-y \ - io-obj-y \ common-obj-y \ common-obj-m) all-obj-y += $(common-obj-y) diff --git a/io/Makefile.objs b/io/Makefile.objs deleted file mode 100644 index 9a20fce..0000000 --- a/io/Makefile.objs +++ /dev/null @@ -1,12 +0,0 @@ -io-obj-y = channel.o -io-obj-y += channel-buffer.o -io-obj-y += channel-command.o -io-obj-y += channel-file.o -io-obj-y += channel-socket.o -io-obj-y += channel-tls.o -io-obj-y += channel-watch.o -io-obj-y += channel-websock.o -io-obj-y += channel-util.o -io-obj-y += dns-resolver.o -io-obj-y += net-listener.o -io-obj-y += task.o diff --git a/io/meson.build b/io/meson.build new file mode 100644 index 0000000..5737709 --- /dev/null +++ b/io/meson.build @@ -0,0 +1,25 @@ +io_ss = ss.source_set() +io_ss.add(genh) +io_ss.add(files( + 'channel-buffer.c', + 'channel-command.c', + 'channel-file.c', + 'channel-socket.c', + 'channel-tls.c', + 'channel-util.c', + 'channel-watch.c', + 'channel-websock.c', + 'channel.c', + 'dns-resolver.c', + 'net-listener.c', + 'task.c', +)) + +io_ss = io_ss.apply(config_host, strict: false) +libio = static_library('io', io_ss.sources(), + dependencies: [crypto, qom, io_ss.dependencies()], + link_with: libqemuutil, + name_suffix: 'fa', + build_by_default: false) + +io = declare_dependency(link_whole: libio) diff --git a/meson.build b/meson.build index e8bd526..bdc2f3e 100644 --- a/meson.build +++ b/meson.build @@ -277,6 +277,7 @@ libqemuutil = static_library('qemuutil', qemuutil = declare_dependency(link_with: libqemuutil, sources: version_res) +subdir('io') subdir('fsdev') # Other build targets -- 1.8.3.1