s390x/pci: drive ISM reset from subsystem reset
[qemu/kevin.git] / contrib / plugins / Makefile
blob0b64d2c1e3a9ce44c59d6ed7e1c2ee3b594850a1
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 # programs that the main configure has already done for us.
9 include config-host.mak
11 TOP_SRC_PATH = $(SRC_PATH)/../..
13 VPATH += $(SRC_PATH)
15 NAMES :=
16 NAMES += execlog
17 NAMES += hotblocks
18 NAMES += hotpages
19 NAMES += howvec
21 # The lockstep example communicates using unix sockets,
22 # and can't be easily made to work on windows.
23 ifneq ($(CONFIG_WIN32),y)
24 NAMES += lockstep
25 endif
27 NAMES += hwprofile
28 NAMES += cache
29 NAMES += drcov
31 ifeq ($(CONFIG_WIN32),y)
32 SO_SUFFIX := .dll
33 LDLIBS += $(shell $(PKG_CONFIG) --libs glib-2.0)
34 else
35 SO_SUFFIX := .so
36 endif
38 SONAMES := $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES)))
40 # The main QEMU uses Glib extensively so it's perfectly fine to use it
41 # in plugins (which many example do).
42 PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0)
43 PLUGIN_CFLAGS += -fPIC -Wall
44 PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu
46 all: $(SONAMES)
48 %.o: %.c
49 $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<
51 ifeq ($(CONFIG_WIN32),y)
52 lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/libqemu_plugin_api.a
53 $(CC) -shared -o $@ $^ $(LDLIBS)
54 else ifeq ($(CONFIG_DARWIN),y)
55 lib%$(SO_SUFFIX): %.o
56 $(CC) -bundle -Wl,-undefined,dynamic_lookup -o $@ $^ $(LDLIBS)
57 else
58 lib%$(SO_SUFFIX): %.o
59 $(CC) -shared -o $@ $^ $(LDLIBS)
60 endif
63 clean:
64 rm -f *.o *$(SO_SUFFIX) *.d
65 rm -Rf .libs
67 .PHONY: all clean
68 .SECONDARY: