spapr_pci: add spapr msi read method
[qemu/ar7.git] / contrib / plugins / Makefile
blob7801b08b0d6e1e2ee17ca0e481da7c120eb84aae
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)/contrib/plugins
15 NAMES :=
16 NAMES += hotblocks
17 NAMES += hotpages
18 NAMES += howvec
19 NAMES += lockstep
21 SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
23 # The main QEMU uses Glib extensively so it's perfectly fine to use it
24 # in plugins (which many example do).
25 CFLAGS = $(GLIB_CFLAGS)
26 CFLAGS += -fPIC
27 CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi)
28 CFLAGS += -I$(SRC_PATH)/include/qemu
30 all: $(SONAMES)
32 %.o: %.c
33 $(CC) $(CFLAGS) -c -o $@ $<
35 lib%.so: %.o
36 $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
38 clean:
39 rm -f *.o *.so *.d
40 rm -Rf .libs
42 .PHONY: all clean