root / libcacard / Makefile @ 47ecbdf0
History | View | Annotate | Download (2.1 kB)
1 |
-include ../config-host.mak |
---|---|
2 |
-include $(SRC_PATH)/Makefile.objs |
3 |
-include $(SRC_PATH)/rules.mak |
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) |
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 |
clean: |
18 |
rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo */*.lo .libs/* */.libs/* *.la */*.la *.pc |
19 |
rm -Rf .libs */.libs |
20 |
|
21 |
all: libcacard.la libcacard.pc |
22 |
# Dummy command so that make thinks it has done something |
23 |
@true |
24 |
|
25 |
######################################################################### |
26 |
# Rules for building libcacard standalone library |
27 |
|
28 |
ifeq ($(LIBTOOL),) |
29 |
libcacard.la: |
30 |
@echo "libtool is missing, please install and rerun configure"; exit 1 |
31 |
|
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 $@") |
37 |
|
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 $@") |
46 |
|
47 |
.PHONY: install-libcacard |
48 |
|
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 |