xref: /openbmc/qemu/Makefile (revision dc41aa7d)
1# Makefile for QEMU.
2
3# Always point to the root of the build tree (needs GNU make).
4BUILD_DIR=$(CURDIR)
5
6# Before including a proper config-host.mak, assume we are in the source tree
7SRC_PATH=.
8
9UNCHECKED_GOALS := %clean TAGS cscope ctags docker docker-%
10
11# All following code might depend on configuration variables
12ifneq ($(wildcard config-host.mak),)
13# Put the all: rule here so that config-host.mak can contain dependencies.
14all:
15include config-host.mak
16
17git-submodule-update:
18
19.PHONY: git-submodule-update
20
21ifeq (0,$(MAKELEVEL))
22  git_module_status := $(shell \
23    cd '$(SRC_PATH)' && \
24    ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
25    echo $$?; \
26  )
27
28ifeq (1,$(git_module_status))
29git-submodule-update:
30	$(call quiet-command, \
31          (cd $(SRC_PATH) && ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
32          "GIT","$(GIT_SUBMODULES)")
33endif
34endif
35
36.git-submodule-status: git-submodule-update config-host.mak
37
38# Check that we're not trying to do an out-of-tree build from
39# a tree that's been used for an in-tree build.
40ifneq ($(realpath $(SRC_PATH)),$(realpath .))
41ifneq ($(wildcard $(SRC_PATH)/config-host.mak),)
42$(error This is an out of tree build but your source tree ($(SRC_PATH)) \
43seems to have been used for an in-tree build. You can fix this by running \
44"make distclean && rm -rf *-linux-user *-softmmu" in your source tree)
45endif
46endif
47
48CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y)
49CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y)
50CONFIG_XEN := $(CONFIG_XEN_BACKEND)
51CONFIG_ALL=y
52-include config-all-devices.mak
53-include config-all-disas.mak
54
55config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
56	@echo $@ is out-of-date, running configure
57	@# TODO: The next lines include code which supports a smooth
58	@# transition from old configurations without config.status.
59	@# This code can be removed after QEMU 1.7.
60	@if test -x config.status; then \
61	    ./config.status; \
62        else \
63	    sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \
64	fi
65else
66config-host.mak:
67ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
68	@echo "Please call configure before running make!"
69	@exit 1
70endif
71endif
72
73include $(SRC_PATH)/rules.mak
74
75GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
76GENERATED_FILES += qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h
77GENERATED_FILES += qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c
78GENERATED_FILES += qmp-introspect.h
79GENERATED_FILES += qmp-introspect.c
80
81GENERATED_FILES += trace/generated-tcg-tracers.h
82
83GENERATED_FILES += trace/generated-helpers-wrappers.h
84GENERATED_FILES += trace/generated-helpers.h
85GENERATED_FILES += trace/generated-helpers.c
86
87ifdef CONFIG_TRACE_UST
88GENERATED_FILES += trace-ust-all.h
89GENERATED_FILES += trace-ust-all.c
90endif
91
92GENERATED_FILES += module_block.h
93
94TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
95TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
96TRACE_DTRACE =
97ifdef CONFIG_TRACE_DTRACE
98TRACE_HEADERS += trace-dtrace-root.h $(trace-events-subdirs:%=%/trace-dtrace.h)
99TRACE_DTRACE += trace-dtrace-root.dtrace $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
100endif
101ifdef CONFIG_TRACE_UST
102TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
103endif
104
105GENERATED_FILES += $(TRACE_HEADERS)
106GENERATED_FILES += $(TRACE_SOURCES)
107GENERATED_FILES += $(BUILD_DIR)/trace-events-all
108GENERATED_FILES += .git-submodule-status
109
110trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
111
112tracetool-y = $(SRC_PATH)/scripts/tracetool.py
113tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
114
115%/trace.h: %/trace.h-timestamp
116	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
117%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
118	$(call quiet-command,$(TRACETOOL) \
119		--group=$(call trace-group-name,$@) \
120		--format=h \
121		--backends=$(TRACE_BACKENDS) \
122		$< > $@,"GEN","$(@:%-timestamp=%)")
123
124%/trace.c: %/trace.c-timestamp
125	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
126%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
127	$(call quiet-command,$(TRACETOOL) \
128		--group=$(call trace-group-name,$@) \
129		--format=c \
130		--backends=$(TRACE_BACKENDS) \
131		$< > $@,"GEN","$(@:%-timestamp=%)")
132
133%/trace-ust.h: %/trace-ust.h-timestamp
134	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
135%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
136	$(call quiet-command,$(TRACETOOL) \
137		--group=$(call trace-group-name,$@) \
138		--format=ust-events-h \
139		--backends=$(TRACE_BACKENDS) \
140		$< > $@,"GEN","$(@:%-timestamp=%)")
141
142%/trace-dtrace.dtrace: %/trace-dtrace.dtrace-timestamp
143	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
144%/trace-dtrace.dtrace-timestamp: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
145	$(call quiet-command,$(TRACETOOL) \
146		--group=$(call trace-group-name,$@) \
147		--format=d \
148		--backends=$(TRACE_BACKENDS) \
149		$< > $@,"GEN","$(@:%-timestamp=%)")
150
151%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y)
152	$(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
153
154%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
155
156
157trace-root.h: trace-root.h-timestamp
158	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
159trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
160	$(call quiet-command,$(TRACETOOL) \
161		--group=root \
162		--format=h \
163		--backends=$(TRACE_BACKENDS) \
164		$< > $@,"GEN","$(@:%-timestamp=%)")
165
166trace-root.c: trace-root.c-timestamp
167	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
168trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
169	$(call quiet-command,$(TRACETOOL) \
170		--group=root \
171		--format=c \
172		--backends=$(TRACE_BACKENDS) \
173		$< > $@,"GEN","$(@:%-timestamp=%)")
174
175trace-ust-root.h: trace-ust-root.h-timestamp
176	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
177trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
178	$(call quiet-command,$(TRACETOOL) \
179		--group=root \
180		--format=ust-events-h \
181		--backends=$(TRACE_BACKENDS) \
182		$< > $@,"GEN","$(@:%-timestamp=%)")
183
184trace-ust-all.h: trace-ust-all.h-timestamp
185	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
186trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y)
187	$(call quiet-command,$(TRACETOOL) \
188		--group=all \
189		--format=ust-events-h \
190		--backends=$(TRACE_BACKENDS) \
191		$(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
192
193trace-ust-all.c: trace-ust-all.c-timestamp
194	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
195trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y)
196	$(call quiet-command,$(TRACETOOL) \
197		--group=all \
198		--format=ust-events-c \
199		--backends=$(TRACE_BACKENDS) \
200		$(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
201
202trace-dtrace-root.dtrace: trace-dtrace-root.dtrace-timestamp
203	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
204trace-dtrace-root.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
205	$(call quiet-command,$(TRACETOOL) \
206		--group=root \
207		--format=d \
208		--backends=$(TRACE_BACKENDS) \
209		$< > $@,"GEN","$(@:%-timestamp=%)")
210
211trace-dtrace-root.h: trace-dtrace-root.dtrace
212	$(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
213
214trace-dtrace-root.o: trace-dtrace-root.dtrace
215
216KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
217KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
218
219KEYCODEMAP_FILES = \
220		 ui/input-keymap-linux-to-qcode.c \
221		 ui/input-keymap-qcode-to-qnum.c \
222		 ui/input-keymap-qnum-to-qcode.c \
223		 $(NULL)
224
225GENERATED_FILES += $(KEYCODEMAP_FILES)
226
227ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
228	$(call quiet-command,\
229	    src=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\1,") && \
230	    dst=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\2,") && \
231	    test -e $(KEYCODEMAP_GEN) && \
232	    $(PYTHON) $(KEYCODEMAP_GEN) \
233	          --lang glib2 \
234	          --varname qemu_input_map_$${src}_to_$${dst} \
235	          code-map $(KEYCODEMAP_CSV) $${src} $${dst} \
236	        > $@ || rm -f $@, "GEN", "$@")
237
238$(KEYCODEMAP_GEN): .git-submodule-status
239$(KEYCODEMAP_CSV): .git-submodule-status
240
241# Don't try to regenerate Makefile or configure
242# We don't generate any of them
243Makefile: ;
244configure: ;
245
246.PHONY: all clean cscope distclean html info install install-doc \
247	pdf txt recurse-all speed test dist msi FORCE
248
249$(call set-vpath, $(SRC_PATH))
250
251LIBS+=-lz $(LIBS_TOOLS)
252
253HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
254
255ifdef BUILD_DOCS
256DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
257DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
258DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
259DOCS+=docs/qemu-block-drivers.7
260ifdef CONFIG_VIRTFS
261DOCS+=fsdev/virtfs-proxy-helper.1
262endif
263else
264DOCS=
265endif
266
267SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR)
268SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
269SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS))
270
271ifeq ($(SUBDIR_DEVICES_MAK),)
272config-all-devices.mak:
273	$(call quiet-command,echo '# no devices' > $@,"GEN","$@")
274else
275config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
276	$(call quiet-command, sed -n \
277             's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \
278             $(SUBDIR_DEVICES_MAK) | sort -u > $@, \
279             "GEN","$@")
280endif
281
282-include $(SUBDIR_DEVICES_MAK_DEP)
283
284%/config-devices.mak: default-configs/%.mak $(SRC_PATH)/scripts/make_device_config.sh
285	$(call quiet-command, \
286            $(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $< $*-config-devices.mak.d $@ > $@.tmp,"GEN","$@.tmp")
287	$(call quiet-command, if test -f $@; then \
288	  if cmp -s $@.old $@; then \
289	    mv $@.tmp $@; \
290	    cp -p $@ $@.old; \
291	  else \
292	    if test -f $@.old; then \
293	      echo "WARNING: $@ (user modified) out of date.";\
294	    else \
295	      echo "WARNING: $@ out of date.";\
296	    fi; \
297	    echo "Run \"make defconfig\" to regenerate."; \
298	    rm $@.tmp; \
299	  fi; \
300	 else \
301	  mv $@.tmp $@; \
302	  cp -p $@ $@.old; \
303	 fi,"GEN","$@");
304
305defconfig:
306	rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
307
308ifneq ($(wildcard config-host.mak),)
309include $(SRC_PATH)/Makefile.objs
310endif
311
312dummy := $(call unnest-vars,, \
313                stub-obj-y \
314                chardev-obj-y \
315                util-obj-y \
316                qga-obj-y \
317                ivshmem-client-obj-y \
318                ivshmem-server-obj-y \
319                libvhost-user-obj-y \
320                vhost-user-scsi-obj-y \
321                qga-vss-dll-obj-y \
322                block-obj-y \
323                block-obj-m \
324                crypto-obj-y \
325                crypto-aes-obj-y \
326                qom-obj-y \
327                io-obj-y \
328                common-obj-y \
329                common-obj-m \
330                trace-obj-y)
331
332include $(SRC_PATH)/tests/Makefile.include
333
334all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules
335
336qemu-version.h: FORCE
337	$(call quiet-command, \
338		(cd $(SRC_PATH); \
339		printf '#define QEMU_PKGVERSION '; \
340		if test -n "$(PKGVERSION)"; then \
341			printf '"$(PKGVERSION)"\n'; \
342		else \
343			if test -d .git; then \
344				printf '" ('; \
345				git describe --match 'v*' 2>/dev/null | tr -d '\n'; \
346				if ! git diff-index --quiet HEAD &>/dev/null; then \
347					printf -- '-dirty'; \
348				fi; \
349				printf ')"\n'; \
350			else \
351				printf '""\n'; \
352			fi; \
353		fi) > $@.tmp)
354	$(call quiet-command, if ! cmp -s $@ $@.tmp; then \
355	  mv $@.tmp $@; \
356	 else \
357	  rm $@.tmp; \
358	 fi)
359
360config-host.h: config-host.h-timestamp
361config-host.h-timestamp: config-host.mak
362qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
363	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
364
365SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
366SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
367
368$(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
369$(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y)
370$(SOFTMMU_SUBDIR_RULES): $(io-obj-y)
371$(SOFTMMU_SUBDIR_RULES): config-all-devices.mak
372
373subdir-%:
374	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
375
376DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
377DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
378DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
379
380subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
381	$(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,)
382
383dtc/%: .git-submodule-status
384	mkdir -p $@
385
386$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
387	$(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))
388
389ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
390# Only keep -O and -g cflags
391romsubdir-%:
392	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/" CFLAGS="$(filter -O% -g%,$(CFLAGS))",)
393
394ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
395
396recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
397
398$(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h
399	$(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"RC","version.o")
400
401Makefile: $(version-obj-y)
402
403######################################################################
404# Build libraries
405
406libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y)
407libvhost-user.a: $(libvhost-user-obj-y)
408
409######################################################################
410
411COMMON_LDADDS = libqemuutil.a
412
413qemu-img.o: qemu-img-cmds.h
414
415qemu-img$(EXESUF): qemu-img.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
416qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
417qemu-io$(EXESUF): qemu-io.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
418
419qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
420
421qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
422
423fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
424fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
425
426scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
427ifdef CONFIG_MPATH
428scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
429endif
430
431qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
432	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
433
434qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
435qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
436
437qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
438qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
439
440gen-out-type = $(subst .,-,$(suffix $@))
441
442qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
443
444qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
445$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
446	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
447		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
448		"GEN","$@")
449qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
450$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
451	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
452		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
453		"GEN","$@")
454qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
455$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
456	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
457		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
458		"GEN","$@")
459
460qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
461               $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
462               $(SRC_PATH)/qapi/char.json \
463               $(SRC_PATH)/qapi/crypto.json \
464               $(SRC_PATH)/qapi/introspect.json \
465               $(SRC_PATH)/qapi/migration.json \
466               $(SRC_PATH)/qapi/net.json \
467               $(SRC_PATH)/qapi/rocker.json \
468               $(SRC_PATH)/qapi/run-state.json \
469               $(SRC_PATH)/qapi/sockets.json \
470               $(SRC_PATH)/qapi/tpm.json \
471               $(SRC_PATH)/qapi/trace.json \
472               $(SRC_PATH)/qapi/transaction.json \
473               $(SRC_PATH)/qapi/ui.json
474
475qapi-types.c qapi-types.h :\
476$(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
477	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
478		$(gen-out-type) -o "." -b $<, \
479		"GEN","$@")
480qapi-visit.c qapi-visit.h :\
481$(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
482	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
483		$(gen-out-type) -o "." -b $<, \
484		"GEN","$@")
485qapi-event.c qapi-event.h :\
486$(qapi-modules) $(SRC_PATH)/scripts/qapi-event.py $(qapi-py)
487	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-event.py \
488		$(gen-out-type) -o "." $<, \
489		"GEN","$@")
490qmp-commands.h qmp-marshal.c :\
491$(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
492	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
493		$(gen-out-type) -o "." $<, \
494		"GEN","$@")
495qmp-introspect.h qmp-introspect.c :\
496$(qapi-modules) $(SRC_PATH)/scripts/qapi-introspect.py $(qapi-py)
497	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-introspect.py \
498		$(gen-out-type) -o "." $<, \
499		"GEN","$@")
500
501QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
502$(qga-obj-y): $(QGALIB_GEN)
503
504qemu-ga$(EXESUF): $(qga-obj-y) $(COMMON_LDADDS)
505	$(call LINK, $^)
506
507ifdef QEMU_GA_MSI_ENABLED
508QEMU_GA_MSI=qemu-ga-$(ARCH).msi
509
510msi: $(QEMU_GA_MSI)
511
512$(QEMU_GA_MSI): qemu-ga.exe $(QGA_VSS_PROVIDER)
513
514$(QEMU_GA_MSI): config-host.mak
515
516$(QEMU_GA_MSI):  $(SRC_PATH)/qga/installer/qemu-ga.wxs
517	$(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)" \
518	wixl -o $@ $(QEMU_GA_MSI_ARCH) $(QEMU_GA_MSI_WITH_VSS) $(QEMU_GA_MSI_MINGW_DLL_PATH) $<,"WIXL","$@")
519else
520msi:
521	@echo "MSI build not configured or dependency resolution failed (reconfigure with --enable-guest-agent-msi option)"
522endif
523
524ifneq ($(EXESUF),)
525.PHONY: qemu-ga
526qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
527endif
528
529ifdef CONFIG_IVSHMEM
530ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
531	$(call LINK, $^)
532ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
533	$(call LINK, $^)
534endif
535vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a
536	$(call LINK, $^)
537
538module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
539	$(call quiet-command,$(PYTHON) $< $@ \
540	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
541	"GEN","$@")
542
543clean:
544# avoid old build problems by removing potentially incorrect old files
545	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
546	rm -f qemu-options.def
547	rm -f *.msi
548	find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
549	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
550	rm -f fsdev/*.pod scsi/*.pod
551	rm -f qemu-img-cmds.h
552	rm -f ui/shader/*-vert.h ui/shader/*-frag.h
553	@# May not be present in GENERATED_FILES
554	rm -f trace/generated-tracers-dtrace.dtrace*
555	rm -f trace/generated-tracers-dtrace.h*
556	rm -f $(foreach f,$(GENERATED_FILES),$(f) $(f)-timestamp)
557	rm -rf qapi-generated
558	rm -rf qga/qapi-generated
559	for d in $(ALL_SUBDIRS); do \
560	if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
561	rm -f $$d/qemu-options.def; \
562        done
563	rm -f $(SUBDIR_DEVICES_MAK) config-all-devices.mak
564
565VERSION ?= $(shell cat VERSION)
566
567dist: qemu-$(VERSION).tar.bz2
568
569qemu-%.tar.bz2:
570	$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
571
572distclean: clean
573	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
574	rm -f config-all-devices.mak config-all-disas.mak config.status
575	rm -f po/*.mo tests/qemu-iotests/common.env
576	rm -f roms/seabios/config.mak roms/vgabios/config.mak
577	rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps
578	rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
579	rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp
580	rm -f qemu-doc.vr qemu-doc.txt
581	rm -f config.log
582	rm -f linux-headers/asm
583	rm -f docs/version.texi
584	rm -f docs/interop/qemu-ga-qapi.texi docs/interop/qemu-qmp-qapi.texi
585	rm -f docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7
586	rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
587	rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
588	rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
589	rm -f docs/qemu-block-drivers.7
590	for d in $(TARGET_DIRS); do \
591	rm -rf $$d || exit 1 ; \
592        done
593	rm -Rf .sdk
594	if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi
595
596KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
597ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
598common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr \
599bepo    cz
600
601ifdef INSTALL_BLOBS
602BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
603vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \
604acpi-dsdt.aml \
605ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \
606pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
607pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
608efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \
609efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
610efi-e1000e.rom efi-vmxnet3.rom \
611qemu-icon.bmp qemu_logo_no_text.svg \
612bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
613multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin \
614s390-ccw.img s390-netboot.img \
615spapr-rtas.bin slof.bin skiboot.lid \
616palcode-clipper \
617u-boot.e500 \
618qemu_vga.ndrv
619else
620BLOBS=
621endif
622
623install-doc: $(DOCS)
624	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
625	$(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)"
626	$(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)"
627	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
628	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
629ifdef CONFIG_POSIX
630	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
631	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
632	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
633	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
634	$(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
635ifneq ($(TOOLS),)
636	$(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1"
637	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
638	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
639endif
640ifneq (,$(findstring qemu-ga,$(TOOLS)))
641	$(INSTALL_DATA) qemu-ga.8 "$(DESTDIR)$(mandir)/man8"
642	$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)"
643	$(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)"
644	$(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7"
645endif
646endif
647ifdef CONFIG_VIRTFS
648	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
649	$(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
650endif
651
652install-datadir:
653	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
654
655install-localstatedir:
656ifdef CONFIG_POSIX
657ifneq (,$(findstring qemu-ga,$(TOOLS)))
658	$(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run
659endif
660endif
661
662
663install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir
664ifneq ($(TOOLS),)
665	$(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)$(bindir))
666endif
667ifneq ($(CONFIG_MODULES),)
668	$(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
669	for s in $(modules-m:.mo=$(DSOSUF)); do \
670		t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \
671		$(INSTALL_LIB) $$s "$$t"; \
672		test -z "$(STRIP)" || $(STRIP) "$$t"; \
673	done
674endif
675ifneq ($(HELPERS-y),)
676	$(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
677endif
678ifneq ($(BLOBS),)
679	set -e; for x in $(BLOBS); do \
680		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
681	done
682endif
683ifeq ($(CONFIG_GTK),y)
684	$(MAKE) -C po $@
685endif
686	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
687	set -e; for x in $(KEYMAPS); do \
688		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
689	done
690	$(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
691	for d in $(TARGET_DIRS); do \
692	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
693        done
694
695# various test targets
696test speed: all
697	$(MAKE) -C tests/tcg $@
698
699.PHONY: ctags
700ctags:
701	rm -f tags
702	find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
703
704.PHONY: TAGS
705TAGS:
706	rm -f TAGS
707	find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
708
709cscope:
710	rm -f "$(SRC_PATH)"/cscope.*
711	find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed 's,^\./,,' > "$(SRC_PATH)/cscope.files"
712	cscope -b -i"$(SRC_PATH)/cscope.files"
713
714# opengl shader programs
715ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert $(SRC_PATH)/scripts/shaderinclude.pl
716	@mkdir -p $(dir $@)
717	$(call quiet-command,\
718		perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
719		"VERT","$@")
720
721ui/shader/%-frag.h: $(SRC_PATH)/ui/shader/%.frag $(SRC_PATH)/scripts/shaderinclude.pl
722	@mkdir -p $(dir $@)
723	$(call quiet-command,\
724		perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
725		"FRAG","$@")
726
727ui/shader.o: $(SRC_PATH)/ui/shader.c \
728	ui/shader/texture-blit-vert.h \
729	ui/shader/texture-blit-flip-vert.h \
730	ui/shader/texture-blit-frag.h
731
732# documentation
733MAKEINFO=makeinfo
734MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D)
735MAKEINFOFLAGS=--no-split --number-sections $(MAKEINFOINCLUDES)
736TEXI2PODFLAGS=$(MAKEINFOINCLUDES) "-DVERSION=$(VERSION)"
737TEXI2PDFFLAGS=$(if $(V),,--quiet) -I $(SRC_PATH) $(MAKEINFOINCLUDES)
738
739docs/version.texi: $(SRC_PATH)/VERSION
740	$(call quiet-command,echo "@set VERSION $(VERSION)" > $@,"GEN","$@")
741
742%.html: %.texi docs/version.texi
743	$(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \
744	--html $< -o $@,"GEN","$@")
745
746%.info: %.texi docs/version.texi
747	$(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@")
748
749%.txt: %.texi docs/version.texi
750	$(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \
751	--plaintext $< -o $@,"GEN","$@")
752
753%.pdf: %.texi docs/version.texi
754	$(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@")
755
756qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
757	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
758
759qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
760	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
761
762qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool
763	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
764
765qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
766	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
767
768docs/interop/qemu-qmp-qapi.texi docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/scripts/qapi2texi.py $(qapi-py)
769
770docs/interop/qemu-qmp-qapi.texi: $(qapi-modules)
771	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py $< > $@,"GEN","$@")
772
773docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/qga/qapi-schema.json
774	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py $< > $@,"GEN","$@")
775
776qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi
777qemu.1: qemu-option-trace.texi
778qemu-img.1: qemu-img.texi qemu-option-trace.texi qemu-img-cmds.texi
779fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
780qemu-nbd.8: qemu-nbd.texi qemu-option-trace.texi
781qemu-ga.8: qemu-ga.texi
782docs/qemu-block-drivers.7: docs/qemu-block-drivers.texi
783
784html: qemu-doc.html docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
785info: qemu-doc.info docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
786pdf: qemu-doc.pdf docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
787txt: qemu-doc.txt docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
788
789qemu-doc.html qemu-doc.info qemu-doc.pdf qemu-doc.txt: \
790	qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-option-trace.texi \
791	qemu-monitor.texi qemu-img-cmds.texi qemu-ga.texi \
792	qemu-monitor-info.texi docs/qemu-block-drivers.texi
793
794docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \
795    docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \
796    docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7: \
797	docs/interop/qemu-ga-ref.texi docs/interop/qemu-ga-qapi.texi
798
799docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \
800    docs/interop/qemu-qmp-ref.info docs/interop/qemu-qmp-ref.pdf \
801    docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \
802	docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi
803
804
805ifdef CONFIG_WIN32
806
807INSTALLER = qemu-setup-$(VERSION)$(EXESUF)
808
809nsisflags = -V2 -NOCD
810
811ifneq ($(wildcard $(SRC_PATH)/dll),)
812ifeq ($(ARCH),x86_64)
813# 64 bit executables
814DLL_PATH = $(SRC_PATH)/dll/w64
815nsisflags += -DW64
816else
817# 32 bit executables
818DLL_PATH = $(SRC_PATH)/dll/w32
819endif
820endif
821
822.PHONY: installer
823installer: $(INSTALLER)
824
825INSTDIR=/tmp/qemu-nsis
826
827$(INSTALLER): $(SRC_PATH)/qemu.nsi
828	$(MAKE) install prefix=${INSTDIR}
829ifdef SIGNCODE
830	(cd ${INSTDIR}; \
831         for i in *.exe; do \
832           $(SIGNCODE) $${i}; \
833         done \
834        )
835endif # SIGNCODE
836	(cd ${INSTDIR}; \
837         for i in qemu-system-*.exe; do \
838           arch=$${i%.exe}; \
839           arch=$${arch#qemu-system-}; \
840           echo Section \"$$arch\" Section_$$arch; \
841           echo SetOutPath \"\$$INSTDIR\"; \
842           echo File \"\$${BINDIR}\\$$i\"; \
843           echo SectionEnd; \
844         done \
845        ) >${INSTDIR}/system-emulations.nsh
846	makensis $(nsisflags) \
847                $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \
848                $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \
849                -DBINDIR="${INSTDIR}" \
850                $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \
851                -DSRCDIR="$(SRC_PATH)" \
852                -DOUTFILE="$(INSTALLER)" \
853                -DDISPLAYVERSION="$(VERSION)" \
854                $(SRC_PATH)/qemu.nsi
855	rm -r ${INSTDIR}
856ifdef SIGNCODE
857	$(SIGNCODE) $(INSTALLER)
858endif # SIGNCODE
859endif # CONFIG_WIN
860
861# Add a dependency on the generated files, so that they are always
862# rebuilt before other object files
863ifneq ($(wildcard config-host.mak),)
864ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
865Makefile: $(GENERATED_FILES)
866endif
867endif
868
869.SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \
870	$(TRACE_SOURCES) $(TRACE_SOURCES:%=%-timestamp) \
871	$(TRACE_DTRACE) $(TRACE_DTRACE:%=%-timestamp)
872
873# Include automatically generated dependency files
874# Dependencies in Makefile.objs files come from our recursive subdir rules
875-include $(wildcard *.d tests/*.d)
876
877include $(SRC_PATH)/tests/docker/Makefile.include
878include $(SRC_PATH)/tests/vm/Makefile.include
879
880.PHONY: help
881help:
882	@echo  'Generic targets:'
883	@echo  '  all             - Build all'
884	@echo  '  dir/file.o      - Build specified target only'
885	@echo  '  install         - Install QEMU, documentation and tools'
886	@echo  '  ctags/TAGS      - Generate tags file for editors'
887	@echo  '  cscope          - Generate cscope index'
888	@echo  ''
889	@$(if $(TARGET_DIRS), \
890		echo 'Architecture specific targets:'; \
891		$(foreach t, $(TARGET_DIRS), \
892		printf "  %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \
893		echo '')
894	@echo  'Cleaning targets:'
895	@echo  '  clean           - Remove most generated files but keep the config'
896	@echo  '  distclean       - Remove all generated files'
897	@echo  '  dist            - Build a distributable tarball'
898	@echo  ''
899	@echo  'Test targets:'
900	@echo  '  check           - Run all tests (check-help for details)'
901	@echo  '  docker          - Help about targets running tests inside Docker containers'
902	@echo  '  vm-test         - Help about targets running tests inside VM'
903	@echo  ''
904	@echo  'Documentation targets:'
905	@echo  '  html info pdf txt'
906	@echo  '                  - Build documentation in specified format'
907	@echo  ''
908ifdef CONFIG_WIN32
909	@echo  'Windows targets:'
910	@echo  '  installer       - Build NSIS-based installer for QEMU'
911ifdef QEMU_GA_MSI_ENABLED
912	@echo  '  msi             - Build MSI-based installer for qemu-ga'
913endif
914	@echo  ''
915endif
916	@echo  '  make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
917