meson: convert sample plugins
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
859aef026e
commit
ffac93df19
4
configure
vendored
4
configure
vendored
@ -6881,9 +6881,6 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak
|
||||
|
||||
echo "ARCH=$ARCH" >> $config_host_mak
|
||||
|
||||
echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
|
||||
echo "GLIB_LDFLAGS=$glib_ldflags" >> $config_host_mak
|
||||
|
||||
if test "$default_devices" = "yes" ; then
|
||||
echo "CONFIG_MINIKCONF_MODE=--defconfig" >> $config_host_mak
|
||||
else
|
||||
@ -8328,7 +8325,6 @@ DIRS="$DIRS roms/seabios"
|
||||
LINKS="Makefile"
|
||||
LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
|
||||
LINKS="$LINKS tests/tcg/Makefile.target"
|
||||
LINKS="$LINKS tests/plugin/Makefile"
|
||||
LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
|
||||
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
|
||||
LINKS="$LINKS roms/seabios/Makefile"
|
||||
|
@ -429,15 +429,6 @@ check-speed: $(check-speed-y)
|
||||
check-report-unit.tap: $(check-unit-y)
|
||||
$(call do_test_tap,$^)
|
||||
|
||||
# Plugins
|
||||
ifeq ($(CONFIG_PLUGIN),y)
|
||||
.PHONY: plugins
|
||||
plugins:
|
||||
$(call quiet-command,\
|
||||
$(MAKE) $(SUBDIR_MAKEFLAGS) -C tests/plugin V="$(V)", \
|
||||
"BUILD", "plugins")
|
||||
endif
|
||||
|
||||
# Per guest TCG tests
|
||||
|
||||
BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
|
||||
|
@ -9,6 +9,9 @@ test('decodetree', sh,
|
||||
|
||||
if 'CONFIG_TCG' in config_host
|
||||
subdir('fp')
|
||||
if 'CONFIG_PLUGIN' in config_host
|
||||
subdir('plugin')
|
||||
endif
|
||||
endif
|
||||
|
||||
subdir('qapi-schema')
|
||||
|
@ -1,46 +0,0 @@
|
||||
# -*- Mode: makefile -*-
|
||||
#
|
||||
# This Makefile example is fairly independent from the main makefile
|
||||
# so users can take and adapt it for their build. We only really
|
||||
# include config-host.mak so we don't have to repeat probing for
|
||||
# cflags that the main configure has already done for us.
|
||||
#
|
||||
|
||||
BUILD_DIR := $(CURDIR)/../..
|
||||
|
||||
include $(BUILD_DIR)/config-host.mak
|
||||
|
||||
VPATH += $(SRC_PATH)/tests/plugin
|
||||
|
||||
NAMES :=
|
||||
NAMES += bb
|
||||
NAMES += empty
|
||||
NAMES += insn
|
||||
NAMES += mem
|
||||
NAMES += hotblocks
|
||||
NAMES += howvec
|
||||
NAMES += hotpages
|
||||
NAMES += lockstep
|
||||
|
||||
SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
|
||||
|
||||
# The main QEMU uses Glib extensively so it's perfectly fine to use it
|
||||
# in plugins (which many example do).
|
||||
CFLAGS = $(GLIB_CFLAGS)
|
||||
CFLAGS += -fPIC
|
||||
CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi)
|
||||
CFLAGS += -I$(SRC_PATH)/include/qemu
|
||||
|
||||
all: $(SONAMES)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
lib%.so: %.o
|
||||
$(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.so *.d
|
||||
rm -Rf .libs
|
||||
|
||||
.PHONY: all clean
|
7
tests/plugin/meson.build
Normal file
7
tests/plugin/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
t = []
|
||||
foreach i : ['bb', 'empty', 'insn', 'mem', 'hotblocks', 'howvec', 'hotpages', 'lockstep']
|
||||
t += shared_module(i, files(i + '.c'),
|
||||
include_directories: '../../include/qemu',
|
||||
dependencies: glib)
|
||||
endforeach
|
||||
alias_target('plugins', t)
|
Loading…
x
Reference in New Issue
Block a user