From 44dc0ca3d22db732a6c4b7f3e59594fc323113f8 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 15 May 2011 11:51:28 +0300 Subject: libcacard: add libcacard.la target No flag to configure is required. Instead, added a libcacard.la target that is not built by default, only when requested explicitly via: mkdir build cd build ../configure make libcacard.la make install-libcacard Uses libtool to do actual linking of object files and shared library, and installing. Tested only under linux, but supposed to work on other systems as well. If libtool isn't found you get a message complaining about that, only at build time (since it is not a default target I did not add a message at configure time). New build artifacts: .libs subdirectories (at and /libcacard) *.lo files (at same locations as the respective o files) Added %.lo : %.c rule that uses libtool. Updated clean rule to clean up those artifacts. Added specific rule to call dtrace with libtool wrapper (note that because of a current upstream dtrace bug fixed by systemtap b1568fd85 commit the -fPIC flag isn't actually passed on. still current dtrace+libtool produced object links fine). If libtool is missing any of the following targets will complain and exit 1: any subdir: *.lo root and libcacard: libcacard.la, libcacard-instsall Tested to link and load with all tracing backends. --- configure | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 767c3831f4..a6e9d1c85a 100755 --- a/configure +++ b/configure @@ -1279,6 +1279,15 @@ if ! has $pkg_config; then pkg_config=/bin/false fi +########################################## +# libtool probe + +if ! has libtool; then + libtool= +else + libtool=libtool +fi + ########################################## # Sparse probe if test "$sparse" != "no" ; then @@ -3047,6 +3056,7 @@ echo "AR=$ar" >> $config_host_mak echo "OBJCOPY=$objcopy" >> $config_host_mak echo "LD=$ld" >> $config_host_mak echo "WINDRES=$windres" >> $config_host_mak +echo "LIBTOOL=$libtool" >> $config_host_mak echo "CFLAGS=$CFLAGS" >> $config_host_mak echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak @@ -3580,7 +3590,7 @@ if [ "$source_path" != `pwd` ]; then # out of tree build mkdir -p libcacard rm -f libcacard/Makefile - ln -s "$source_path/libcacard/Makefile" libcacard/Makefile + symlink "$source_path/libcacard/Makefile" libcacard/Makefile fi d=libuser -- cgit v1.2.3