PPC: Fix missing TRACE exception
[qemu/agraf.git] / libcacard / Makefile
blobc26aac65c38452ae4c2149bb59330697851f03c1
1 -include ../config-host.mak
2 -include $(SRC_PATH)/rules.mak
3 -include $(SRC_PATH)/Makefile.objs
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) $(stub-obj-y)
11 QEMU_OBJS_LIB=$(patsubst %.o,%.lo,$(QEMU_OBJS))
13 QEMU_CFLAGS+=-I../
15 libcacard.lib-y=$(patsubst %.o,%.lo,$(libcacard-y))
17 vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o cutils.o
18 $(call quiet-command,$(CC) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@")
20 clean:
21 rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo */*.lo .libs/* */.libs/* *.la */*.la *.pc
22 rm -Rf .libs */.libs
24 all: libcacard.la libcacard.pc
25 # Dummy command so that make thinks it has done something
26 @true
28 #########################################################################
29 # Rules for building libcacard standalone library
31 ifeq ($(LIBTOOL),)
32 libcacard.la:
33 @echo "libtool is missing, please install and rerun configure"; exit 1
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 $@")
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 $@")
50 .PHONY: install-libcacard
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