aboutsummaryrefslogtreecommitdiff
path: root/Makefile.objs
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-03-16 17:30:21 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-04-01 19:07:48 -0500
commitf20600f213d4cae223660b4ca2eddf139f5e681e (patch)
treec94df38f8d905d1a47ed2a4ef694718b717a79ef /Makefile.objs
parentf68b9d672b90dedc79aeb9b44607f484dbe46a6b (diff)
downloadqemu-f20600f213d4cae223660b4ca2eddf139f5e681e.zip
qemu-f20600f213d4cae223660b4ca2eddf139f5e681e.tar.gz
qemu-f20600f213d4cae223660b4ca2eddf139f5e681e.tar.bz2
trace: move trace objects from Makefile to Makefile.objs
Diffstat (limited to 'Makefile.objs')
-rw-r--r--Makefile.objs32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile.objs b/Makefile.objs
index 42301fd..d906a8e 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -310,6 +310,38 @@ libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o
# trace
ifeq ($(TRACE_BACKEND),dtrace)
+trace.h: trace.h-timestamp trace-dtrace.h
+else
+trace.h: trace.h-timestamp
+endif
+trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
+ $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h")
+ @cmp -s $@ trace.h || cp $@ trace.h
+
+trace.c: trace.c-timestamp
+trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
+ $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c")
+ @cmp -s $@ trace.c || cp $@ trace.c
+
+trace.o: trace.c $(GENERATED_HEADERS)
+
+trace-dtrace.h: trace-dtrace.dtrace
+ $(call quiet-command,dtrace -o $@ -h -s $<, " GEN trace-dtrace.h")
+
+# Normal practice is to name DTrace probe file with a '.d' extension
+# but that gets picked up by QEMU's Makefile as an external dependancy
+# rule file. So we use '.dtrace' instead
+trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
+trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
+ $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace")
+ @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
+
+trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
+ $(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o")
+
+simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
+
+ifeq ($(TRACE_BACKEND),dtrace)
trace-obj-y = trace-dtrace.o
else
trace-obj-y = trace.o