acpi unit-test: verify signature and checksum
[qemu.git] / trace / Makefile.objs
blob3b88e498b5ff0f39812f7f43da5560cc79b397ca
1 # -*- mode: makefile -*-
3 ######################################################################
4 # Auto-generated event descriptions
6 $(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
7 $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
8         $(call quiet-command,$(TRACETOOL) \
9                 --format=events-h \
10                 --backend=events \
11                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
12         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
14 $(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
15 $(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
16         $(call quiet-command,$(TRACETOOL) \
17                 --format=events-c \
18                 --backend=events \
19                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
20         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
22 util-obj-y += generated-events.o
25 ######################################################################
26 # Auto-generated tracing routines
28 $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
29         @cmp -s $< $@ || cp $< $@
30 $(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
31         $(call quiet-command,$(TRACETOOL) \
32                 --format=h \
33                 --backend=$(TRACE_BACKEND) \
34                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
36 ######################################################################
37 # Auto-generated tracing routines (non-DTrace)
39 ifneq ($(TRACE_BACKEND),dtrace)
40 $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
41         @cmp -s $< $@ || cp $< $@
42 $(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
43         $(call quiet-command,$(TRACETOOL) \
44                 --format=c \
45                 --backend=$(TRACE_BACKEND) \
46                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
48 $(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
49 endif
52 ######################################################################
53 # Auto-generated DTrace code
55 # Normal practice is to name DTrace probe file with a '.d' extension
56 # but that gets picked up by QEMU's Makefile as an external dependency
57 # rule file. So we use '.dtrace' instead
58 ifeq ($(TRACE_BACKEND),dtrace)
59 $(obj)/generated-tracers.dtrace: $(obj)/generated-tracers.dtrace-timestamp
60 $(obj)/generated-tracers.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
61         $(call quiet-command,$(TRACETOOL) \
62                 --format=d \
63                 --backend=$(TRACE_BACKEND) \
64                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
65         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
67 $(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers.dtrace
68         $(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   $@")
70 $(obj)/generated-tracers.o: $(obj)/generated-tracers.dtrace
71 endif
73 ######################################################################
74 # Backend code
76 util-obj-$(CONFIG_TRACE_DEFAULT) += default.o
77 util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
78 util-obj-$(CONFIG_TRACE_STDERR) += stderr.o
79 util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
80 util-obj-y += control.o
81 util-obj-y += generated-tracers.o