root / libcacard / Makefile @ 31a32289
History | View | Annotate | Download (2.3 kB)
1 | 111a38b0 | Robert Relyea | -include ../config-host.mak |
---|---|---|---|
2 | 111a38b0 | Robert Relyea | -include $(SRC_PATH)/rules.mak |
3 | 31a32289 | Paolo Bonzini | -include $(SRC_PATH)/Makefile.objs |
4 | 111a38b0 | Robert Relyea | |
5 | 0f94d6da | Alon Levy | libcacard_includedir=$(includedir)/cacard |
6 | 0f94d6da | Alon Levy | |
7 | 00c705fb | Paolo Bonzini | $(call set-vpath, $(SRC_PATH)) |
8 | 44dc0ca3 | Alon Levy | |
9 | 44dc0ca3 | Alon Levy | # objects linked into a shared library, built with libtool with -fPIC if required |
10 | 00c705fb | Paolo Bonzini | QEMU_OBJS=$(oslib-obj-y) qemu-timer-common.o $(trace-obj-y) |
11 | 00c705fb | Paolo Bonzini | QEMU_OBJS_LIB=$(patsubst %.o,%.lo,$(QEMU_OBJS)) |
12 | 111a38b0 | Robert Relyea | |
13 | 111a38b0 | Robert Relyea | QEMU_CFLAGS+=-I../ |
14 | 111a38b0 | Robert Relyea | |
15 | 00c705fb | Paolo Bonzini | libcacard.lib-y=$(patsubst %.o,%.lo,$(libcacard-y)) |
16 | 44dc0ca3 | Alon Levy | |
17 | 2e679780 | Jim Meyering | vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o cutils.o |
18 | 2e679780 | Jim Meyering | $(call quiet-command,$(CC) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@") |
19 | 2e679780 | Jim Meyering | |
20 | 44dc0ca3 | Alon Levy | clean: |
21 | 47ecbdf0 | Blue Swirl | rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo */*.lo .libs/* */.libs/* *.la */*.la *.pc |
22 | 47ecbdf0 | Blue Swirl | rm -Rf .libs */.libs |
23 | 2ac85b93 | Robert Relyea | |
24 | 00c705fb | Paolo Bonzini | all: libcacard.la libcacard.pc |
25 | c2162a8b | Jan Kiszka | # Dummy command so that make thinks it has done something |
26 | c2162a8b | Jan Kiszka | @true |
27 | 2ac85b93 | Robert Relyea | |
28 | 44dc0ca3 | Alon Levy | ######################################################################### |
29 | 44dc0ca3 | Alon Levy | # Rules for building libcacard standalone library |
30 | 44dc0ca3 | Alon Levy | |
31 | 44dc0ca3 | Alon Levy | ifeq ($(LIBTOOL),) |
32 | 44dc0ca3 | Alon Levy | libcacard.la: |
33 | 44dc0ca3 | Alon Levy | @echo "libtool is missing, please install and rerun configure"; exit 1 |
34 | 44dc0ca3 | Alon Levy | |
35 | 44dc0ca3 | Alon Levy | install-libcacard: |
36 | 44dc0ca3 | Alon Levy | @echo "libtool is missing, please install and rerun configure"; exit 1 |
37 | 44dc0ca3 | Alon Levy | else |
38 | 44dc0ca3 | Alon Levy | libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB) |
39 | 0fc6b582 | Brad | $(call quiet-command,$(LIBTOOL) --mode=link --quiet --tag=CC $(CC) -rpath $(libdir) -o $@ $^ $(libcacard_libs)," lt LINK $@") |
40 | 111a38b0 | Robert Relyea | |
41 | 00c705fb | Paolo Bonzini | libcacard_srcpath=$(SRC_PATH)/libcacard |
42 | 0f94d6da | Alon Levy | libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in |
43 | 47ecbdf0 | Blue Swirl | $(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \ |
44 | 0f94d6da | Alon Levy | -e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \ |
45 | 0f94d6da | Alon Levy | -e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \ |
46 | 0f94d6da | Alon Levy | -e 's|@PREFIX@|$(prefix)|' \ |
47 | 47ecbdf0 | Blue Swirl | < $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc,\ |
48 | 47ecbdf0 | Blue Swirl | " GEN $@") |
49 | 0f94d6da | Alon Levy | |
50 | 0f94d6da | Alon Levy | .PHONY: install-libcacard |
51 | 0f94d6da | Alon Levy | |
52 | 0f94d6da | Alon Levy | install-libcacard: libcacard.pc libcacard.la vscclient |
53 | 44dc0ca3 | Alon Levy | $(INSTALL_DIR) "$(DESTDIR)$(libdir)" |
54 | 0f94d6da | Alon Levy | $(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig" |
55 | 0f94d6da | Alon Levy | $(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)" |
56 | 0f94d6da | Alon Levy | $(INSTALL_DIR) "$(DESTDIR)$(bindir)" |
57 | 3f534581 | Brad | $(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)" |
58 | 9f4facbc | Brad Smith | $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)" |
59 | 3f534581 | Brad | $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig" |
60 | 0f94d6da | Alon Levy | for inc in *.h; do \ |
61 | 3f534581 | Brad | $(LIBTOOL) --mode=install $(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \ |
62 | 0f94d6da | Alon Levy | done |
63 | 44dc0ca3 | Alon Levy | endif |