Merge remote-tracking branch 'bonzini/scsi-next' into staging
[qemu/opensuse.git] / trace / Makefile.objs
blob27fe26b5c2743dc06d84573e366ff35add0d07e1
1 # -*- mode: makefile -*-
3 ######################################################################
4 # Auto-generated header for tracing routines
6 $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
7 $(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
8         $(call quiet-command,$(TRACETOOL) \
9                 --format=h \
10                 --backend=$(TRACE_BACKEND) \
11                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
12         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
14 ######################################################################
15 # Auto-generated tracing routines (non-DTrace)
17 ifneq ($(TRACE_BACKEND),dtrace)
18 $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
19 $(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
20         $(call quiet-command,$(TRACETOOL) \
21                 --format=c \
22                 --backend=$(TRACE_BACKEND) \
23                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
24         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
26 $(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
27 endif
30 ######################################################################
31 # Auto-generated DTrace code
33 # Normal practice is to name DTrace probe file with a '.d' extension
34 # but that gets picked up by QEMU's Makefile as an external dependency
35 # rule file. So we use '.dtrace' instead
36 ifeq ($(TRACE_BACKEND),dtrace)
37 $(obj)/generated-tracers.dtrace: $(obj)/generated-tracers.dtrace-timestamp
38 $(obj)/generated-tracers.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
39         $(call quiet-command,$(TRACETOOL) \
40                 --format=d \
41                 --backend=$(TRACE_BACKEND) \
42                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
43         @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
45 $(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers.dtrace
46         $(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   $@")
48 $(obj)/generated-tracers.o: $(obj)/generated-tracers.dtrace
49 endif
51 ######################################################################
52 # Backend code
54 util-obj-$(CONFIG_TRACE_DEFAULT) += default.o
55 util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
56 util-obj-$(CONFIG_TRACE_STDERR) += stderr.o
57 util-obj-y += control.o
58 util-obj-y += generated-tracers.o