Revision 44dc0ca3 libcacard/Makefile

b/libcacard/Makefile
4 4

  
5 5
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/libcacard)
6 6

  
7
QEMU_OBJS=$(addprefix ../, $(oslib-obj-y) $(trace-obj-y) qemu-malloc.o qemu-timer-common.o)
7
# objects linked against normal qemu binaries, not compiled with libtool
8
QEMU_OBJS=$(addprefix ../,$(oslib-obj-y) qemu-malloc.o qemu-timer-common.o $(trace-obj-y))
9

  
10
# objects linked into a shared library, built with libtool with -fPIC if required
11
QEMU_OBJS_LIB=$(addsuffix .lo,$(basename $(QEMU_OBJS)))
8 12

  
9 13
QEMU_CFLAGS+=-I../
10 14

  
15
libcacard.lib-y=$(addsuffix .lo,$(basename $(libcacard-y)))
16

  
11 17
vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
12
	$(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"  LINK  $(TARGET_DIR)$@")
18
	$(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"  LINK  $@")
19

  
20
clean:
21
	rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo .libs/* *.la
22
	rm -Rf .libs
13 23

  
14 24
all: vscclient
15 25

  
16
clean:
17
	rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient
26
#########################################################################
27
# Rules for building libcacard standalone library
28

  
29
ifeq ($(LIBTOOL),)
30
libcacard.la:
31
	@echo "libtool is missing, please install and rerun configure"; exit 1
32

  
33
install-libcacard:
34
	@echo "libtool is missing, please install and rerun configure"; exit 1
35
else
36
libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB)
37
	$(call quiet-command,libtool --mode=link --quiet --tag=CC $(CC) $(libcacard_libs) -lrt -rpath $(libdir) -o $@ $^,"  lt LINK $@")
18 38

  
39
install-libcacard: libcacard.la
40
	$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
41
	libtool --mode=install $(INSTALL_PROG) libcacard.la "$(DESTDIR)$(libdir)"
42
endif

Also available in: Unified diff