Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-03-16' into staging
[qemu.git] / trace / Makefile.objs
1 # -*- mode: makefile -*-
2
3 ######################################################################
4 # tracetool source files
5 # Every rule that invokes tracetool must depend on this so code is regenerated
6 # if tracetool itself changes.
7
8 tracetool-y = $(SRC_PATH)/scripts/tracetool.py
9 tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
10
11 $(BUILD_DIR)/trace-events-all: $(trace-events-files)
12         $(call quiet-command,cat $^ > $@)
13
14
15 ##################################################
16 # Translation level
17
18 $(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-timestamp
19         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
20 $(obj)/generated-helpers-wrappers.h-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
21         $(call quiet-command,$(TRACETOOL) \
22                 --group=all \
23                 --format=tcg-helper-wrapper-h \
24                 --backend=$(TRACE_BACKENDS) \
25                 $< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
26
27 $(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp
28         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
29 $(obj)/generated-helpers.h-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
30         $(call quiet-command,$(TRACETOOL) \
31                 --group=all \
32                 --format=tcg-helper-h \
33                 --backend=$(TRACE_BACKENDS) \
34                 $< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
35
36 $(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp
37         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
38 $(obj)/generated-helpers.c-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
39         $(call quiet-command,$(TRACETOOL) \
40                 --group=all \
41                 --format=tcg-helper-c \
42                 --backend=$(TRACE_BACKENDS) \
43                 $< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
44
45 $(obj)/generated-helpers.o: $(obj)/generated-helpers.c
46
47 target-obj-y += generated-helpers.o
48
49
50 $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
51         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
52 $(obj)/generated-tcg-tracers.h-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
53         $(call quiet-command,$(TRACETOOL) \
54                 --group=all \
55                 --format=tcg-h \
56                 --backend=$(TRACE_BACKENDS) \
57                 $< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
58
59
60 ######################################################################
61 # Backend code
62
63 util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
64 util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
65 util-obj-y += control.o
66 target-obj-y += control-target.o
67 util-obj-y += qmp.o