pc: hack for migration compatibility from QEMU 2.0
[qemu.git] / trace / Makefile.objs
blobd7a86969a4ace1cf20137b45bcd1b93d117340cb
1 # -*- mode: makefile -*-
3 ######################################################################
4 # Auto-generated event descriptions for LTTng ust code
6 ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
7 $(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-timestamp
8 $(obj)/generated-ust-provider.h-timestamp: $(SRC_PATH)/trace-events
9         $(call quiet-command,$(TRACETOOL) \
10                 --format=ust-events-h \
11                 --backends=$(TRACE_BACKENDS) \
12                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
13         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
15 $(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/config-host.mak
16 $(obj)/generated-ust.c-timestamp: $(SRC_PATH)/trace-events
17         $(call quiet-command,$(TRACETOOL) \
18                 --format=ust-events-c \
19                 --backends=$(TRACE_BACKENDS) \
20                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
21         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
23 $(obj)/generated-events.h: $(obj)/generated-ust-provider.h
24 $(obj)/generated-events.c: $(obj)/generated-ust.c
25 endif
27 ######################################################################
28 # Auto-generated event descriptions
30 $(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
31 $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
32         $(call quiet-command,$(TRACETOOL) \
33                 --format=events-h \
34                 --backends=$(TRACE_BACKENDS) \
35                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
36         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
38 $(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
39 $(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
40         $(call quiet-command,$(TRACETOOL) \
41                 --format=events-c \
42                 --backends=$(TRACE_BACKENDS) \
43                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
44         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
46 util-obj-y += generated-events.o
49 ######################################################################
50 # Auto-generated tracing routines
52 $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
53         @cmp -s $< $@ || cp $< $@
54 $(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
55         $(call quiet-command,$(TRACETOOL) \
56                 --format=h \
57                 --backends=$(TRACE_BACKENDS) \
58                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
60 ######################################################################
61 # Auto-generated tracing routines (non-DTrace)
63 $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
64         @cmp -s $< $@ || cp $< $@
65 $(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
66         $(call quiet-command,$(TRACETOOL) \
67                 --format=c \
68                 --backends=$(TRACE_BACKENDS) \
69                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
71 $(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
74 ######################################################################
75 # Auto-generated DTrace code
77 # Normal practice is to name DTrace probe file with a '.d' extension
78 # but that gets picked up by QEMU's Makefile as an external dependency
79 # rule file. So we use '.dtrace' instead
80 ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace)
81 $(obj)/generated-tracers-dtrace.dtrace: $(obj)/generated-tracers-dtrace.dtrace-timestamp
82 $(obj)/generated-tracers-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
83         $(call quiet-command,$(TRACETOOL) \
84                 --format=d \
85                 --backends=$(TRACE_BACKENDS) \
86                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
87         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
89 $(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers-dtrace.dtrace
90         $(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   $@")
92 $(obj)/generated-tracers-dtrace.o: $(obj)/generated-tracers-dtrace.dtrace
94 util-obj-y += generated-tracers-dtrace.o
95 endif
97 ######################################################################
98 # Backend code
100 util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
101 util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
102 util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
103 util-obj-y += control.o
104 util-obj-y += generated-tracers.o