δΊ 2012-9-27 16:30, Paolo Bonzini ει:
Il 27/09/2012 04:24, Wenchao Xia ha scritto:
+#libqblock
+LIBQBLOCK_TEST_DIR=$(SRC_PATH)/tests/libqblock/test_images
+qtest-lib-y=$(patsubst %.o, %.lo,$(qtest-obj-y))
I don't think you need qtest-obj-y for anything.
OK, I will remove it.
+libqblock-la-path = $(libqblock-lib-path)/$(libqblock-lib-la)
+
+tests/libqblock/%.lo: QEMU_INCLUDES += -I$(libqblock-lib-path) -Itests
+
+check-libqblock-y = tests/libqblock/check-libqblock-qcow2$(EXESUF)
+tests/libqblock/check-libqblock-qcow2$(EXESUF):
tests/libqblock/libqblock-qcow2.lo $(libqblock-la-path) $(qtest-lib-y)
No need to use .lo here.
OK.
+ $(call quiet-command,$(LIBTOOL) --mode=link --quiet --tag=CC $(CC) -shared -rpath
$(libdir) -o $@ $^," lt LINK $@")
+
+$(libqblock-la-path):
+ @echo "Building libqblock.la..."
+ $(call quiet-command,$(MAKE) -C $(SRC_PATH) $(libqblock-lib-la),)
No need for this.
OK.
+$(LIBQBLOCK_TEST_DIR):
+ @echo "Make libqblock test directory"
+ mkdir $(LIBQBLOCK_TEST_DIR)
You can leave the files in tests/ directly, and avoid this as well.
Having a new directory will make clean easier, otherwise the script
will need to know each image file names created, whose filename are
generated in test C code at runtime.
+check-libqblock: $(libqblock-la-path) $(LIBQBLOCK_TEST_DIR) $(patsubst
%,check-%, $(check-libqblock-y))
Please add
check: check-libqblock
here, so that if libtool is present the check is run automatically.
OK.
Paolo
--
Best Regards
Wenchao Xia