]> Git Repo - qemu.git/blob - libcacard/Makefile
Merge remote-tracking branch 'bonzini/nbd-next' into staging
[qemu.git] / libcacard / Makefile
1 -include ../config-host.mak
2 -include $(SRC_PATH)/rules.mak
3 -include $(SRC_PATH)/Makefile.objs
4
5 libcacard_includedir=$(includedir)/cacard
6
7 $(call set-vpath, $(SRC_PATH))
8
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) $(stub-obj-y)
11 QEMU_OBJS_LIB=$(patsubst %.o,%.lo,$(QEMU_OBJS))
12
13 QEMU_CFLAGS+=-I../
14
15 libcacard.lib-y=$(patsubst %.o,%.lo,$(libcacard-y))
16
17 vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o cutils.o
18         $(call quiet-command,$(CC) -o $@ $^ $(libcacard_libs) $(LIBS),"  LINK  $@")
19
20 clean:
21         rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo */*.lo .libs/* */.libs/* *.la */*.la *.pc
22         rm -Rf .libs */.libs
23
24 all: libcacard.la libcacard.pc
25 # Dummy command so that make thinks it has done something
26         @true
27
28 #########################################################################
29 # Rules for building libcacard standalone library
30
31 ifeq ($(LIBTOOL),)
32 libcacard.la:
33         @echo "libtool is missing, please install and rerun configure"; exit 1
34
35 install-libcacard:
36         @echo "libtool is missing, please install and rerun configure"; exit 1
37 else
38 libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB)
39         $(call quiet-command,$(LIBTOOL) --mode=link --quiet --tag=CC $(CC) -rpath $(libdir) -o $@ $^ $(libcacard_libs),"  lt LINK $@")
40
41 libcacard_srcpath=$(SRC_PATH)/libcacard
42 libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
43         $(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \
44                 -e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
45             -e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
46                 -e 's|@PREFIX@|$(prefix)|' \
47                 < $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc,\
48         "  GEN   $@")
49
50 .PHONY: install-libcacard
51
52 install-libcacard: libcacard.pc libcacard.la vscclient
53         $(INSTALL_DIR) "$(DESTDIR)$(libdir)"
54         $(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
55         $(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
56         $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
57         $(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
58         $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
59         $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
60         for inc in *.h; do \
61                 $(LIBTOOL) --mode=install $(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \
62         done
63 endif
This page took 0.028503 seconds and 4 git commands to generate.