[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 055/142] meson: convert root directory to Meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 055/142] meson: convert root directory to Meson |
Date: |
Tue, 28 Jan 2020 18:52:15 +0100 |
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile.objs | 25 ++-----------------------
Makefile.target | 2 +-
configure | 2 ++
meson.build | 32 ++++++++++++++++++++++++++++++++
4 files changed, 37 insertions(+), 24 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index 5081994123..bdfb6410de 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -35,17 +35,10 @@ qom-obj-y = qom/libqom.fa
# single QEMU executable should support all CPUs and machines.
ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = blockdev.o blockdev-nbd.o block/
-
-common-obj-y += bootdevice.o iothread.o
+common-obj-y = block/
common-obj-y += dump/
-common-obj-y += job-qmp.o
common-obj-y += monitor/
common-obj-y += net/
-common-obj-y += qdev-monitor.o device-hotplug.o
-common-obj-$(CONFIG_WIN32) += os-win32.o
-common-obj-$(CONFIG_POSIX) += os-posix.o
-
common-obj-$(CONFIG_LINUX) += fsdev/
common-obj-y += accel/
@@ -72,27 +65,13 @@ common-obj-$(if $(CONFIG_LZFSE),m) +=
block-dmg-lzfse$(DSOSUF)
common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) +=
block-dmg-bz2$(DSOSUF)
common-obj-y += hw/
-
common-obj-y += replay/
-
-common-obj-y += dma-helpers.o
-common-obj-y += vl.o
-vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
-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
-
endif
#######################################################################
# 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 ae4e494ec6..638e550530 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -170,7 +170,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 80a7c0f069..1af0a73e39 100755
--- a/configure
+++ b/configure
@@ -7066,6 +7066,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 6fb86e4bd3..cac9c894f4 100644
--- a/meson.build
+++ b/meson.build
@@ -37,6 +37,7 @@ configure_file(input: files('scripts/ninjatool.py'),
m = cc.find_library('m', required: false)
util = cc.find_library('util', required: false)
+winmm = []
socket = []
version_res = []
coref = []
@@ -45,6 +46,7 @@ cocoa = []
hvf = []
if host_machine.system() == 'windows'
socket = cc.find_library('ws2_32')
+ winmm = cc.find_library('winmm')
win = import('windows')
version_res = win.compile_resources('version.rc',
@@ -252,6 +254,16 @@ 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
+seccomp = declare_dependency()
+if 'CONFIG_SECCOMP' in config_host
+ seccomp = declare_dependency(compile_args:
config_host['SECCOMP_CFLAGS'].split(),
+ link_args: config_host['SECCOMP_LIBS'].split())
+endif
+fdt = declare_dependency()
+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')
@@ -559,6 +571,26 @@ subdir('nbd')
subdir('scsi')
subdir('block')
+softmmu_ss.add(files(
+ 'blockdev-nbd.c',
+ 'blockdev.c',
+ 'bootdevice.c',
+ 'device-hotplug.c',
+ 'dma-helpers.c',
+ 'iothread.c',
+ 'job-qmp.c',
+ 'qdev-monitor.c',
+ 'vl.c',
+), sdl)
+
+softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c'), winmm])
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
+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'))
+
mods = []
block_mods = []
softmmu_mods = []
--
2.21.0
- [PATCH 044/142] meson: infrastructure for building emulators, (continued)
- [PATCH 044/142] meson: infrastructure for building emulators, Paolo Bonzini, 2020/01/28
- [PATCH 046/142] meson: add modules infrastructure, Paolo Bonzini, 2020/01/28
- [PATCH 047/142] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2020/01/28
- [PATCH 048/142] meson: convert block, Paolo Bonzini, 2020/01/28
- [PATCH 049/142] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2020/01/28
- [PATCH 052/142] meson: convert chardev directory to Meson (emulator part), Paolo Bonzini, 2020/01/28
- [PATCH 050/142] meson: qemu-pr-helper, Paolo Bonzini, 2020/01/28
- [PATCH 051/142] configure, Makefile; remove TOOLS and HELPERS-y variable, Paolo Bonzini, 2020/01/28
- [PATCH 053/142] meson: convert audio directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 054/142] meson: convert ui directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 055/142] meson: convert root directory to Meson,
Paolo Bonzini <=
- [PATCH 057/142] meson: convert qom/, Paolo Bonzini, 2020/01/28
- [PATCH 056/142] meson: convert trace/, Paolo Bonzini, 2020/01/28
- [PATCH 058/142] meson: convert block/, Paolo Bonzini, 2020/01/28
- [PATCH 059/142] meson: convert dump/, Paolo Bonzini, 2020/01/28
- [PATCH 060/142] meson: convert monitor directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 061/142] meson: convert replay directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 062/142] meson: convert migration directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 063/142] meson: build softmmu-specific migration/ram.c, Paolo Bonzini, 2020/01/28
- [PATCH 064/142] meson: convert net directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 065/142] meson: convert backends directory to Meson, Paolo Bonzini, 2020/01/28