-trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
-
-tracetool-y = $(SRC_PATH)/scripts/tracetool.py
-tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
-
-%/trace.h: %/trace.h-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=$(call trace-group-name,$@) \
- --format=h \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace.c: %/trace.c-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=$(call trace-group-name,$@) \
- --format=c \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace-ust.h: %/trace-ust.h-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=$(call trace-group-name,$@) \
- --format=ust-events-h \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace-dtrace.dtrace: %/trace-dtrace.dtrace-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace-dtrace.dtrace-timestamp: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
- $(call quiet-command,$(TRACETOOL) \
- --group=$(call trace-group-name,$@) \
- --format=d \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y)
- $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
-
-%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
-
-
-trace-root.h: trace-root.h-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=root \
- --format=h \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-root.c: trace-root.c-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=root \
- --format=c \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-ust-root.h: trace-ust-root.h-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=root \
- --format=ust-events-h \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-ust-all.h: trace-ust-all.h-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=all \
- --format=ust-events-h \
- --backends=$(TRACE_BACKENDS) \
- $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-ust-all.c: trace-ust-all.c-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak
- $(call quiet-command,$(TRACETOOL) \
- --group=all \
- --format=ust-events-c \
- --backends=$(TRACE_BACKENDS) \
- $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-dtrace-root.dtrace: trace-dtrace-root.dtrace-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-dtrace-root.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
- $(call quiet-command,$(TRACETOOL) \
- --group=root \
- --format=d \
- --backends=$(TRACE_BACKENDS) \
- $< > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-dtrace-root.h: trace-dtrace-root.dtrace
- $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
-
-trace-dtrace-root.o: trace-dtrace-root.dtrace
-
-KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
-KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
-
-KEYCODEMAP_FILES = \
- ui/input-keymap-atset1-to-qcode.c \
- ui/input-keymap-linux-to-qcode.c \
- ui/input-keymap-qcode-to-atset1.c \
- ui/input-keymap-qcode-to-atset2.c \
- ui/input-keymap-qcode-to-atset3.c \
- ui/input-keymap-qcode-to-linux.c \
- ui/input-keymap-qcode-to-qnum.c \
- ui/input-keymap-qcode-to-sun.c \
- ui/input-keymap-qnum-to-qcode.c \
- ui/input-keymap-usb-to-qcode.c \
- ui/input-keymap-win32-to-qcode.c \
- ui/input-keymap-x11-to-qcode.c \
- ui/input-keymap-xorgevdev-to-qcode.c \
- ui/input-keymap-xorgkbd-to-qcode.c \
- ui/input-keymap-xorgxquartz-to-qcode.c \
- ui/input-keymap-xorgxwin-to-qcode.c \
- ui/input-keymap-osx-to-qcode.c \
- $(NULL)
-
-generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
-
-ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
- $(call quiet-command,\
- stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \
- test -e $(KEYCODEMAP_GEN) && \
- $(PYTHON) $(KEYCODEMAP_GEN) \
- --lang glib2 \
- --varname qemu_input_map_$${src}_to_$${dst} \
- code-map $(KEYCODEMAP_CSV) $${src} $${dst} \
- > $@ || rm -f $@, "GEN", "$@")
-
-$(KEYCODEMAP_GEN): .git-submodule-status
-$(KEYCODEMAP_CSV): .git-submodule-status
-
-edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
-pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2
- $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
-