Makefile 1.4 KB
Newer Older
R
Robert Relyea 已提交
1 2 3 4 5 6
-include ../config-host.mak
-include $(SRC_PATH)/Makefile.objs
-include $(SRC_PATH)/rules.mak

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

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

# objects linked into a shared library, built with libtool with -fPIC if required
QEMU_OBJS_LIB=$(addsuffix .lo,$(basename $(QEMU_OBJS)))
R
Robert Relyea 已提交
12 13 14

QEMU_CFLAGS+=-I../

A
Alon Levy 已提交
15 16
libcacard.lib-y=$(addsuffix .lo,$(basename $(libcacard-y)))

R
Robert Relyea 已提交
17
vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
A
Alon Levy 已提交
18 19 20 21 22
	$(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"  LINK  $@")

clean:
	rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo .libs/* *.la
	rm -Rf .libs
R
Robert Relyea 已提交
23 24 25

all: vscclient

A
Alon Levy 已提交
26 27 28 29 30 31 32 33 34 35 36 37
#########################################################################
# Rules for building libcacard standalone library

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

install-libcacard:
	@echo "libtool is missing, please install and rerun configure"; exit 1
else
libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB)
	$(call quiet-command,libtool --mode=link --quiet --tag=CC $(CC) $(libcacard_libs) -lrt -rpath $(libdir) -o $@ $^,"  lt LINK $@")
R
Robert Relyea 已提交
38

A
Alon Levy 已提交
39 40 41 42
install-libcacard: libcacard.la
	$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
	libtool --mode=install $(INSTALL_PROG) libcacard.la "$(DESTDIR)$(libdir)"
endif