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
))
15 libcacard.lib-y
=$(patsubst %.o
,%.lo
,$(libcacard-y
))
18 rm -f
*.o
*/*.o
*.d
*/*.d
*.a
*/*.a
*~
*/*~ vscclient
*.lo
*/*.lo .libs
/* */.libs
/* *.la
*/*.la
*.
pc
21 all: libcacard.la libcacard.
pc
22 # Dummy command so that make thinks it has done something
25 #########################################################################
26 # Rules for building libcacard standalone library
30 @echo
"libtool is missing, please install and rerun configure"; exit
1
33 @echo
"libtool is missing, please install and rerun configure"; exit
1
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,\
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"
58 $(LIBTOOL
) --mode
=install $(INSTALL_DATA
) $(libcacard_srcpath
)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \