crypto/cipher-gnutls.c: Clean up local variable shadowing
[qemu/armbru.git] / contrib / plugins / Makefile
blob8ba78c7a329f2083585b733d254376fecb214910
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
20 NAMES += lockstep
21 NAMES += hwprofile
22 NAMES += cache
23 NAMES += drcov
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 PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0)
30 PLUGIN_CFLAGS += -fPIC -Wall
31 PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu
33 all: $(SONAMES)
35 %.o: %.c
36 $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<
38 lib%.so: %.o
39 ifeq ($(CONFIG_DARWIN),y)
40 $(CC) -bundle -Wl,-undefined,dynamic_lookup -o $@ $^ $(LDLIBS)
41 else
42 $(CC) -shared -o $@ $^ $(LDLIBS)
43 endif
45 clean:
46 rm -f *.o *.so *.d
47 rm -Rf .libs
49 .PHONY: all clean
50 .SECONDARY: