aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--Makefile.objs2
-rw-r--r--Makefile.target2
-rw-r--r--io/Makefile.objs12
-rw-r--r--io/meson.build25
-rw-r--r--meson.build1
6 files changed, 28 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index c3cc71cfc0..1ee3398c15 100644
--- a/Makefile
+++ b/Makefile
@@ -246,7 +246,6 @@ dummy := $(call unnest-vars,, \
block-obj-m \
storage-daemon-obj-y \
storage-daemon-obj-m \
- io-obj-y \
common-obj-y \
common-obj-m)
diff --git a/Makefile.objs b/Makefile.objs
index 018338d2db..0920cdb40c 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -21,7 +21,7 @@ block-obj-m = block/
crypto-obj-y = crypto/libcrypto.fa
-io-obj-y = io/
+io-obj-y = io/libio.fa
endif # CONFIG_SOFTMMU or CONFIG_TOOLS
diff --git a/Makefile.target b/Makefile.target
index b213955a81..f6b7a86390 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -194,12 +194,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 9a20fce4ed..0000000000
--- 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 0000000000..768c1b5ec3
--- /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() + genh,
+ dependencies: [io_ss.dependencies()],
+ link_with: libqemuutil,
+ name_suffix: 'fa',
+ build_by_default: false)
+
+io = declare_dependency(link_whole: libio, dependencies: [crypto, qom])
diff --git a/meson.build b/meson.build
index 9d5cd00c89..ece3be725d 100644
--- a/meson.build
+++ b/meson.build
@@ -346,6 +346,7 @@ libqemuutil = static_library('qemuutil',
qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res)
+subdir('io')
subdir('fsdev')
# Other build targets