[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 075/150] meson: convert dump/
From: |
Paolo Bonzini |
Subject: |
[PATCH 075/150] meson: convert dump/ |
Date: |
Fri, 14 Aug 2020 05:12:11 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile.objs | 3 +--
Makefile.target | 1 -
configure | 4 ++++
dump/Makefile.objs | 3 ---
dump/meson.build | 4 ++++
meson.build | 9 +++++++++
6 files changed, 18 insertions(+), 6 deletions(-)
delete mode 100644 dump/Makefile.objs
create mode 100644 dump/meson.build
diff --git a/Makefile.objs b/Makefile.objs
index ec15ebc4b4..6657a6cce3 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -48,8 +48,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
# single QEMU executable should support all CPUs and machines.
ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = dump/
-common-obj-y += monitor/
+common-obj-y = monitor/
common-obj-y += net/
common-obj-$(CONFIG_LINUX) += fsdev/
diff --git a/Makefile.target b/Makefile.target
index 5f926e5bfa..c8f7a6c04b 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -156,7 +156,6 @@ endif #CONFIG_BSD_USER
ifdef CONFIG_SOFTMMU
obj-y += softmmu/
obj-y += gdbstub.o
-obj-y += dump/
obj-y += hw/
obj-y += monitor/
obj-y += qapi/
diff --git a/configure b/configure
index 454a244141..ebce9e6766 100755
--- a/configure
+++ b/configure
@@ -2571,6 +2571,7 @@ int main(void) { lzo_version(); return 0; }
EOF
if compile_prog "" "-llzo2" ; then
libs_softmmu="$libs_softmmu -llzo2"
+ lzo_libs="-llzo2"
lzo="yes"
else
if test "$lzo" = "yes"; then
@@ -2590,6 +2591,7 @@ int main(void) { snappy_max_compressed_length(4096);
return 0; }
EOF
if compile_prog "" "-lsnappy" ; then
libs_softmmu="$libs_softmmu -lsnappy"
+ snappy_libs='-lsnappy'
snappy="yes"
else
if test "$snappy" = "yes"; then
@@ -7419,10 +7421,12 @@ fi
if test "$lzo" = "yes" ; then
echo "CONFIG_LZO=y" >> $config_host_mak
+ echo "LZO_LIBS=$lzo_libs" >> $config_host_mak
fi
if test "$snappy" = "yes" ; then
echo "CONFIG_SNAPPY=y" >> $config_host_mak
+ echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak
fi
if test "$bzip2" = "yes" ; then
diff --git a/dump/Makefile.objs b/dump/Makefile.objs
deleted file mode 100644
index d2a5db3b81..0000000000
--- a/dump/Makefile.objs
+++ /dev/null
@@ -1,3 +0,0 @@
-obj-y += dump.o
-common-obj-y += dump-hmp-cmds.o
-obj-$(TARGET_X86_64) += win_dump.o
diff --git a/dump/meson.build b/dump/meson.build
new file mode 100644
index 0000000000..2eff29c3ea
--- /dev/null
+++ b/dump/meson.build
@@ -0,0 +1,4 @@
+softmmu_ss.add(files('dump-hmp-cmds.c'))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy,
lzo])
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], if_true:
files('win_dump.c'))
diff --git a/meson.build b/meson.build
index 98ba7a09f6..648febf65b 100644
--- a/meson.build
+++ b/meson.build
@@ -296,6 +296,14 @@ if 'CONFIG_FDT' in config_host
fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(),
link_args: config_host['FDT_LIBS'].split())
endif
+snappy = not_found
+if 'CONFIG_SNAPPY' in config_host
+ snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split())
+endif
+lzo = not_found
+if 'CONFIG_LZO' in config_host
+ lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split())
+endif
create_config = find_program('scripts/create_config')
minikconf = find_program('scripts/minikconf.py')
@@ -603,6 +611,7 @@ subdir('io')
subdir('chardev')
subdir('fsdev')
subdir('target')
+subdir('dump')
block_ss.add(files(
'block.c',
--
2.26.2
- [PATCH 065/150] meson: qemu-{img,io,nbd}, (continued)
- [PATCH 065/150] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2020/08/14
- [PATCH 061/150] meson: infrastructure for building emulators, Paolo Bonzini, 2020/08/14
- [PATCH 062/150] meson: add modules infrastructure, Paolo Bonzini, 2020/08/14
- [PATCH 068/150] meson: convert chardev directory to Meson (emulator part), Paolo Bonzini, 2020/08/14
- [PATCH 069/150] meson: convert tests/qtest to meson, Paolo Bonzini, 2020/08/14
- [PATCH 066/150] meson: qemu-pr-helper, Paolo Bonzini, 2020/08/14
- [PATCH 064/150] meson: convert block, Paolo Bonzini, 2020/08/14
- [PATCH 067/150] configure, Makefile; remove TOOLS and HELPERS-y variable, Paolo Bonzini, 2020/08/14
- [PATCH 072/150] meson: convert root directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 076/150] meson: convert common QMP bits for qemu and qemu-storage-daemon, Paolo Bonzini, 2020/08/14
- [PATCH 075/150] meson: convert dump/,
Paolo Bonzini <=
- [PATCH 073/150] meson: convert most of softmmu/, Paolo Bonzini, 2020/08/14
- [PATCH 079/150] meson: convert migration directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 078/150] meson: convert replay directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 070/150] meson: convert audio directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 077/150] meson: convert qemu-storage-daemon, Paolo Bonzini, 2020/08/14
- [PATCH 074/150] meson: convert trace/, Paolo Bonzini, 2020/08/14
- [PATCH 071/150] meson: convert ui directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 080/150] meson: convert net directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 081/150] meson: convert backends directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 082/150] meson: convert fsdev/, Paolo Bonzini, 2020/08/14