qapi/error: Check format string argument in error_*prepend()
[qemu/armbru.git] / tests / plugin / Makefile
blobe9348fde4aee95020b6dc07aa35db6d036bfe417
1 # -*- Mode: makefile -*-
3 # This Makefile example is fairly independent from the main makefile
4 # so users can take and adapt it for their build. We only really
5 # include config-host.mak so we don't have to repeat probing for
6 # cflags that the main configure has already done for us.
9 BUILD_DIR := $(CURDIR)/../..
11 include $(BUILD_DIR)/config-host.mak
13 VPATH += $(SRC_PATH)/tests/plugin
15 NAMES :=
16 NAMES += bb
17 NAMES += empty
18 NAMES += insn
19 NAMES += mem
20 NAMES += hotblocks
21 NAMES += howvec
22 NAMES += hotpages
23 NAMES += lockstep
25 SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
27 # The main QEMU uses Glib extensively so it's perfectly fine to use it
28 # in plugins (which many example do).
29 CFLAGS = $(GLIB_CFLAGS)
30 CFLAGS += -fPIC
31 CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi)
32 CFLAGS += -I$(SRC_PATH)/include/qemu
34 all: $(SONAMES)
36 %.o: %.c
37 $(CC) $(CFLAGS) -c -o $@ $<
39 lib%.so: %.o
40 $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
42 clean:
43 rm -f *.o *.so *.d
44 rm -Rf .libs
46 .PHONY: all clean