glib: Add compat wrapper for g_poll on old glib
[qemu/pbrook.git] / libcacard / Makefile
blob47827a0eb894132d1c3a28bb87382357b32b1d2b
1 libcacard_includedir=$(includedir)/cacard
3 TOOLS += vscclient$(EXESUF)
5 # objects linked into a shared library, built with libtool with -fPIC if required
6 libcacard-obj-y = $(stub-obj-y) $(libcacard-y)
7 libcacard-obj-y += util/osdep.o util/cutils.o util/qemu-timer-common.o util/error.o
8 libcacard-obj-$(CONFIG_WIN32) += util/oslib-win32.o util/qemu-thread-win32.o
9 libcacard-obj-$(CONFIG_POSIX) += util/oslib-posix.o util/qemu-thread-posix.o
10 libcacard-obj-y += $(filter trace/%, $(util-obj-y))
12 libcacard-lobj-y=$(patsubst %.o,%.lo,$(libcacard-obj-y))
14 # libtool will build the .o files, too
15 $(libcacard-obj-y): | $(libcacard-lobj-y)
17 all: libcacard.la libcacard.pc
19 vscclient$(EXESUF): libcacard/vscclient.o libcacard.la
20 $(call LINK,$^)
22 #########################################################################
23 # Rules for building libcacard standalone library
25 libcacard.la: LDFLAGS += -rpath $(libdir) -no-undefined \
26 -export-syms $(SRC_PATH)/libcacard/libcacard.syms
27 libcacard.la: LIBS += $(libcacard_libs)
28 libcacard.la: $(libcacard-lobj-y)
29 $(call LINK,$^)
31 libcacard.pc: $(SRC_PATH)/libcacard/libcacard.pc.in
32 $(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \
33 -e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
34 -e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
35 -e 's|@PREFIX@|$(prefix)|' $< > libcacard.pc,\
36 " GEN $@")
38 .PHONY: install-libcacard
40 install: install-libcacard
41 install-libcacard: libcacard.pc libcacard.la
42 $(INSTALL_DIR) "$(DESTDIR)$(libdir)"
43 $(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
44 $(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
45 $(INSTALL_LIB) libcacard.la "$(DESTDIR)$(libdir)"
46 $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
47 for inc in $(SRC_PATH)/libcacard/*.h; do \
48 $(INSTALL_DATA) $$inc "$(DESTDIR)$(libcacard_includedir)"; \
49 done