[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v8 073/152] meson: convert root directory to Meson
From: |
Paolo Bonzini |
Subject: |
[PULL v8 073/152] meson: convert root directory to Meson |
Date: |
Fri, 21 Aug 2020 06:22:10 -0400 |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile.objs | 21 ++-------------------
Makefile.target | 2 +-
configure | 2 ++
meson.build | 33 +++++++++++++++++++++++++++++++++
4 files changed, 38 insertions(+), 20 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index 72e935023d..ec15ebc4b4 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -48,16 +48,9 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
# single QEMU executable should support all CPUs and machines.
ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = blockdev.o blockdev-nbd.o
-common-obj-y += bootdevice.o iothread.o
-common-obj-y += dump/
-common-obj-y += job-qmp.o
+common-obj-y = dump/
common-obj-y += monitor/
common-obj-y += net/
-common-obj-y += qdev-monitor.o
-common-obj-$(CONFIG_WIN32) += os-win32.o
-common-obj-$(CONFIG_POSIX) += os-posix.o
-
common-obj-$(CONFIG_LINUX) += fsdev/
common-obj-y += accel/
@@ -87,25 +80,15 @@ common-obj-y += hw/
common-obj-m += hw/
common-obj-y += replay/
-
-common-obj-y += dma-helpers.o
-common-obj-$(CONFIG_TPM) += tpm.o
-
common-obj-y += backends/
-common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
-qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
-qemu-seccomp.o-libs := $(SECCOMP_LIBS)
-
-common-obj-$(CONFIG_FDT) += device_tree.o
-
common-obj-y += qapi/
endif # CONFIG_SOFTMMU
#######################################################################
# Target-independent parts used in system and user emulation
-common-obj-y += cpus-common.o
+
common-obj-y += hw/
common-obj-y += qom/
common-obj-y += disas/
diff --git a/Makefile.target b/Makefile.target
index 16f1e781e9..5f926e5bfa 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -169,7 +169,7 @@ ifneq ($(CONFIG_MODULES),y)
LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS)
LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS)
$(ICONV_LIBS) $(GIO_LIBS)
endif
-LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS)
+LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS)
$(SECCOMP_LIBS)
LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
# Hardware support
diff --git a/configure b/configure
index 98252ca38a..a90dfc964b 100755
--- a/configure
+++ b/configure
@@ -7376,6 +7376,8 @@ if test "$preadv" = "yes" ; then
fi
if test "$fdt" != "no" ; then
echo "CONFIG_FDT=y" >> $config_host_mak
+ echo "FDT_CFLAGS=$fdt_cflags" >> $config_host_mak
+ echo "FDT_LIBS=$fdt_ldflags $fdt_libs" >> $config_host_mak
fi
if test "$membarrier" = "yes" ; then
echo "CONFIG_MEMBARRIER=y" >> $config_host_mak
diff --git a/meson.build b/meson.build
index ca1e6906b7..ff200900ed 100644
--- a/meson.build
+++ b/meson.build
@@ -51,6 +51,7 @@ targetos = host_machine.system()
m = cc.find_library('m', required: false)
util = cc.find_library('util', required: false)
+winmm = []
socket = []
version_res = []
coref = []
@@ -59,6 +60,7 @@ cocoa = []
hvf = []
if targetos == 'windows'
socket = cc.find_library('ws2_32')
+ winmm = cc.find_library('winmm')
win = import('windows')
version_res = win.compile_resources('version.rc',
@@ -293,6 +295,11 @@ if 'CONFIG_VNC_SASL' in config_host
sasl = declare_dependency(compile_args: config_host['SASL_CFLAGS'].split(),
link_args: config_host['SASL_LIBS'].split())
endif
+fdt = not_found
+if 'CONFIG_FDT' in config_host
+ fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(),
+ link_args: config_host['FDT_LIBS'].split())
+endif
create_config = find_program('scripts/create_config')
minikconf = find_program('scripts/minikconf.py')
@@ -459,6 +466,7 @@ util_ss = ss.source_set()
stub_ss = ss.source_set()
trace_ss = ss.source_set()
block_ss = ss.source_set()
+blockdev_ss = ss.source_set()
common_ss = ss.source_set()
softmmu_ss = ss.source_set()
user_ss = ss.source_set()
@@ -612,6 +620,31 @@ subdir('nbd')
subdir('scsi')
subdir('block')
+blockdev_ss.add(files(
+ 'blockdev.c',
+ 'blockdev-nbd.c',
+ 'iothread.c',
+ 'job-qmp.c',
+))
+
+# os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
+# os-win32.c does not
+blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
+softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
+
+softmmu_ss.add_all(blockdev_ss)
+softmmu_ss.add(files(
+ 'bootdevice.c',
+ 'dma-helpers.c',
+ 'qdev-monitor.c',
+), sdl)
+
+softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
+softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'),
seccomp])
+softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')])
+
+common_ss.add(files('cpus-common.c'))
+
# needed for fuzzing binaries
subdir('tests/qtest/libqos')
--
2.26.2
- [PULL v8 061/152] meson: convert target/s390x/gen-features.h, (continued)
- [PULL v8 061/152] meson: convert target/s390x/gen-features.h, Paolo Bonzini, 2020/08/21
- [PULL v8 056/152] meson: convert check-qapi-schema, Paolo Bonzini, 2020/08/21
- [PULL v8 052/152] meson: generate hxtool files, Paolo Bonzini, 2020/08/21
- [PULL v8 063/152] meson: add modules infrastructure, Paolo Bonzini, 2020/08/21
- [PULL v8 059/152] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 064/152] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2020/08/21
- [PULL v8 053/152] meson: handle edk2 bios and descriptors, Paolo Bonzini, 2020/08/21
- [PULL v8 067/152] meson: qemu-pr-helper, Paolo Bonzini, 2020/08/21
- [PULL v8 060/152] meson: convert io directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 055/152] meson: convert tests/fp and check-softfloat, Paolo Bonzini, 2020/08/21
- [PULL v8 073/152] meson: convert root directory to Meson,
Paolo Bonzini <=
- [PULL v8 074/152] meson: convert most of softmmu/, Paolo Bonzini, 2020/08/21
- [PULL v8 075/152] meson: convert trace/, Paolo Bonzini, 2020/08/21
- [PULL v8 065/152] meson: convert block, Paolo Bonzini, 2020/08/21
- [PULL v8 058/152] meson: convert authz directory to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 068/152] configure, Makefile; remove TOOLS and HELPERS-y variable, Paolo Bonzini, 2020/08/21
- [PULL v8 062/152] meson: infrastructure for building emulators, Paolo Bonzini, 2020/08/21
- [PULL v8 066/152] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2020/08/21
- [PULL v8 069/152] meson: convert chardev directory to Meson (emulator part), Paolo Bonzini, 2020/08/21
- [PULL v8 076/152] meson: convert dump/, Paolo Bonzini, 2020/08/21
- [PULL v8 071/152] meson: convert audio directory to Meson, Paolo Bonzini, 2020/08/21