x86: avoid AREG0 for SVM helpers
[qemu/opensuse.git] / libcacard / Makefile
blob63990b70036e536880c34874f5d7f0ddca1f13b6
1 -include ../config-host.mak
2 -include $(SRC_PATH)/Makefile.objs
3 -include $(SRC_PATH)/rules.mak
5 libcacard_includedir=$(includedir)/cacard
7 $(call set-vpath, $(SRC_PATH))
9 # objects linked into a shared library, built with libtool with -fPIC if required
10 QEMU_OBJS=$(oslib-obj-y) qemu-timer-common.o $(trace-obj-y)
11 QEMU_OBJS_LIB=$(patsubst %.o,%.lo,$(QEMU_OBJS))
13 QEMU_CFLAGS+=-I../
15 libcacard.lib-y=$(patsubst %.o,%.lo,$(libcacard-y))
17 clean:
18 rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo */*.lo .libs/* */.libs/* *.la */*.la *.pc
19 rm -Rf .libs */.libs
21 all: libcacard.la libcacard.pc
22 # Dummy command so that make thinks it has done something
23 @true
25 #########################################################################
26 # Rules for building libcacard standalone library
28 ifeq ($(LIBTOOL),)
29 libcacard.la:
30 @echo "libtool is missing, please install and rerun configure"; exit 1
32 install-libcacard:
33 @echo "libtool is missing, please install and rerun configure"; exit 1
34 else
35 libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB)
36 $(call quiet-command,$(LIBTOOL) --mode=link --quiet --tag=CC $(CC) -rpath $(libdir) -o $@ $^ $(libcacard_libs)," lt LINK $@")
38 libcacard_srcpath=$(SRC_PATH)/libcacard
39 libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
40 $(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \
41 -e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
42 -e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
43 -e 's|@PREFIX@|$(prefix)|' \
44 < $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc,\
45 " GEN $@")
47 .PHONY: install-libcacard
49 install-libcacard: libcacard.pc libcacard.la vscclient
50 $(INSTALL_DIR) "$(DESTDIR)$(libdir)"
51 $(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
52 $(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
53 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
54 $(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
55 $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
56 $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
57 for inc in *.h; do \
58 $(LIBTOOL) --mode=install $(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \
59 done
60 endif