diff options
author | Alon Levy <alevy@redhat.com> | 2011-05-15 11:51:28 +0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-06-14 09:34:34 -0500 |
commit | 44dc0ca3d22db732a6c4b7f3e59594fc323113f8 (patch) | |
tree | 35f6f01236a11a40bca3492a6ccf20104efde637 /rules.mak | |
parent | 3aa5d2bee8e948deabd7c25a7c6ee963daa56a27 (diff) | |
download | qemu-44dc0ca3d22db732a6c4b7f3e59594fc323113f8.zip qemu-44dc0ca3d22db732a6c4b7f3e59594fc323113f8.tar.gz qemu-44dc0ca3d22db732a6c4b7f3e59594fc323113f8.tar.bz2 |
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 <buildroot> and <buildroot>/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.
Diffstat (limited to 'rules.mak')
-rw-r--r-- | rules.mak | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -17,6 +17,14 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d %.o: %.c $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") +ifeq ($(LIBTOOL),) +%.lo: %.c + @echo "missing libtool. please install and rerun configure"; exit 1 +else +%.lo: %.c + $(call quiet-command,libtool --mode=compile --quiet --tag=CC $(CC) $(QEMU_CFLAGS) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," lt CC $@") +endif + %.o: %.S $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@") |