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