hw/misc/mps2-fpgaio: Make number of LEDs configurable by board
[qemu/ar7.git] / contrib / plugins / Makefile
blobb9d7935e5ef0c28d52fdc0ea7be779d45b69f52a
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
20 NAMES += hwprofile
22 SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
24 # The main QEMU uses Glib extensively so it's perfectly fine to use it
25 # in plugins (which many example do).
26 CFLAGS = $(GLIB_CFLAGS)
27 CFLAGS += -fPIC
28 CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi)
29 CFLAGS += -I$(SRC_PATH)/include/qemu
31 all: $(SONAMES)
33 %.o: %.c
34 $(CC) $(CFLAGS) -c -o $@ $<
36 lib%.so: %.o
37 $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
39 clean:
40 rm -f *.o *.so *.d
41 rm -Rf .libs
43 .PHONY: all clean