aboutsummaryrefslogtreecommitdiff
path: root/trace/Makefile.objs
blob: afd571c3ecc4b8ee259adac3c43b16aac4fc4604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# -*- mode: makefile -*-

$(BUILD_DIR)/trace-events-all: $(trace-events-files)
	$(call quiet-command,cat $^ > $@)


##################################################
# Translation level

$(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-timestamp
	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
$(obj)/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
	$(call quiet-command,$(TRACETOOL) \
		--group=root \
		--format=tcg-helper-wrapper-h \
		--backend=$(TRACE_BACKENDS) \
		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")

$(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp
	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
$(obj)/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
	$(call quiet-command,$(TRACETOOL) \
		--group=root \
		--format=tcg-helper-h \
		--backend=$(TRACE_BACKENDS) \
		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")

$(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp
	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
$(obj)/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
	$(call quiet-command,$(TRACETOOL) \
		--group=root \
		--format=tcg-helper-c \
		--backend=$(TRACE_BACKENDS) \
		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")

$(obj)/generated-helpers.o: $(obj)/generated-helpers.c

target-obj-y += generated-helpers.o


$(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
$(obj)/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
	$(call quiet-command,$(TRACETOOL) \
		--group=root \
		--format=tcg-h \
		--backend=$(TRACE_BACKENDS) \
		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")


######################################################################
# Backend code

util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
util-obj-y += control.o
target-obj-y += control-target.o
util-obj-y += qmp.o