pbrook | 0cb3fb1 | 2006-05-14 12:07:53 +0000 | [diff] [blame] | 1 | # Makefile for QEMU. |
| 2 | |
Stefan Weil | 519e169 | 2011-09-16 21:50:43 +0200 | [diff] [blame] | 3 | # Always point to the root of the build tree (needs GNU make). |
| 4 | BUILD_DIR=$(CURDIR) |
Lluís Vilanova | 388d475 | 2011-09-15 22:45:35 +0200 | [diff] [blame] | 5 | |
Fam Zheng | eaa2ddb | 2015-05-22 13:35:07 +0800 | [diff] [blame] | 6 | # Before including a proper config-host.mak, assume we are in the source tree |
| 7 | SRC_PATH=. |
| 8 | |
Fam Zheng | 324027c | 2016-06-01 12:25:17 +0800 | [diff] [blame] | 9 | UNCHECKED_GOALS := %clean TAGS cscope ctags docker docker-% |
Fam Zheng | eaa2ddb | 2015-05-22 13:35:07 +0800 | [diff] [blame] | 10 | |
Lluís Vilanova | 250b086 | 2012-03-06 19:50:38 +0100 | [diff] [blame] | 11 | # All following code might depend on configuration variables |
aurel32 | 55d7e8f | 2009-04-15 14:42:57 +0000 | [diff] [blame] | 12 | ifneq ($(wildcard config-host.mak),) |
Paul Brook | 1ad2134 | 2009-05-19 16:17:58 +0100 | [diff] [blame] | 13 | # Put the all: rule here so that config-host.mak can contain dependencies. |
Stefan Weil | 8f67aa8 | 2012-07-09 20:36:36 +0200 | [diff] [blame] | 14 | all: |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 15 | include config-host.mak |
Peter Maydell | d1bd242 | 2012-10-19 14:54:23 +0100 | [diff] [blame] | 16 | |
| 17 | # Check that we're not trying to do an out-of-tree build from |
| 18 | # a tree that's been used for an in-tree build. |
| 19 | ifneq ($(realpath $(SRC_PATH)),$(realpath .)) |
| 20 | ifneq ($(wildcard $(SRC_PATH)/config-host.mak),) |
| 21 | $(error This is an out of tree build but your source tree ($(SRC_PATH)) \ |
| 22 | seems to have been used for an in-tree build. You can fix this by running \ |
| 23 | "make distclean && rm -rf *-linux-user *-softmmu" in your source tree) |
| 24 | endif |
| 25 | endif |
| 26 | |
Paolo Bonzini | f3aa844 | 2013-04-16 10:50:38 +0200 | [diff] [blame] | 27 | CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y) |
| 28 | CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y) |
Stefano Stabellini | 6b827cc | 2017-03-16 13:01:50 -0700 | [diff] [blame] | 29 | CONFIG_XEN := $(CONFIG_XEN_BACKEND) |
Paolo Bonzini | f3aa844 | 2013-04-16 10:50:38 +0200 | [diff] [blame] | 30 | CONFIG_ALL=y |
| 31 | -include config-all-devices.mak |
| 32 | -include config-all-disas.mak |
| 33 | |
Gerd Hoffmann | 8df42d8 | 2016-07-01 13:28:37 +0200 | [diff] [blame] | 34 | config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios |
Juan Quintela | e5efe7f | 2009-10-07 02:40:59 +0200 | [diff] [blame] | 35 | @echo $@ is out-of-date, running configure |
Stefan Weil | bdf523e | 2013-10-20 18:39:21 +0200 | [diff] [blame] | 36 | @# TODO: The next lines include code which supports a smooth |
| 37 | @# transition from old configurations without config.status. |
| 38 | @# This code can be removed after QEMU 1.7. |
| 39 | @if test -x config.status; then \ |
| 40 | ./config.status; \ |
| 41 | else \ |
| 42 | sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \ |
| 43 | fi |
aurel32 | 55d7e8f | 2009-04-15 14:42:57 +0000 | [diff] [blame] | 44 | else |
| 45 | config-host.mak: |
Fam Zheng | eaa2ddb | 2015-05-22 13:35:07 +0800 | [diff] [blame] | 46 | ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
aurel32 | 55d7e8f | 2009-04-15 14:42:57 +0000 | [diff] [blame] | 47 | @echo "Please call configure before running make!" |
| 48 | @exit 1 |
| 49 | endif |
Mike Frysinger | 7748b8c | 2012-09-16 16:07:13 -0400 | [diff] [blame] | 50 | endif |
bellard | 766a487 | 2003-02-18 23:35:48 +0000 | [diff] [blame] | 51 | |
Fam Zheng | fb57c88 | 2016-06-01 12:25:16 +0800 | [diff] [blame] | 52 | include $(SRC_PATH)/rules.mak |
| 53 | |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 54 | GENERATED_FILES = qemu-version.h config-host.h qemu-options.def |
| 55 | GENERATED_FILES += qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h |
| 56 | GENERATED_FILES += qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c |
| 57 | GENERATED_FILES += qmp-introspect.h |
| 58 | GENERATED_FILES += qmp-introspect.c |
Lluís Vilanova | eac236e | 2012-12-14 20:13:09 +0100 | [diff] [blame] | 59 | |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 60 | GENERATED_FILES += trace/generated-tcg-tracers.h |
Lluís Vilanova | 465830f | 2014-05-30 14:12:13 +0200 | [diff] [blame] | 61 | |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 62 | GENERATED_FILES += trace/generated-helpers-wrappers.h |
| 63 | GENERATED_FILES += trace/generated-helpers.h |
| 64 | GENERATED_FILES += trace/generated-helpers.c |
Lluís Vilanova | 707c8a9 | 2014-05-30 14:11:50 +0200 | [diff] [blame] | 65 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 66 | ifdef CONFIG_TRACE_UST |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 67 | GENERATED_FILES += trace-ust-all.h |
| 68 | GENERATED_FILES += trace-ust-all.c |
Mohamad Gebai | e6bf23f | 2014-01-29 22:47:56 -0500 | [diff] [blame] | 69 | endif |
| 70 | |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 71 | GENERATED_FILES += module_block.h |
Marc Mari | 0c0c1fd | 2016-08-12 09:27:02 -0400 | [diff] [blame] | 72 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 73 | TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h) |
| 74 | TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c) |
| 75 | TRACE_DTRACE = |
| 76 | ifdef CONFIG_TRACE_DTRACE |
| 77 | TRACE_HEADERS += trace-dtrace-root.h $(trace-events-subdirs:%=%/trace-dtrace.h) |
| 78 | TRACE_DTRACE += trace-dtrace-root.dtrace $(trace-events-subdirs:%=%/trace-dtrace.dtrace) |
| 79 | endif |
| 80 | ifdef CONFIG_TRACE_UST |
| 81 | TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h) |
| 82 | endif |
| 83 | |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 84 | GENERATED_FILES += $(TRACE_HEADERS) |
| 85 | GENERATED_FILES += $(TRACE_SOURCES) |
Daniel P. Berrange | 4175304 | 2017-02-28 12:29:01 +0000 | [diff] [blame] | 86 | GENERATED_FILES += $(BUILD_DIR)/trace-events-all |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 87 | |
| 88 | trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g') |
| 89 | |
Daniel P. Berrange | 8755b4a | 2017-03-15 12:34:21 +0000 | [diff] [blame] | 90 | tracetool-y = $(SRC_PATH)/scripts/tracetool.py |
| 91 | tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") |
| 92 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 93 | %/trace.h: %/trace.h-timestamp |
| 94 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 95 | %/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) |
| 96 | $(call quiet-command,$(TRACETOOL) \ |
| 97 | --group=$(call trace-group-name,$@) \ |
| 98 | --format=h \ |
| 99 | --backends=$(TRACE_BACKENDS) \ |
| 100 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 101 | |
| 102 | %/trace.c: %/trace.c-timestamp |
| 103 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 104 | %/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) |
| 105 | $(call quiet-command,$(TRACETOOL) \ |
| 106 | --group=$(call trace-group-name,$@) \ |
| 107 | --format=c \ |
| 108 | --backends=$(TRACE_BACKENDS) \ |
| 109 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 110 | |
| 111 | %/trace-ust.h: %/trace-ust.h-timestamp |
| 112 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 113 | %/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) |
| 114 | $(call quiet-command,$(TRACETOOL) \ |
| 115 | --group=$(call trace-group-name,$@) \ |
| 116 | --format=ust-events-h \ |
| 117 | --backends=$(TRACE_BACKENDS) \ |
| 118 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 119 | |
| 120 | %/trace-dtrace.dtrace: %/trace-dtrace.dtrace-timestamp |
| 121 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 122 | %/trace-dtrace.dtrace-timestamp: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) |
| 123 | $(call quiet-command,$(TRACETOOL) \ |
| 124 | --group=$(call trace-group-name,$@) \ |
| 125 | --format=d \ |
| 126 | --backends=$(TRACE_BACKENDS) \ |
| 127 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 128 | |
| 129 | %/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y) |
| 130 | $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@") |
| 131 | |
| 132 | %/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y) |
| 133 | |
| 134 | |
| 135 | trace-root.h: trace-root.h-timestamp |
| 136 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 137 | trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) |
| 138 | $(call quiet-command,$(TRACETOOL) \ |
| 139 | --group=root \ |
| 140 | --format=h \ |
| 141 | --backends=$(TRACE_BACKENDS) \ |
| 142 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 143 | |
| 144 | trace-root.c: trace-root.c-timestamp |
| 145 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 146 | trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) |
| 147 | $(call quiet-command,$(TRACETOOL) \ |
| 148 | --group=root \ |
| 149 | --format=c \ |
| 150 | --backends=$(TRACE_BACKENDS) \ |
| 151 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 152 | |
| 153 | trace-ust-root.h: trace-ust-root.h-timestamp |
| 154 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 155 | trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) |
| 156 | $(call quiet-command,$(TRACETOOL) \ |
| 157 | --group=root \ |
| 158 | --format=ust-events-h \ |
| 159 | --backends=$(TRACE_BACKENDS) \ |
| 160 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 161 | |
| 162 | trace-ust-all.h: trace-ust-all.h-timestamp |
| 163 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 164 | trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) |
| 165 | $(call quiet-command,$(TRACETOOL) \ |
| 166 | --group=all \ |
| 167 | --format=ust-events-h \ |
| 168 | --backends=$(TRACE_BACKENDS) \ |
| 169 | $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)") |
| 170 | |
| 171 | trace-ust-all.c: trace-ust-all.c-timestamp |
| 172 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 173 | trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) |
| 174 | $(call quiet-command,$(TRACETOOL) \ |
| 175 | --group=all \ |
| 176 | --format=ust-events-c \ |
| 177 | --backends=$(TRACE_BACKENDS) \ |
| 178 | $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)") |
| 179 | |
| 180 | trace-dtrace-root.dtrace: trace-dtrace-root.dtrace-timestamp |
| 181 | @cmp $< $@ >/dev/null 2>&1 || cp $< $@ |
| 182 | trace-dtrace-root.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) |
| 183 | $(call quiet-command,$(TRACETOOL) \ |
| 184 | --group=root \ |
| 185 | --format=d \ |
| 186 | --backends=$(TRACE_BACKENDS) \ |
| 187 | $< > $@,"GEN","$(@:%-timestamp=%)") |
| 188 | |
| 189 | trace-dtrace-root.h: trace-dtrace-root.dtrace |
| 190 | $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@") |
| 191 | |
| 192 | trace-dtrace-root.o: trace-dtrace-root.dtrace |
| 193 | |
Juan Quintela | d9ace8b | 2009-10-06 21:11:15 +0200 | [diff] [blame] | 194 | # Don't try to regenerate Makefile or configure |
| 195 | # We don't generate any of them |
| 196 | Makefile: ; |
| 197 | configure: ; |
| 198 | |
Marc-André Lureau | bd3f570 | 2017-01-13 15:41:32 +0100 | [diff] [blame] | 199 | .PHONY: all clean cscope distclean html info install install-doc \ |
Marc-André Lureau | f8bab10 | 2017-01-13 15:41:34 +0100 | [diff] [blame] | 200 | pdf txt recurse-all speed test dist msi FORCE |
pbrook | 0cb3fb1 | 2006-05-14 12:07:53 +0000 | [diff] [blame] | 201 | |
Paolo Bonzini | fec90ff | 2012-05-29 11:49:50 +0200 | [diff] [blame] | 202 | $(call set-vpath, $(SRC_PATH)) |
pbrook | 8c462f8 | 2007-11-18 21:12:37 +0000 | [diff] [blame] | 203 | |
Juan Quintela | 3e2e0e6 | 2009-08-03 14:47:06 +0200 | [diff] [blame] | 204 | LIBS+=-lz $(LIBS_TOOLS) |
Juan Quintela | 67c0f08 | 2009-07-27 16:12:51 +0200 | [diff] [blame] | 205 | |
Corey Bryant | 7b93fad | 2012-01-26 09:42:24 -0500 | [diff] [blame] | 206 | HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) |
| 207 | |
pbrook | cc8ae6d | 2006-04-23 17:57:59 +0000 | [diff] [blame] | 208 | ifdef BUILD_DOCS |
Marc-André Lureau | f8bab10 | 2017-01-13 15:41:34 +0100 | [diff] [blame] | 209 | DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 210 | DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7 |
| 211 | DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7 |
Meador Inge | 983eef5 | 2012-02-24 14:00:42 +0530 | [diff] [blame] | 212 | ifdef CONFIG_VIRTFS |
M. Mohan Kumar | a2d8f1b | 2011-12-14 13:58:47 +0530 | [diff] [blame] | 213 | DOCS+=fsdev/virtfs-proxy-helper.1 |
Meador Inge | 983eef5 | 2012-02-24 14:00:42 +0530 | [diff] [blame] | 214 | endif |
pbrook | cc8ae6d | 2006-04-23 17:57:59 +0000 | [diff] [blame] | 215 | else |
| 216 | DOCS= |
| 217 | endif |
bellard | 7d13299 | 2003-03-06 23:23:54 +0000 | [diff] [blame] | 218 | |
Lluís Vilanova | 388d475 | 2011-09-15 22:45:35 +0200 | [diff] [blame] | 219 | SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) |
Juan Quintela | 1f3d3c8 | 2009-10-07 02:41:02 +0200 | [diff] [blame] | 220 | SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) |
Andreas Färber | 8807080 | 2013-02-21 16:26:46 +0100 | [diff] [blame] | 221 | SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS)) |
Juan Quintela | 1f3d3c8 | 2009-10-07 02:41:02 +0200 | [diff] [blame] | 222 | |
Stefan Weil | 8bdd3d4 | 2012-09-14 19:02:30 +0200 | [diff] [blame] | 223 | ifeq ($(SUBDIR_DEVICES_MAK),) |
| 224 | config-all-devices.mak: |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 225 | $(call quiet-command,echo '# no devices' > $@,"GEN","$@") |
Stefan Weil | 8bdd3d4 | 2012-09-14 19:02:30 +0200 | [diff] [blame] | 226 | else |
Juan Quintela | 1f3d3c8 | 2009-10-07 02:41:02 +0200 | [diff] [blame] | 227 | config-all-devices.mak: $(SUBDIR_DEVICES_MAK) |
Paolo Bonzini | bb585a7 | 2013-04-03 17:53:21 +0200 | [diff] [blame] | 228 | $(call quiet-command, sed -n \ |
| 229 | 's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \ |
| 230 | $(SUBDIR_DEVICES_MAK) | sort -u > $@, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 231 | "GEN","$@") |
Stefan Weil | 8bdd3d4 | 2012-09-14 19:02:30 +0200 | [diff] [blame] | 232 | endif |
Juan Quintela | 1f3d3c8 | 2009-10-07 02:41:02 +0200 | [diff] [blame] | 233 | |
Paul Brook | bd9141b | 2010-11-26 18:47:45 +0000 | [diff] [blame] | 234 | -include $(SUBDIR_DEVICES_MAK_DEP) |
| 235 | |
Paolo Bonzini | 0ab0c99 | 2016-06-07 13:25:58 +0200 | [diff] [blame] | 236 | %/config-devices.mak: default-configs/%.mak $(SRC_PATH)/scripts/make_device_config.sh |
Paolo Bonzini | 15564d8 | 2015-03-12 16:00:05 +0100 | [diff] [blame] | 237 | $(call quiet-command, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 238 | $(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $< $*-config-devices.mak.d $@ > $@.tmp,"GEN","$@.tmp") |
Michael S. Tsirkin | 12ccfec | 2015-02-19 08:48:46 +0100 | [diff] [blame] | 239 | $(call quiet-command, if test -f $@; then \ |
Blue Swirl | 904fe1f | 2010-10-02 14:28:08 +0000 | [diff] [blame] | 240 | if cmp -s $@.old $@; then \ |
Paul Brook | bd9141b | 2010-11-26 18:47:45 +0000 | [diff] [blame] | 241 | mv $@.tmp $@; \ |
| 242 | cp -p $@ $@.old; \ |
Stefan Weil | 012f087 | 2009-12-20 15:39:03 +0100 | [diff] [blame] | 243 | else \ |
| 244 | if test -f $@.old; then \ |
| 245 | echo "WARNING: $@ (user modified) out of date.";\ |
| 246 | else \ |
| 247 | echo "WARNING: $@ out of date.";\ |
| 248 | fi; \ |
| 249 | echo "Run \"make defconfig\" to regenerate."; \ |
| 250 | rm $@.tmp; \ |
| 251 | fi; \ |
Paul Brook | a992fe3 | 2009-11-22 16:25:30 +0000 | [diff] [blame] | 252 | else \ |
Stefan Weil | 012f087 | 2009-12-20 15:39:03 +0100 | [diff] [blame] | 253 | mv $@.tmp $@; \ |
| 254 | cp -p $@ $@.old; \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 255 | fi,"GEN","$@"); |
Paul Brook | a992fe3 | 2009-11-22 16:25:30 +0000 | [diff] [blame] | 256 | |
| 257 | defconfig: |
| 258 | rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) |
| 259 | |
Paolo Bonzini | 992aeb8 | 2012-12-21 08:34:49 +0100 | [diff] [blame] | 260 | ifneq ($(wildcard config-host.mak),) |
| 261 | include $(SRC_PATH)/Makefile.objs |
Fam Zheng | ba1183d | 2014-02-10 14:48:52 +0800 | [diff] [blame] | 262 | endif |
| 263 | |
| 264 | dummy := $(call unnest-vars,, \ |
| 265 | stub-obj-y \ |
Marc-André Lureau | 32d955a | 2016-12-12 15:49:01 +0300 | [diff] [blame] | 266 | chardev-obj-y \ |
Fam Zheng | ba1183d | 2014-02-10 14:48:52 +0800 | [diff] [blame] | 267 | util-obj-y \ |
| 268 | qga-obj-y \ |
David Marchand | a75eb03 | 2014-09-08 11:17:48 +0200 | [diff] [blame] | 269 | ivshmem-client-obj-y \ |
| 270 | ivshmem-server-obj-y \ |
Marc-André Lureau | 7b2e5c6 | 2016-10-18 12:24:04 +0300 | [diff] [blame] | 271 | libvhost-user-obj-y \ |
Felipe Franciosi | 49cc034 | 2017-03-02 10:25:53 -0800 | [diff] [blame] | 272 | vhost-user-scsi-obj-y \ |
Tomoki Sekiyama | 577a672 | 2014-03-26 14:28:45 -0400 | [diff] [blame] | 273 | qga-vss-dll-obj-y \ |
Fam Zheng | ba1183d | 2014-02-10 14:48:52 +0800 | [diff] [blame] | 274 | block-obj-y \ |
Fam Zheng | cc47569 | 2014-02-10 14:48:59 +0800 | [diff] [blame] | 275 | block-obj-m \ |
Daniel P. Berrange | fb37726 | 2015-09-02 10:57:27 +0100 | [diff] [blame] | 276 | crypto-obj-y \ |
| 277 | crypto-aes-obj-y \ |
Daniel P. Berrange | 0c7012e | 2015-09-02 11:18:16 +0100 | [diff] [blame] | 278 | qom-obj-y \ |
Daniel P. Berrange | 666a3af | 2015-02-27 16:19:33 +0000 | [diff] [blame] | 279 | io-obj-y \ |
Fam Zheng | cc47569 | 2014-02-10 14:48:59 +0800 | [diff] [blame] | 280 | common-obj-y \ |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 281 | common-obj-m \ |
| 282 | trace-obj-y) |
Fam Zheng | ba1183d | 2014-02-10 14:48:52 +0800 | [diff] [blame] | 283 | |
| 284 | ifneq ($(wildcard config-host.mak),) |
Fam Zheng | 46e7b70 | 2016-06-01 10:23:31 +0800 | [diff] [blame] | 285 | include $(SRC_PATH)/tests/Makefile.include |
Paolo Bonzini | 992aeb8 | 2012-12-21 08:34:49 +0100 | [diff] [blame] | 286 | endif |
Paolo Bonzini | 992aeb8 | 2012-12-21 08:34:49 +0100 | [diff] [blame] | 287 | |
Fam Zheng | 1796926 | 2014-02-10 14:48:56 +0800 | [diff] [blame] | 288 | all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules |
pbrook | b9dea4f | 2006-05-13 16:54:03 +0000 | [diff] [blame] | 289 | |
Fam Zheng | 67a1de0 | 2016-06-01 17:44:21 +0800 | [diff] [blame] | 290 | qemu-version.h: FORCE |
| 291 | $(call quiet-command, \ |
| 292 | (cd $(SRC_PATH); \ |
| 293 | printf '#define QEMU_PKGVERSION '; \ |
| 294 | if test -n "$(PKGVERSION)"; then \ |
| 295 | printf '"$(PKGVERSION)"\n'; \ |
| 296 | else \ |
| 297 | if test -d .git; then \ |
| 298 | printf '" ('; \ |
| 299 | git describe --match 'v*' 2>/dev/null | tr -d '\n'; \ |
| 300 | if ! git diff-index --quiet HEAD &>/dev/null; then \ |
| 301 | printf -- '-dirty'; \ |
| 302 | fi; \ |
| 303 | printf ')"\n'; \ |
| 304 | else \ |
| 305 | printf '""\n'; \ |
| 306 | fi; \ |
| 307 | fi) > $@.tmp) |
Lin Ma | d9e73d3 | 2017-02-15 10:40:30 +0800 | [diff] [blame] | 308 | $(call quiet-command, if ! cmp -s $@ $@.tmp; then \ |
| 309 | mv $@.tmp $@; \ |
| 310 | else \ |
| 311 | rm $@.tmp; \ |
| 312 | fi) |
Fam Zheng | 67a1de0 | 2016-06-01 17:44:21 +0800 | [diff] [blame] | 313 | |
Juan Quintela | 1215c6e | 2009-10-07 02:40:58 +0200 | [diff] [blame] | 314 | config-host.h: config-host.h-timestamp |
| 315 | config-host.h-timestamp: config-host.mak |
Paolo Bonzini | 077de81 | 2016-06-07 13:27:04 +0200 | [diff] [blame] | 316 | qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 317 | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@") |
Juan Quintela | 1215c6e | 2009-10-07 02:40:58 +0200 | [diff] [blame] | 318 | |
pbrook | cec7d0b | 2008-05-28 16:44:57 +0000 | [diff] [blame] | 319 | SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) |
Andreas Färber | 916359f | 2013-02-21 16:26:47 +0100 | [diff] [blame] | 320 | SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES)) |
| 321 | |
Stefan Weil | 57f45b6 | 2014-02-27 21:28:03 +0100 | [diff] [blame] | 322 | $(SOFTMMU_SUBDIR_RULES): $(block-obj-y) |
Daniel P. Berrange | fb37726 | 2015-09-02 10:57:27 +0100 | [diff] [blame] | 323 | $(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y) |
Daniel P. Berrange | 666a3af | 2015-02-27 16:19:33 +0000 | [diff] [blame] | 324 | $(SOFTMMU_SUBDIR_RULES): $(io-obj-y) |
Andreas Färber | 916359f | 2013-02-21 16:26:47 +0100 | [diff] [blame] | 325 | $(SOFTMMU_SUBDIR_RULES): config-all-devices.mak |
pbrook | cec7d0b | 2008-05-28 16:44:57 +0000 | [diff] [blame] | 326 | |
Paolo Bonzini | 4115852 | 2012-05-29 12:41:34 +0200 | [diff] [blame] | 327 | subdir-%: |
Paul Brook | 0087375 | 2009-05-07 02:00:31 +0100 | [diff] [blame] | 328 | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) |
pbrook | 4aa4253 | 2006-05-13 13:55:08 +0000 | [diff] [blame] | 329 | |
Gerd Hoffmann | e2134eb | 2012-09-25 16:04:58 +0200 | [diff] [blame] | 330 | subdir-pixman: pixman/Makefile |
| 331 | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,) |
| 332 | |
| 333 | pixman/Makefile: $(SRC_PATH)/pixman/configure |
Gerd Hoffmann | f9943cd | 2013-01-04 10:15:53 +0100 | [diff] [blame] | 334 | (cd pixman; CFLAGS="$(CFLAGS) -fPIC $(extra_cflags) $(extra_ldflags)" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static) |
Gerd Hoffmann | e2134eb | 2012-09-25 16:04:58 +0200 | [diff] [blame] | 335 | |
| 336 | $(SRC_PATH)/pixman/configure: |
| 337 | (cd $(SRC_PATH)/pixman; autoreconf -v --install) |
| 338 | |
Peter Crosthwaite | a540f15 | 2013-04-18 14:47:31 +1000 | [diff] [blame] | 339 | DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt |
Peter Maydell | 965f486 | 2013-06-21 14:00:17 +0100 | [diff] [blame] | 340 | DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) |
| 341 | DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt |
Peter Crosthwaite | a540f15 | 2013-04-18 14:47:31 +1000 | [diff] [blame] | 342 | |
| 343 | subdir-dtc:dtc/libfdt dtc/tests |
Peter Maydell | 965f486 | 2013-06-21 14:00:17 +0100 | [diff] [blame] | 344 | $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,) |
Peter Crosthwaite | a540f15 | 2013-04-18 14:47:31 +1000 | [diff] [blame] | 345 | |
| 346 | dtc/%: |
| 347 | mkdir -p $@ |
| 348 | |
Marc-André Lureau | 32d955a | 2016-12-12 15:49:01 +0300 | [diff] [blame] | 349 | $(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(chardev-obj-y) \ |
Xu, Anthony | 3d1bacc | 2017-04-04 21:39:39 +0000 | [diff] [blame] | 350 | $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) |
Blue Swirl | add1615 | 2009-09-27 16:26:02 +0000 | [diff] [blame] | 351 | |
Paul Brook | c05ac89 | 2009-07-31 13:18:32 +0100 | [diff] [blame] | 352 | ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) |
Marc-André Lureau | a9c8730 | 2016-08-05 12:23:46 +0400 | [diff] [blame] | 353 | # Only keep -O and -g cflags |
Paul Brook | c05ac89 | 2009-07-31 13:18:32 +0100 | [diff] [blame] | 354 | romsubdir-%: |
Marc-André Lureau | a9c8730 | 2016-08-05 12:23:46 +0400 | [diff] [blame] | 355 | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/" CFLAGS="$(filter -O% -g%,$(CFLAGS))",) |
Paul Brook | c05ac89 | 2009-07-31 13:18:32 +0100 | [diff] [blame] | 356 | |
| 357 | ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) |
| 358 | |
| 359 | recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) |
bellard | 83f6409 | 2006-08-01 16:21:11 +0000 | [diff] [blame] | 360 | |
Marc-André Lureau | c17a18e | 2016-11-08 11:05:13 +0400 | [diff] [blame] | 361 | $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 362 | $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"RC","version.o") |
Marc-André Lureau | 5354e4d | 2013-02-25 23:31:13 +0100 | [diff] [blame] | 363 | |
Marc-André Lureau | c17a18e | 2016-11-08 11:05:13 +0400 | [diff] [blame] | 364 | Makefile: $(version-obj-y) |
Paolo Bonzini | 3bc2f57 | 2012-11-16 18:35:27 +0100 | [diff] [blame] | 365 | |
| 366 | ###################################################################### |
Paolo Bonzini | 8a09070 | 2012-12-20 15:40:20 +0100 | [diff] [blame] | 367 | # Build libraries |
Paolo Bonzini | 3bc2f57 | 2012-11-16 18:35:27 +0100 | [diff] [blame] | 368 | |
| 369 | libqemustub.a: $(stub-obj-y) |
Xu, Anthony | 3d1bacc | 2017-04-04 21:39:39 +0000 | [diff] [blame] | 370 | libqemuutil.a: $(util-obj-y) $(trace-obj-y) |
Paolo Bonzini | 3bc2f57 | 2012-11-16 18:35:27 +0100 | [diff] [blame] | 371 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 372 | ###################################################################### |
| 373 | |
Xu, Anthony | 3d1bacc | 2017-04-04 21:39:39 +0000 | [diff] [blame] | 374 | COMMON_LDADDS = libqemuutil.a libqemustub.a |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 375 | |
Juan Quintela | 3c089e1 | 2010-01-20 20:54:18 +0100 | [diff] [blame] | 376 | qemu-img.o: qemu-img-cmds.h |
Stuart Brady | 153859b | 2009-06-07 00:42:17 +0100 | [diff] [blame] | 377 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 378 | qemu-img$(EXESUF): qemu-img.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) |
| 379 | qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) |
| 380 | qemu-io$(EXESUF): qemu-io.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) |
aliguori | 0a8e1ac | 2009-04-05 18:41:23 +0000 | [diff] [blame] | 381 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 382 | qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS) |
Corey Bryant | 7b93fad | 2012-01-26 09:42:24 -0500 | [diff] [blame] | 383 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 384 | fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS) |
M. Mohan Kumar | 17bff52 | 2011-12-14 13:58:42 +0530 | [diff] [blame] | 385 | fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap |
| 386 | |
Paolo Bonzini | 077de81 | 2016-06-07 13:27:04 +0200 | [diff] [blame] | 387 | qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 388 | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@") |
Stuart Brady | 153859b | 2009-06-07 00:42:17 +0100 | [diff] [blame] | 389 | |
Michael Roth | 957f1f9 | 2011-08-11 15:38:12 -0500 | [diff] [blame] | 390 | qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) |
Dunrong Huang | 54c2e50 | 2012-07-29 03:11:24 +0800 | [diff] [blame] | 391 | qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated |
Michael Roth | 640e540 | 2011-07-19 14:50:44 -0500 | [diff] [blame] | 392 | |
Avi Kivity | 19bf7c8 | 2011-12-28 12:26:58 +0200 | [diff] [blame] | 393 | gen-out-type = $(subst .,-,$(suffix $@)) |
Avi Kivity | 8d3bc51 | 2011-12-27 16:02:16 +0200 | [diff] [blame] | 394 | |
Stefan Hajnoczi | 0521d37 | 2012-08-10 14:08:42 +0100 | [diff] [blame] | 395 | qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py |
| 396 | |
Dunrong Huang | 54c2e50 | 2012-07-29 03:11:24 +0800 | [diff] [blame] | 397 | qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\ |
Paolo Bonzini | 2870dc3 | 2012-10-24 11:26:49 +0200 | [diff] [blame] | 398 | $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) |
Lluís Vilanova | 0a60774 | 2014-05-02 15:52:24 +0200 | [diff] [blame] | 399 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ |
Markus Armbruster | 16d80f6 | 2015-04-02 13:32:16 +0200 | [diff] [blame] | 400 | $(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 401 | "GEN","$@") |
Dunrong Huang | 54c2e50 | 2012-07-29 03:11:24 +0800 | [diff] [blame] | 402 | qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\ |
Paolo Bonzini | 2870dc3 | 2012-10-24 11:26:49 +0200 | [diff] [blame] | 403 | $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) |
Lluís Vilanova | 0a60774 | 2014-05-02 15:52:24 +0200 | [diff] [blame] | 404 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \ |
Markus Armbruster | 16d80f6 | 2015-04-02 13:32:16 +0200 | [diff] [blame] | 405 | $(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 406 | "GEN","$@") |
Dunrong Huang | 54c2e50 | 2012-07-29 03:11:24 +0800 | [diff] [blame] | 407 | qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\ |
Paolo Bonzini | 2870dc3 | 2012-10-24 11:26:49 +0200 | [diff] [blame] | 408 | $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) |
Lluís Vilanova | 0a60774 | 2014-05-02 15:52:24 +0200 | [diff] [blame] | 409 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ |
Markus Armbruster | 16d80f6 | 2015-04-02 13:32:16 +0200 | [diff] [blame] | 410 | $(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 411 | "GEN","$@") |
Michael Roth | e3d4d25 | 2011-07-19 15:41:55 -0500 | [diff] [blame] | 412 | |
Max Reitz | be13d46 | 2014-06-18 08:43:26 +0200 | [diff] [blame] | 413 | qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \ |
Wenchao Xia | f668470 | 2014-06-18 08:43:32 +0200 | [diff] [blame] | 414 | $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \ |
Daniel P. Berrange | 48befbc | 2015-11-19 17:18:39 +0000 | [diff] [blame] | 415 | $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \ |
Lluís Vilanova | 423aeaf | 2016-02-04 19:29:17 +0100 | [diff] [blame] | 416 | $(SRC_PATH)/qapi/crypto.json $(SRC_PATH)/qapi/rocker.json \ |
| 417 | $(SRC_PATH)/qapi/trace.json |
Max Reitz | be13d46 | 2014-06-18 08:43:26 +0200 | [diff] [blame] | 418 | |
Michael S. Tsirkin | 599825c | 2011-11-16 23:58:18 +0200 | [diff] [blame] | 419 | qapi-types.c qapi-types.h :\ |
Max Reitz | be13d46 | 2014-06-18 08:43:26 +0200 | [diff] [blame] | 420 | $(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) |
Lluís Vilanova | 0a60774 | 2014-05-02 15:52:24 +0200 | [diff] [blame] | 421 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ |
Markus Armbruster | 16d80f6 | 2015-04-02 13:32:16 +0200 | [diff] [blame] | 422 | $(gen-out-type) -o "." -b $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 423 | "GEN","$@") |
Michael S. Tsirkin | 599825c | 2011-11-16 23:58:18 +0200 | [diff] [blame] | 424 | qapi-visit.c qapi-visit.h :\ |
Max Reitz | be13d46 | 2014-06-18 08:43:26 +0200 | [diff] [blame] | 425 | $(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) |
Lluís Vilanova | 0a60774 | 2014-05-02 15:52:24 +0200 | [diff] [blame] | 426 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \ |
Markus Armbruster | 16d80f6 | 2015-04-02 13:32:16 +0200 | [diff] [blame] | 427 | $(gen-out-type) -o "." -b $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 428 | "GEN","$@") |
Wenchao Xia | 21cd70d | 2014-06-18 08:43:28 +0200 | [diff] [blame] | 429 | qapi-event.c qapi-event.h :\ |
| 430 | $(qapi-modules) $(SRC_PATH)/scripts/qapi-event.py $(qapi-py) |
| 431 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-event.py \ |
Markus Armbruster | 16d80f6 | 2015-04-02 13:32:16 +0200 | [diff] [blame] | 432 | $(gen-out-type) -o "." $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 433 | "GEN","$@") |
Michael S. Tsirkin | 599825c | 2011-11-16 23:58:18 +0200 | [diff] [blame] | 434 | qmp-commands.h qmp-marshal.c :\ |
Max Reitz | be13d46 | 2014-06-18 08:43:26 +0200 | [diff] [blame] | 435 | $(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) |
Lluís Vilanova | 0a60774 | 2014-05-02 15:52:24 +0200 | [diff] [blame] | 436 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ |
Marc-André Lureau | c823501 | 2016-09-12 13:19:04 +0400 | [diff] [blame] | 437 | $(gen-out-type) -o "." $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 438 | "GEN","$@") |
Markus Armbruster | 39a1815 | 2015-09-16 13:06:28 +0200 | [diff] [blame] | 439 | qmp-introspect.h qmp-introspect.c :\ |
| 440 | $(qapi-modules) $(SRC_PATH)/scripts/qapi-introspect.py $(qapi-py) |
| 441 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-introspect.py \ |
| 442 | $(gen-out-type) -o "." $<, \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 443 | "GEN","$@") |
Anthony Liguori | e319360 | 2011-09-02 12:34:47 -0500 | [diff] [blame] | 444 | |
Dunrong Huang | 54c2e50 | 2012-07-29 03:11:24 +0800 | [diff] [blame] | 445 | QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h) |
Paolo Bonzini | 4115852 | 2012-05-29 12:41:34 +0200 | [diff] [blame] | 446 | $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) |
Michael Roth | 957f1f9 | 2011-08-11 15:38:12 -0500 | [diff] [blame] | 447 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 448 | qemu-ga$(EXESUF): $(qga-obj-y) $(COMMON_LDADDS) |
Michael Roth | fafcaf1 | 2015-09-07 18:47:05 -0500 | [diff] [blame] | 449 | $(call LINK, $^) |
Michael Roth | 48ff7a6 | 2011-07-20 15:19:37 -0500 | [diff] [blame] | 450 | |
Yossi Hindin | 9dacf32 | 2015-05-06 14:57:40 +0300 | [diff] [blame] | 451 | ifdef QEMU_GA_MSI_ENABLED |
| 452 | QEMU_GA_MSI=qemu-ga-$(ARCH).msi |
| 453 | |
Leonid Bloch | 0a18750 | 2015-07-29 20:10:51 +0300 | [diff] [blame] | 454 | msi: $(QEMU_GA_MSI) |
Yossi Hindin | 9dacf32 | 2015-05-06 14:57:40 +0300 | [diff] [blame] | 455 | |
Michael Roth | fafcaf1 | 2015-09-07 18:47:05 -0500 | [diff] [blame] | 456 | $(QEMU_GA_MSI): qemu-ga.exe $(QGA_VSS_PROVIDER) |
Yossi Hindin | 9dacf32 | 2015-05-06 14:57:40 +0300 | [diff] [blame] | 457 | |
Yossi Hindin | 9dacf32 | 2015-05-06 14:57:40 +0300 | [diff] [blame] | 458 | $(QEMU_GA_MSI): config-host.mak |
| 459 | |
Leonid Bloch | decdfbd | 2015-08-26 15:07:16 +0300 | [diff] [blame] | 460 | $(QEMU_GA_MSI): $(SRC_PATH)/qga/installer/qemu-ga.wxs |
| 461 | $(call quiet-command,QEMU_GA_VERSION="$(QEMU_GA_VERSION)" QEMU_GA_MANUFACTURER="$(QEMU_GA_MANUFACTURER)" QEMU_GA_DISTRO="$(QEMU_GA_DISTRO)" BUILD_DIR="$(BUILD_DIR)" \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 462 | wixl -o $@ $(QEMU_GA_MSI_ARCH) $(QEMU_GA_MSI_WITH_VSS) $(QEMU_GA_MSI_MINGW_DLL_PATH) $<,"WIXL","$@") |
Yossi Hindin | 9dacf32 | 2015-05-06 14:57:40 +0300 | [diff] [blame] | 463 | else |
| 464 | msi: |
Michael Roth | 15b19ed | 2015-08-26 17:05:01 -0500 | [diff] [blame] | 465 | @echo "MSI build not configured or dependency resolution failed (reconfigure with --enable-guest-agent-msi option)" |
Yossi Hindin | 9dacf32 | 2015-05-06 14:57:40 +0300 | [diff] [blame] | 466 | endif |
| 467 | |
Michael Roth | fafcaf1 | 2015-09-07 18:47:05 -0500 | [diff] [blame] | 468 | ifneq ($(EXESUF),) |
| 469 | .PHONY: qemu-ga |
| 470 | qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) |
| 471 | endif |
| 472 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 473 | ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS) |
David Marchand | a75eb03 | 2014-09-08 11:17:48 +0200 | [diff] [blame] | 474 | $(call LINK, $^) |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 475 | ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) |
David Marchand | a75eb03 | 2014-09-08 11:17:48 +0200 | [diff] [blame] | 476 | $(call LINK, $^) |
Felipe Franciosi | 49cc034 | 2017-03-02 10:25:53 -0800 | [diff] [blame] | 477 | vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) |
| 478 | $(call LINK, $^) |
David Marchand | a75eb03 | 2014-09-08 11:17:48 +0200 | [diff] [blame] | 479 | |
Marc Mari | 0c0c1fd | 2016-08-12 09:27:02 -0400 | [diff] [blame] | 480 | module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak |
| 481 | $(call quiet-command,$(PYTHON) $< $@ \ |
| 482 | $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 483 | "GEN","$@") |
Marc Mari | 0c0c1fd | 2016-08-12 09:27:02 -0400 | [diff] [blame] | 484 | |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 485 | clean: |
bellard | 2d80ae8 | 2003-08-11 23:01:33 +0000 | [diff] [blame] | 486 | # avoid old build problems by removing potentially incorrect old files |
Juan Quintela | 25be210f | 2009-10-07 02:41:00 +0200 | [diff] [blame] | 487 | rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h |
Michael S. Tsirkin | df2943b | 2010-10-26 17:53:41 +0200 | [diff] [blame] | 488 | rm -f qemu-options.def |
Yossi Hindin | 9dacf32 | 2015-05-06 14:57:40 +0300 | [diff] [blame] | 489 | rm -f *.msi |
Marc-André Lureau | c17a18e | 2016-11-08 11:05:13 +0400 | [diff] [blame] | 490 | find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + |
Tomoki Sekiyama | b39297a | 2013-08-07 11:40:18 -0400 | [diff] [blame] | 491 | rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ |
Stefan Weil | 8b6bfc7 | 2013-07-25 18:24:58 +0200 | [diff] [blame] | 492 | rm -f fsdev/*.pod |
Blue Swirl | 07b44ce | 2009-06-09 18:45:16 +0000 | [diff] [blame] | 493 | rm -f qemu-img-cmds.h |
Gerd Hoffmann | d98bc0b | 2015-01-16 13:59:17 +0100 | [diff] [blame] | 494 | rm -f ui/shader/*-vert.h ui/shader/*-frag.h |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 495 | @# May not be present in GENERATED_FILES |
Lluís Vilanova | eac236e | 2012-12-14 20:13:09 +0100 | [diff] [blame] | 496 | rm -f trace/generated-tracers-dtrace.dtrace* |
| 497 | rm -f trace/generated-tracers-dtrace.h* |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 498 | rm -f $(foreach f,$(GENERATED_FILES),$(f) $(f)-timestamp) |
Stefan Weil | 8f0e5c6bb | 2012-06-09 09:08:39 +0200 | [diff] [blame] | 499 | rm -rf qapi-generated |
Dunrong Huang | 54c2e50 | 2012-07-29 03:11:24 +0800 | [diff] [blame] | 500 | rm -rf qga/qapi-generated |
Stefan Hajnoczi | 781c0c3 | 2013-01-15 08:47:26 +0100 | [diff] [blame] | 501 | for d in $(ALL_SUBDIRS); do \ |
Magnus Damm | fc8e320 | 2009-11-13 18:51:05 +0900 | [diff] [blame] | 502 | if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ |
Michael S. Tsirkin | df2943b | 2010-10-26 17:53:41 +0200 | [diff] [blame] | 503 | rm -f $$d/qemu-options.def; \ |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 504 | done |
Peter Maydell | 168340b | 2016-05-17 12:27:31 +0100 | [diff] [blame] | 505 | rm -f $(SUBDIR_DEVICES_MAK) config-all-devices.mak |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 506 | |
Anthony Liguori | 34bb443 | 2012-07-17 13:33:32 -0500 | [diff] [blame] | 507 | VERSION ?= $(shell cat VERSION) |
| 508 | |
| 509 | dist: qemu-$(VERSION).tar.bz2 |
| 510 | |
| 511 | qemu-%.tar.bz2: |
| 512 | $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" |
| 513 | |
bellard | 7d13299 | 2003-03-06 23:23:54 +0000 | [diff] [blame] | 514 | distclean: clean |
Pavel Butsykin | 2cd8af2 | 2015-09-10 18:39:01 +0300 | [diff] [blame] | 515 | rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi |
Thomas Huth | ae21935 | 2014-12-15 11:19:46 +0100 | [diff] [blame] | 516 | rm -f config-all-devices.mak config-all-disas.mak config.status |
| 517 | rm -f po/*.mo tests/qemu-iotests/common.env |
Magnus Damm | fc8e320 | 2009-11-13 18:51:05 +0900 | [diff] [blame] | 518 | rm -f roms/seabios/config.mak roms/vgabios/config.mak |
Marc-André Lureau | bd3f570 | 2017-01-13 15:41:32 +0100 | [diff] [blame] | 519 | rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps |
Brad Hards | 7a734b8 | 2011-04-13 16:42:16 +1000 | [diff] [blame] | 520 | rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys |
| 521 | rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp |
Peter Maydell | d5e8510 | 2017-01-24 14:02:18 +0000 | [diff] [blame] | 522 | rm -f qemu-doc.vr qemu-doc.txt |
Alexandre Raymond | 793553a | 2011-07-25 23:56:02 -0400 | [diff] [blame] | 523 | rm -f config.log |
Peter Maydell | 67ed96f | 2012-02-01 18:50:42 +0000 | [diff] [blame] | 524 | rm -f linux-headers/asm |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 525 | rm -f docs/version.texi |
| 526 | rm -f docs/interop/qemu-ga-qapi.texi docs/interop/qemu-qmp-qapi.texi |
| 527 | rm -f docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7 |
| 528 | rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt |
| 529 | rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf |
| 530 | rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html |
Paolo Bonzini | 8e98e2e | 2012-10-24 11:16:01 +0200 | [diff] [blame] | 531 | for d in $(TARGET_DIRS); do \ |
bellard | bc1b050 | 2003-10-28 00:12:52 +0000 | [diff] [blame] | 532 | rm -rf $$d || exit 1 ; \ |
bellard | 76bc683 | 2003-08-10 23:41:46 +0000 | [diff] [blame] | 533 | done |
Tomoki Sekiyama | d9840e2 | 2013-08-07 11:40:03 -0400 | [diff] [blame] | 534 | rm -Rf .sdk |
Ed Maste | fb8597b | 2015-04-01 13:58:38 -0400 | [diff] [blame] | 535 | if test -f pixman/config.log; then $(MAKE) -C pixman distclean; fi |
| 536 | if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi |
bellard | 7d13299 | 2003-03-06 23:23:54 +0000 | [diff] [blame] | 537 | |
bellard | fed4a9a | 2004-12-12 22:18:34 +0000 | [diff] [blame] | 538 | KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ |
| 539 | ar de en-us fi fr-be hr it lv nl pl ru th \ |
Frédéric Boiteux | 471fbf4 | 2012-06-08 20:06:25 +0200 | [diff] [blame] | 540 | common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ |
Jan Krupa | 3751e72 | 2013-10-16 14:40:04 +0200 | [diff] [blame] | 541 | bepo cz |
bellard | fed4a9a | 2004-12-12 22:18:34 +0000 | [diff] [blame] | 542 | |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 543 | ifdef INSTALL_BLOBS |
Gerd Hoffmann | 3b1154f | 2016-07-04 17:22:17 +0200 | [diff] [blame] | 544 | BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ |
Gerd Hoffmann | 7a4dfd1 | 2014-09-10 13:04:17 +0200 | [diff] [blame] | 545 | vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \ |
Eduardo Habkost | 75fb3d2 | 2016-01-23 14:02:12 -0200 | [diff] [blame] | 546 | acpi-dsdt.aml \ |
Mark Cave-Ayland | 9eb08a4 | 2013-10-15 21:03:04 +0100 | [diff] [blame] | 547 | ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \ |
Alex Williamson | 5ee8ad7 | 2011-04-18 11:46:01 -0600 | [diff] [blame] | 548 | pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ |
| 549 | pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ |
Sander Eikelenboom | 9fd0297 | 2013-04-08 23:08:13 +0200 | [diff] [blame] | 550 | efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \ |
| 551 | efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \ |
Gerd Hoffmann | 4502780 | 2016-07-01 13:26:57 +0200 | [diff] [blame] | 552 | efi-e1000e.rom efi-vmxnet3.rom \ |
Anthony Liguori | f7da9c1 | 2013-06-07 13:24:17 -0500 | [diff] [blame] | 553 | qemu-icon.bmp qemu_logo_no_text.svg \ |
Michal Simek | 00914b7 | 2011-03-14 11:29:19 +0100 | [diff] [blame] | 554 | bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ |
Marc Marí | b2a575a | 2016-05-23 19:11:33 +0100 | [diff] [blame] | 555 | multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin \ |
Alexander Graf | 0c1fecdd | 2013-04-22 21:10:50 +0200 | [diff] [blame] | 556 | s390-ccw.img \ |
Cédric Le Goater | bcad45d | 2016-10-22 11:46:34 +0200 | [diff] [blame] | 557 | spapr-rtas.bin slof.bin skiboot.lid \ |
Cole Robinson | 0c6ab8c | 2014-07-04 15:43:18 -0400 | [diff] [blame] | 558 | palcode-clipper \ |
Mark Cave-Ayland | fbe9214 | 2017-05-01 14:43:31 +0100 | [diff] [blame] | 559 | u-boot.e500 \ |
| 560 | qemu_vga.ndrv |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 561 | else |
| 562 | BLOBS= |
| 563 | endif |
| 564 | |
pbrook | 38954dc | 2006-04-30 23:54:18 +0000 | [diff] [blame] | 565 | install-doc: $(DOCS) |
Eduardo Habkost | d7dd65b | 2012-04-18 16:55:44 -0300 | [diff] [blame] | 566 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" |
Paolo Bonzini | 78e8779 | 2016-10-06 16:12:11 +0200 | [diff] [blame] | 567 | $(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)" |
Marc-André Lureau | f8bab10 | 2017-01-13 15:41:34 +0100 | [diff] [blame] | 568 | $(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)" |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 569 | $(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)" |
| 570 | $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)" |
Juan Quintela | 96d409e | 2009-08-03 14:47:00 +0200 | [diff] [blame] | 571 | ifdef CONFIG_POSIX |
aliguori | 58f8aea | 2009-04-18 15:36:02 +0000 | [diff] [blame] | 572 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" |
Andreas Färber | 8a3e8f7 | 2013-06-11 13:13:58 +0200 | [diff] [blame] | 573 | $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1" |
Marc-André Lureau | 56e8bdd | 2017-01-13 15:41:35 +0100 | [diff] [blame] | 574 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7" |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 575 | $(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7" |
Andreas Färber | 8a3e8f7 | 2013-06-11 13:13:58 +0200 | [diff] [blame] | 576 | ifneq ($(TOOLS),) |
| 577 | $(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
aliguori | 58f8aea | 2009-04-18 15:36:02 +0000 | [diff] [blame] | 578 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" |
| 579 | $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" |
pbrook | 38954dc | 2006-04-30 23:54:18 +0000 | [diff] [blame] | 580 | endif |
Marc-André Lureau | 665b5d0 | 2015-08-27 01:34:59 +0200 | [diff] [blame] | 581 | ifneq (,$(findstring qemu-ga,$(TOOLS))) |
| 582 | $(INSTALL_DATA) qemu-ga.8 "$(DESTDIR)$(mandir)/man8" |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 583 | $(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)" |
| 584 | $(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)" |
| 585 | $(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7" |
Marc-André Lureau | 665b5d0 | 2015-08-27 01:34:59 +0200 | [diff] [blame] | 586 | endif |
Andreas Färber | 8a3e8f7 | 2013-06-11 13:13:58 +0200 | [diff] [blame] | 587 | endif |
M. Mohan Kumar | a2d8f1b | 2011-12-14 13:58:47 +0530 | [diff] [blame] | 588 | ifdef CONFIG_VIRTFS |
| 589 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" |
| 590 | $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1" |
| 591 | endif |
john cooper | b5ec5ce | 2010-02-20 11:14:59 -0600 | [diff] [blame] | 592 | |
Eduardo Habkost | e2d87bf | 2012-05-02 13:07:30 -0300 | [diff] [blame] | 593 | install-datadir: |
| 594 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" |
| 595 | |
Laszlo Ersek | f2e3978 | 2013-05-18 07:13:14 +0200 | [diff] [blame] | 596 | install-localstatedir: |
| 597 | ifdef CONFIG_POSIX |
| 598 | ifneq (,$(findstring qemu-ga,$(TOOLS))) |
| 599 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run |
| 600 | endif |
| 601 | endif |
| 602 | |
Eduardo Habkost | e2d87bf | 2012-05-02 13:07:30 -0300 | [diff] [blame] | 603 | |
Daniel P. Berrange | 4175304 | 2017-02-28 12:29:01 +0000 | [diff] [blame] | 604 | install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir |
ths | 932a79d | 2007-10-20 18:29:34 +0000 | [diff] [blame] | 605 | ifneq ($(TOOLS),) |
Michael Roth | 68aa262 | 2015-11-23 15:48:58 -0600 | [diff] [blame] | 606 | $(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)$(bindir)) |
ths | 932a79d | 2007-10-20 18:29:34 +0000 | [diff] [blame] | 607 | endif |
Fam Zheng | e3be6f0 | 2014-02-10 14:48:58 +0800 | [diff] [blame] | 608 | ifneq ($(CONFIG_MODULES),) |
| 609 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)" |
Michael Tokarev | 2115182 | 2014-05-08 14:56:58 +0400 | [diff] [blame] | 610 | for s in $(modules-m:.mo=$(DSOSUF)); do \ |
| 611 | t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \ |
Michael Tokarev | 264f8b4 | 2014-05-08 15:06:03 +0400 | [diff] [blame] | 612 | $(INSTALL_LIB) $$s "$$t"; \ |
Michael Tokarev | 2115182 | 2014-05-08 14:56:58 +0400 | [diff] [blame] | 613 | test -z "$(STRIP)" || $(STRIP) "$$t"; \ |
Fam Zheng | e3be6f0 | 2014-02-10 14:48:58 +0800 | [diff] [blame] | 614 | done |
| 615 | endif |
Corey Bryant | 7b93fad | 2012-01-26 09:42:24 -0500 | [diff] [blame] | 616 | ifneq ($(HELPERS-y),) |
Michael Tokarev | 0d65942 | 2014-06-22 10:55:23 +0400 | [diff] [blame] | 617 | $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir)) |
Corey Bryant | 7b93fad | 2012-01-26 09:42:24 -0500 | [diff] [blame] | 618 | endif |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 619 | ifneq ($(BLOBS),) |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 620 | set -e; for x in $(BLOBS); do \ |
Eduardo Habkost | 6aae2a2 | 2012-04-18 16:55:41 -0300 | [diff] [blame] | 621 | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 622 | done |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 623 | endif |
Anthony Liguori | 834574e | 2013-02-20 07:43:24 -0600 | [diff] [blame] | 624 | ifeq ($(CONFIG_GTK),y) |
| 625 | $(MAKE) -C po $@ |
| 626 | endif |
Eduardo Habkost | 6aae2a2 | 2012-04-18 16:55:41 -0300 | [diff] [blame] | 627 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" |
blueswir1 | 18be8d7 | 2008-03-05 18:16:09 +0000 | [diff] [blame] | 628 | set -e; for x in $(KEYMAPS); do \ |
Eduardo Habkost | 6aae2a2 | 2012-04-18 16:55:41 -0300 | [diff] [blame] | 629 | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 630 | done |
Daniel P. Berrange | 1412cf5 | 2016-06-16 09:39:47 +0100 | [diff] [blame] | 631 | $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all" |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 632 | for d in $(TARGET_DIRS); do \ |
Lluís Vilanova | 6570025 | 2014-01-20 12:21:54 +0100 | [diff] [blame] | 633 | $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 634 | done |
bellard | 612384d | 2003-03-22 17:31:19 +0000 | [diff] [blame] | 635 | |
bellard | 367e86e | 2003-03-01 17:13:26 +0000 | [diff] [blame] | 636 | # various test targets |
bellard | 9b0b820 | 2007-11-14 10:34:57 +0000 | [diff] [blame] | 637 | test speed: all |
Anthony Liguori | c09015d | 2012-01-10 13:10:42 -0600 | [diff] [blame] | 638 | $(MAKE) -C tests/tcg $@ |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 639 | |
Fam Zheng | ae5fdc8 | 2015-05-22 13:35:08 +0800 | [diff] [blame] | 640 | .PHONY: ctags |
| 641 | ctags: |
Sergey Fedorov | ac99c62 | 2016-06-09 20:58:35 +0300 | [diff] [blame] | 642 | rm -f tags |
Fam Zheng | ae5fdc8 | 2015-05-22 13:35:08 +0800 | [diff] [blame] | 643 | find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} + |
| 644 | |
Alexandre Bique | 21d4e8e | 2009-08-07 15:43:11 +0100 | [diff] [blame] | 645 | .PHONY: TAGS |
ths | 5fafdf2 | 2007-09-16 21:08:06 +0000 | [diff] [blame] | 646 | TAGS: |
Sergey Fedorov | ac99c62 | 2016-06-09 20:58:35 +0300 | [diff] [blame] | 647 | rm -f TAGS |
David Gibson | b1999e8 | 2013-03-12 13:57:28 +1100 | [diff] [blame] | 648 | find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} + |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 649 | |
bellard | 6688bc6 | 2005-08-21 09:23:39 +0000 | [diff] [blame] | 650 | cscope: |
Fam Zheng | eaa2ddb | 2015-05-22 13:35:07 +0800 | [diff] [blame] | 651 | rm -f "$(SRC_PATH)"/cscope.* |
| 652 | find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed 's,^\./,,' > "$(SRC_PATH)/cscope.files" |
| 653 | cscope -b -i"$(SRC_PATH)/cscope.files" |
bellard | 6688bc6 | 2005-08-21 09:23:39 +0000 | [diff] [blame] | 654 | |
Gerd Hoffmann | d98bc0b | 2015-01-16 13:59:17 +0100 | [diff] [blame] | 655 | # opengl shader programs |
| 656 | ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert $(SRC_PATH)/scripts/shaderinclude.pl |
| 657 | @mkdir -p $(dir $@) |
| 658 | $(call quiet-command,\ |
| 659 | perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 660 | "VERT","$@") |
Gerd Hoffmann | d98bc0b | 2015-01-16 13:59:17 +0100 | [diff] [blame] | 661 | |
| 662 | ui/shader/%-frag.h: $(SRC_PATH)/ui/shader/%.frag $(SRC_PATH)/scripts/shaderinclude.pl |
| 663 | @mkdir -p $(dir $@) |
| 664 | $(call quiet-command,\ |
| 665 | perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\ |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 666 | "FRAG","$@") |
Gerd Hoffmann | d98bc0b | 2015-01-16 13:59:17 +0100 | [diff] [blame] | 667 | |
Gerd Hoffmann | cd2bc88 | 2015-01-09 11:40:23 +0100 | [diff] [blame] | 668 | ui/console-gl.o: $(SRC_PATH)/ui/console-gl.c \ |
| 669 | ui/shader/texture-blit-vert.h ui/shader/texture-blit-frag.h |
| 670 | |
bellard | 3ef693a | 2003-03-23 20:17:16 +0000 | [diff] [blame] | 671 | # documentation |
Markus Armbruster | e8518c9 | 2017-01-19 10:06:44 +0100 | [diff] [blame] | 672 | MAKEINFO=makeinfo |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 673 | MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D) |
| 674 | MAKEINFOFLAGS=--no-split --number-sections $(MAKEINFOINCLUDES) |
Paolo Bonzini | 44cb280 | 2017-06-06 16:59:37 +0200 | [diff] [blame] | 675 | TEXI2PODFLAGS=$(MAKEINFOINCLUDES) "-DVERSION=$(VERSION)" |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 676 | TEXI2PDFFLAGS=$(if $(V),,--quiet) -I $(SRC_PATH) $(MAKEINFOINCLUDES) |
Marc-André Lureau | 56e8bdd | 2017-01-13 15:41:35 +0100 | [diff] [blame] | 677 | |
Markus Armbruster | bd7f974 | 2017-03-15 13:56:56 +0100 | [diff] [blame] | 678 | docs/version.texi: $(SRC_PATH)/VERSION |
Peter Maydell | fea346f | 2017-02-17 18:59:28 +0000 | [diff] [blame] | 679 | $(call quiet-command,echo "@set VERSION $(VERSION)" > $@,"GEN","$@") |
| 680 | |
Paolo Bonzini | 44cb280 | 2017-06-06 16:59:37 +0200 | [diff] [blame] | 681 | %.html: %.texi docs/version.texi |
Marc-André Lureau | e9ee06b | 2017-01-13 15:41:31 +0100 | [diff] [blame] | 682 | $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ |
| 683 | --html $< -o $@,"GEN","$@") |
bellard | 3ef693a | 2003-03-23 20:17:16 +0000 | [diff] [blame] | 684 | |
Paolo Bonzini | 44cb280 | 2017-06-06 16:59:37 +0200 | [diff] [blame] | 685 | %.info: %.texi docs/version.texi |
Marc-André Lureau | e9ee06b | 2017-01-13 15:41:31 +0100 | [diff] [blame] | 686 | $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@") |
bellard | f354832 | 2006-04-30 22:51:54 +0000 | [diff] [blame] | 687 | |
Paolo Bonzini | 44cb280 | 2017-06-06 16:59:37 +0200 | [diff] [blame] | 688 | %.txt: %.texi docs/version.texi |
Marc-André Lureau | f8bab10 | 2017-01-13 15:41:34 +0100 | [diff] [blame] | 689 | $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ |
| 690 | --plaintext $< -o $@,"GEN","$@") |
| 691 | |
Paolo Bonzini | 44cb280 | 2017-06-06 16:59:37 +0200 | [diff] [blame] | 692 | %.pdf: %.texi docs/version.texi |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 693 | $(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@") |
Markus Armbruster | bd7f974 | 2017-03-15 13:56:56 +0100 | [diff] [blame] | 694 | |
Paolo Bonzini | 077de81 | 2016-06-07 13:27:04 +0200 | [diff] [blame] | 695 | qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 696 | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@") |
bellard | f354832 | 2006-04-30 22:51:54 +0000 | [diff] [blame] | 697 | |
Paolo Bonzini | 077de81 | 2016-06-07 13:27:04 +0200 | [diff] [blame] | 698 | qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 699 | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@") |
Blue Swirl | 2313086 | 2009-06-06 08:22:04 +0000 | [diff] [blame] | 700 | |
Paolo Bonzini | 077de81 | 2016-06-07 13:27:04 +0200 | [diff] [blame] | 701 | qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 702 | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@") |
Pavel Butsykin | 2cd8af2 | 2015-09-10 18:39:01 +0300 | [diff] [blame] | 703 | |
Paolo Bonzini | 077de81 | 2016-06-07 13:27:04 +0200 | [diff] [blame] | 704 | qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool |
Peter Maydell | 0bdb12c | 2016-10-04 17:27:21 +0100 | [diff] [blame] | 705 | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@") |
Stuart Brady | 153859b | 2009-06-07 00:42:17 +0100 | [diff] [blame] | 706 | |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 707 | docs/interop/qemu-qmp-qapi.texi docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/scripts/qapi2texi.py $(qapi-py) |
Markus Armbruster | 4afeeb5 | 2017-03-20 14:11:50 +0100 | [diff] [blame] | 708 | |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 709 | docs/interop/qemu-qmp-qapi.texi: $(qapi-modules) |
Markus Armbruster | e8518c9 | 2017-01-19 10:06:44 +0100 | [diff] [blame] | 710 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py $< > $@,"GEN","$@") |
Marc-André Lureau | 56e8bdd | 2017-01-13 15:41:35 +0100 | [diff] [blame] | 711 | |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 712 | docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/qga/qapi-schema.json |
Marc-André Lureau | 56e8bdd | 2017-01-13 15:41:35 +0100 | [diff] [blame] | 713 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py $< > $@,"GEN","$@") |
| 714 | |
Pavel Butsykin | 2cd8af2 | 2015-09-10 18:39:01 +0300 | [diff] [blame] | 715 | qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi |
Denis V. Lunev | eeb2b8f | 2016-06-17 17:44:09 +0300 | [diff] [blame] | 716 | qemu.1: qemu-option-trace.texi |
Denis V. Lunev | 06a1e0c | 2016-06-17 17:44:14 +0300 | [diff] [blame] | 717 | qemu-img.1: qemu-img.texi qemu-option-trace.texi qemu-img-cmds.texi |
M. Mohan Kumar | a2d8f1b | 2011-12-14 13:58:47 +0530 | [diff] [blame] | 718 | fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi |
Denis V. Lunev | 39ca463 | 2016-06-17 17:44:12 +0300 | [diff] [blame] | 719 | qemu-nbd.8: qemu-nbd.texi qemu-option-trace.texi |
Marc-André Lureau | 665b5d0 | 2015-08-27 01:34:59 +0200 | [diff] [blame] | 720 | qemu-ga.8: qemu-ga.texi |
Marc-André Lureau | 665b5d0 | 2015-08-27 01:34:59 +0200 | [diff] [blame] | 721 | |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 722 | html: qemu-doc.html docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html |
| 723 | info: qemu-doc.info docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info |
| 724 | pdf: qemu-doc.pdf docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf |
| 725 | txt: qemu-doc.txt docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt |
pbrook | 0cb3fb1 | 2006-05-14 12:07:53 +0000 | [diff] [blame] | 726 | |
Peter Maydell | d5e8510 | 2017-01-24 14:02:18 +0000 | [diff] [blame] | 727 | qemu-doc.html qemu-doc.info qemu-doc.pdf qemu-doc.txt: \ |
Denis V. Lunev | eeb2b8f | 2016-06-17 17:44:09 +0300 | [diff] [blame] | 728 | qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-option-trace.texi \ |
Pavel Butsykin | 2cd8af2 | 2015-09-10 18:39:01 +0300 | [diff] [blame] | 729 | qemu-monitor.texi qemu-img-cmds.texi qemu-ga.texi \ |
| 730 | qemu-monitor-info.texi |
aliguori | 818220f | 2008-09-24 01:13:40 +0000 | [diff] [blame] | 731 | |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 732 | docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \ |
| 733 | docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \ |
| 734 | docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7: \ |
| 735 | docs/interop/qemu-ga-ref.texi docs/interop/qemu-ga-qapi.texi |
Marc-André Lureau | 56e8bdd | 2017-01-13 15:41:35 +0100 | [diff] [blame] | 736 | |
Paolo Bonzini | d59157e | 2017-06-06 16:55:19 +0200 | [diff] [blame] | 737 | docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \ |
| 738 | docs/interop/qemu-qmp-ref.info docs/interop/qemu-qmp-ref.pdf \ |
| 739 | docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \ |
| 740 | docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi |
Marc-André Lureau | 56e8bdd | 2017-01-13 15:41:35 +0100 | [diff] [blame] | 741 | |
| 742 | |
Stefan Weil | f53ec69 | 2013-07-15 23:49:57 +0200 | [diff] [blame] | 743 | ifdef CONFIG_WIN32 |
| 744 | |
| 745 | INSTALLER = qemu-setup-$(VERSION)$(EXESUF) |
| 746 | |
| 747 | nsisflags = -V2 -NOCD |
| 748 | |
| 749 | ifneq ($(wildcard $(SRC_PATH)/dll),) |
| 750 | ifeq ($(ARCH),x86_64) |
| 751 | # 64 bit executables |
| 752 | DLL_PATH = $(SRC_PATH)/dll/w64 |
| 753 | nsisflags += -DW64 |
| 754 | else |
| 755 | # 32 bit executables |
| 756 | DLL_PATH = $(SRC_PATH)/dll/w32 |
| 757 | endif |
| 758 | endif |
| 759 | |
| 760 | .PHONY: installer |
| 761 | installer: $(INSTALLER) |
| 762 | |
| 763 | INSTDIR=/tmp/qemu-nsis |
| 764 | |
| 765 | $(INSTALLER): $(SRC_PATH)/qemu.nsi |
Ed Maste | fb8597b | 2015-04-01 13:58:38 -0400 | [diff] [blame] | 766 | $(MAKE) install prefix=${INSTDIR} |
Stefan Weil | f53ec69 | 2013-07-15 23:49:57 +0200 | [diff] [blame] | 767 | ifdef SIGNCODE |
| 768 | (cd ${INSTDIR}; \ |
| 769 | for i in *.exe; do \ |
| 770 | $(SIGNCODE) $${i}; \ |
| 771 | done \ |
| 772 | ) |
| 773 | endif # SIGNCODE |
| 774 | (cd ${INSTDIR}; \ |
| 775 | for i in qemu-system-*.exe; do \ |
| 776 | arch=$${i%.exe}; \ |
| 777 | arch=$${arch#qemu-system-}; \ |
| 778 | echo Section \"$$arch\" Section_$$arch; \ |
| 779 | echo SetOutPath \"\$$INSTDIR\"; \ |
| 780 | echo File \"\$${BINDIR}\\$$i\"; \ |
| 781 | echo SectionEnd; \ |
| 782 | done \ |
| 783 | ) >${INSTDIR}/system-emulations.nsh |
| 784 | makensis $(nsisflags) \ |
| 785 | $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \ |
| 786 | $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \ |
| 787 | -DBINDIR="${INSTDIR}" \ |
| 788 | $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \ |
| 789 | -DSRCDIR="$(SRC_PATH)" \ |
| 790 | -DOUTFILE="$(INSTALLER)" \ |
Stefan Weil | 805d8a6 | 2015-05-03 19:57:09 +0200 | [diff] [blame] | 791 | -DDISPLAYVERSION="$(VERSION)" \ |
Stefan Weil | f53ec69 | 2013-07-15 23:49:57 +0200 | [diff] [blame] | 792 | $(SRC_PATH)/qemu.nsi |
| 793 | rm -r ${INSTDIR} |
| 794 | ifdef SIGNCODE |
| 795 | $(SIGNCODE) $(INSTALLER) |
| 796 | endif # SIGNCODE |
| 797 | endif # CONFIG_WIN |
| 798 | |
Anthony Liguori | cb5fc67 | 2012-07-17 18:58:20 -0500 | [diff] [blame] | 799 | # Add a dependency on the generated files, so that they are always |
| 800 | # rebuilt before other object files |
Thomas Huth | 428952c | 2017-06-08 14:59:59 +0200 | [diff] [blame] | 801 | ifneq ($(wildcard config-host.mak),) |
Fam Zheng | eaa2ddb | 2015-05-22 13:35:07 +0800 | [diff] [blame] | 802 | ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
Daniel P. Berrange | 4f04f13 | 2017-02-28 12:29:00 +0000 | [diff] [blame] | 803 | Makefile: $(GENERATED_FILES) |
Mike Frysinger | 7748b8c | 2012-09-16 16:07:13 -0400 | [diff] [blame] | 804 | endif |
Thomas Huth | 428952c | 2017-06-08 14:59:59 +0200 | [diff] [blame] | 805 | endif |
Anthony Liguori | cb5fc67 | 2012-07-17 18:58:20 -0500 | [diff] [blame] | 806 | |
Daniel P. Berrange | 0ab8ed1 | 2017-01-25 16:14:15 +0000 | [diff] [blame] | 807 | .SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \ |
| 808 | $(TRACE_SOURCES) $(TRACE_SOURCES:%=%-timestamp) \ |
| 809 | $(TRACE_DTRACE) $(TRACE_DTRACE:%=%-timestamp) |
| 810 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 811 | # Include automatically generated dependency files |
Paolo Bonzini | 1435ddb | 2012-07-11 16:40:21 +0200 | [diff] [blame] | 812 | # Dependencies in Makefile.objs files come from our recursive subdir rules |
| 813 | -include $(wildcard *.d tests/*.d) |
Fam Zheng | 324027c | 2016-06-01 12:25:17 +0800 | [diff] [blame] | 814 | |
| 815 | include $(SRC_PATH)/tests/docker/Makefile.include |
Marc-André Lureau | 0d8e065 | 2016-09-13 18:20:33 +0400 | [diff] [blame] | 816 | |
| 817 | .PHONY: help |
| 818 | help: |
| 819 | @echo 'Generic targets:' |
| 820 | @echo ' all - Build all' |
| 821 | @echo ' dir/file.o - Build specified target only' |
| 822 | @echo ' install - Install QEMU, documentation and tools' |
| 823 | @echo ' ctags/TAGS - Generate tags file for editors' |
| 824 | @echo ' cscope - Generate cscope index' |
| 825 | @echo '' |
| 826 | @$(if $(TARGET_DIRS), \ |
| 827 | echo 'Architecture specific targets:'; \ |
| 828 | $(foreach t, $(TARGET_DIRS), \ |
| 829 | printf " %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \ |
| 830 | echo '') |
| 831 | @echo 'Cleaning targets:' |
| 832 | @echo ' clean - Remove most generated files but keep the config' |
| 833 | @echo ' distclean - Remove all generated files' |
| 834 | @echo ' dist - Build a distributable tarball' |
| 835 | @echo '' |
| 836 | @echo 'Test targets:' |
| 837 | @echo ' check - Run all tests (check-help for details)' |
| 838 | @echo ' docker - Help about targets running tests inside Docker containers' |
| 839 | @echo '' |
| 840 | @echo 'Documentation targets:' |
Marc-André Lureau | f8bab10 | 2017-01-13 15:41:34 +0100 | [diff] [blame] | 841 | @echo ' html info pdf txt' |
Marc-André Lureau | 0d8e065 | 2016-09-13 18:20:33 +0400 | [diff] [blame] | 842 | @echo ' - Build documentation in specified format' |
| 843 | @echo '' |
| 844 | ifdef CONFIG_WIN32 |
| 845 | @echo 'Windows targets:' |
Stefan Weil | 6bd67f8 | 2016-10-20 21:36:32 +0200 | [diff] [blame] | 846 | @echo ' installer - Build NSIS-based installer for QEMU' |
Marc-André Lureau | 0d8e065 | 2016-09-13 18:20:33 +0400 | [diff] [blame] | 847 | ifdef QEMU_GA_MSI_ENABLED |
| 848 | @echo ' msi - Build MSI-based installer for qemu-ga' |
| 849 | endif |
| 850 | @echo '' |
| 851 | endif |
| 852 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' |