trap signals for "-serial mon:stdio"
[qemu.git] / libcacard / Makefile
1 libcacard_includedir=$(includedir)/cacard
2
3 TOOLS += vscclient$(EXESUF)
4
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))
11
12 libcacard-lobj-y=$(patsubst %.o,%.lo,$(libcacard-obj-y))
13
14 # libtool will build the .o files, too
15 $(libcacard-obj-y): | $(libcacard-lobj-y)
16
17 all: libcacard.la libcacard.pc
18
19 vscclient$(EXESUF): libcacard/vscclient.o libcacard.la
20 $(call LINK,$^)
21
22 #########################################################################
23 # Rules for building libcacard standalone library
24
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,$^)
30
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 $@")
37
38 .PHONY: install-libcacard
39
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