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 BUILD_DIR
:= $(CURDIR
)/..
/..
11 include $(BUILD_DIR
)/config-host.mak
13 VPATH
+= $(SRC_PATH
)/contrib
/plugins
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
:= $(shell $(PKG_CONFIG
) --cflags glib-2.0
)
31 CFLAGS
+= $(if
$(CONFIG_DEBUG_TCG
), -ggdb
-O0
)
32 CFLAGS
+= -I
$(SRC_PATH
)/include/qemu
37 $(CC
) $(CFLAGS
) -c
-o
$@
$<
40 $(CC
) -shared
-Wl
,-soname
,$@
-o
$@
$^
$(LDLIBS
)