提交 00c705fb 编写于 作者: P Paolo Bonzini

build: libcacard Makefile cleanups

Build vscclient from toplevel Makefile, limit usage of vpath.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 49ac9e0a
...@@ -147,6 +147,10 @@ libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(t ...@@ -147,6 +147,10 @@ libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(t
install-libcacard: libcacard.la install-libcacard: libcacard.la
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,) $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,)
endif endif
vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) qemu-timer-common.o libcacard/vscclient.o
$(call quiet-command,$(CC) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@")
###################################################################### ######################################################################
qemu-img.o: qemu-img-cmds.h qemu-img.o: qemu-img-cmds.h
......
...@@ -198,7 +198,13 @@ $(trace-obj-y): $(GENERATED_HEADERS) ...@@ -198,7 +198,13 @@ $(trace-obj-y): $(GENERATED_HEADERS)
###################################################################### ######################################################################
# smartcard # smartcard
libcacard-y = cac.o event.o vcard.o vreader.o vcard_emul_nss.o vcard_emul_type.o card_7816.o libcacard-y += libcacard/cac.o libcacard/event.o
libcacard-y += libcacard/vcard.o libcacard/vreader.o
libcacard-y += libcacard/vcard_emul_nss.o
libcacard-y += libcacard/vcard_emul_type.o
libcacard-y += libcacard/card_7816.o
common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
###################################################################### ######################################################################
# qapi # qapi
......
...@@ -164,16 +164,10 @@ all-obj-y = $(obj-y) ...@@ -164,16 +164,10 @@ all-obj-y = $(obj-y)
all-obj-y += $(addprefix ../, $(universal-obj-y)) all-obj-y += $(addprefix ../, $(universal-obj-y))
ifdef CONFIG_SOFTMMU ifdef CONFIG_SOFTMMU
all-obj-y += $(addprefix ../, $(common-obj-y)) all-obj-y += $(addprefix ../, $(common-obj-y))
all-obj-y += $(addprefix ../libdis/, $(libdis-y)) all-obj-y += $(addprefix ../libdis/, $(libdis-y))
all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y)) all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
all-obj-y += $(addprefix ../, $(trace-obj-y)) all-obj-y += $(addprefix ../, $(trace-obj-y))
# libcacard needs qemu-thread support, and besides is only needed by devices
# so not requires with linux-user / bsd-user targets
all-obj-$(CONFIG_SMARTCARD_NSS) += $(addprefix ../libcacard/, $(libcacard-y))
else else
all-obj-y += $(addprefix ../libuser/, $(user-obj-y)) all-obj-y += $(addprefix ../libuser/, $(user-obj-y))
all-obj-y += $(addprefix ../libdis-user/, $(libdis-y)) all-obj-y += $(addprefix ../libdis-user/, $(libdis-y))
......
...@@ -2927,6 +2927,9 @@ if test "$softmmu" = yes ; then ...@@ -2927,6 +2927,9 @@ if test "$softmmu" = yes ; then
fi fi
fi fi
fi fi
if test "$smartcard_nss" = "yes" ; then
tools="vscclient\$(EXESUF) $tools"
fi
# Mac OS X ships with a broken assembler # Mac OS X ships with a broken assembler
roms= roms=
...@@ -3959,9 +3962,10 @@ DIRS="$DIRS roms/seabios roms/vgabios" ...@@ -3959,9 +3962,10 @@ DIRS="$DIRS roms/seabios roms/vgabios"
DIRS="$DIRS fsdev ui hw hw/usb" DIRS="$DIRS fsdev ui hw hw/usb"
DIRS="$DIRS qapi qapi-generated" DIRS="$DIRS qapi qapi-generated"
DIRS="$DIRS qga trace qom" DIRS="$DIRS qga trace qom"
DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
FILES="Makefile tests/tcg/Makefile qdict-test-data.txt" FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
FILES="$FILES tests/tcg/lm32/Makefile" FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"
FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
FILES="$FILES pc-bios/spapr-rtas/Makefile" FILES="$FILES pc-bios/spapr-rtas/Makefile"
FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile" FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
...@@ -4005,12 +4009,6 @@ for hwlib in 32 64; do ...@@ -4005,12 +4009,6 @@ for hwlib in 32 64; do
echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" > $d/config.mak echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" > $d/config.mak
done done
if [ "$source_path" != `pwd` ]; then
# out of tree build
mkdir -p libcacard
symlink "$source_path/libcacard/Makefile" libcacard/Makefile
fi
d=libuser d=libuser
mkdir -p $d mkdir -p $d
mkdir -p $d/trace mkdir -p $d/trace
......
...@@ -2,29 +2,23 @@ ...@@ -2,29 +2,23 @@
-include $(SRC_PATH)/Makefile.objs -include $(SRC_PATH)/Makefile.objs
-include $(SRC_PATH)/rules.mak -include $(SRC_PATH)/rules.mak
libcacard_srcpath=$(SRC_PATH)/libcacard
libcacard_includedir=$(includedir)/cacard libcacard_includedir=$(includedir)/cacard
$(call set-vpath, $(SRC_PATH):$(libcacard_srcpath)) $(call set-vpath, $(SRC_PATH))
# objects linked against normal qemu binaries, not compiled with libtool
QEMU_OBJS=$(addprefix ../,$(oslib-obj-y) qemu-timer-common.o $(trace-obj-y))
# objects linked into a shared library, built with libtool with -fPIC if required # objects linked into a shared library, built with libtool with -fPIC if required
QEMU_OBJS_LIB=$(addsuffix .lo,$(basename $(QEMU_OBJS))) QEMU_OBJS=$(oslib-obj-y) qemu-timer-common.o $(trace-obj-y)
QEMU_OBJS_LIB=$(patsubst %.o,%.lo,$(QEMU_OBJS))
QEMU_CFLAGS+=-I../ QEMU_CFLAGS+=-I../
libcacard.lib-y=$(addsuffix .lo,$(basename $(libcacard-y))) libcacard.lib-y=$(patsubst %.o,%.lo,$(libcacard-y))
vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
$(call quiet-command,$(CC) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@")
clean: clean:
rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo .libs/* *.la *.pc rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo .libs/* *.la *.pc
rm -Rf .libs rm -Rf .libs
all: vscclient all: libcacard.la libcacard.pc
# Dummy command so that make thinks it has done something # Dummy command so that make thinks it has done something
@true @true
...@@ -41,6 +35,7 @@ else ...@@ -41,6 +35,7 @@ else
libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB) libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB)
$(call quiet-command,$(LIBTOOL) --mode=link --quiet --tag=CC $(CC) -rpath $(libdir) -o $@ $^ $(libcacard_libs)," lt LINK $@") $(call quiet-command,$(LIBTOOL) --mode=link --quiet --tag=CC $(CC) -rpath $(libdir) -o $@ $^ $(libcacard_libs)," lt LINK $@")
libcacard_srcpath=$(SRC_PATH)/libcacard
libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
sed -e 's|@LIBDIR@|$(libdir)|' \ sed -e 's|@LIBDIR@|$(libdir)|' \
-e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \ -e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册