aboutsummaryrefslogtreecommitdiff
path: root/Makefile.objs
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-05-15 11:51:28 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2011-06-14 09:34:34 -0500
commit44dc0ca3d22db732a6c4b7f3e59594fc323113f8 (patch)
tree35f6f01236a11a40bca3492a6ccf20104efde637 /Makefile.objs
parent3aa5d2bee8e948deabd7c25a7c6ee963daa56a27 (diff)
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 'Makefile.objs')
-rw-r--r--Makefile.objs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.objs b/Makefile.objs
index 52d8b23045..f617ed5b7e 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -347,6 +347,14 @@ trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
$(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o")
+ifeq ($(LIBTOOL),)
+trace-dtrace.lo: trace-dtrace.dtrace
+ @echo "missing libtool. please install and rerun configure."; exit 1
+else
+trace-dtrace.lo: trace-dtrace.dtrace
+ $(call quiet-command,libtool --mode=compile --tag=CC dtrace -o $@ -G -s $<, " lt GEN trace-dtrace.o")
+endif
+
simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
ifeq ($(TRACE_BACKEND),dtrace)