docs: Generate qemu.1 manpage with Sphinx
[qemu.git] / Makefile
1 # Makefile for QEMU.
2
3 ifneq ($(words $(subst :, ,$(CURDIR))), 1)
4 $(error main directory cannot contain spaces nor colons)
5 endif
6
7 # Always point to the root of the build tree (needs GNU make).
8 BUILD_DIR=$(CURDIR)
9
10 # Before including a proper config-host.mak, assume we are in the source tree
11 SRC_PATH=.
12
13 UNCHECKED_GOALS := %clean TAGS cscope ctags dist \
14 html info pdf txt \
15 help check-help print-% \
16 docker docker-% vm-help vm-test vm-build-%
17
18 print-%:
19 @echo '$*=$($*)'
20
21 # All following code might depend on configuration variables
22 ifneq ($(wildcard config-host.mak),)
23 # Put the all: rule here so that config-host.mak can contain dependencies.
24 all:
25 include config-host.mak
26
27 git-submodule-update:
28
29 .PHONY: git-submodule-update
30
31 git_module_status := $(shell \
32 cd '$(SRC_PATH)' && \
33 GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
34 echo $$?; \
35 )
36
37 ifeq (1,$(git_module_status))
38 ifeq (no,$(GIT_UPDATE))
39 git-submodule-update:
40 $(call quiet-command, \
41 echo && \
42 echo "GIT submodule checkout is out of date. Please run" && \
43 echo " scripts/git-submodule.sh update $(GIT_SUBMODULES)" && \
44 echo "from the source directory checkout $(SRC_PATH)" && \
45 echo && \
46 exit 1)
47 else
48 git-submodule-update:
49 $(call quiet-command, \
50 (cd $(SRC_PATH) && GIT="$(GIT)" ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
51 "GIT","$(GIT_SUBMODULES)")
52 endif
53 endif
54
55 .git-submodule-status: git-submodule-update config-host.mak
56
57 # Check that we're not trying to do an out-of-tree build from
58 # a tree that's been used for an in-tree build.
59 ifneq ($(realpath $(SRC_PATH)),$(realpath .))
60 ifneq ($(wildcard $(SRC_PATH)/config-host.mak),)
61 $(error This is an out of tree build but your source tree ($(SRC_PATH)) \
62 seems to have been used for an in-tree build. You can fix this by running \
63 "$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree)
64 endif
65 endif
66
67 CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y)
68 CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y)
69 CONFIG_XEN := $(CONFIG_XEN_BACKEND)
70 CONFIG_ALL=y
71 -include config-all-devices.mak
72 -include config-all-disas.mak
73
74 config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
75 @echo $@ is out-of-date, running configure
76 @./config.status
77
78 # Force configure to re-run if the API symbols are updated
79 ifeq ($(CONFIG_PLUGIN),y)
80 config-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols
81 endif
82
83 else
84 config-host.mak:
85 ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
86 @echo "Please call configure before running make!"
87 @exit 1
88 endif
89 endif
90
91 include $(SRC_PATH)/rules.mak
92
93 # lor is defined in rules.mak
94 CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
95
96 # Create QEMU_PKGVERSION and FULL_VERSION strings
97 # If PKGVERSION is set, use that; otherwise get version and -dirty status from git
98 QEMU_PKGVERSION := $(if $(PKGVERSION),$(PKGVERSION),$(shell \
99 cd $(SRC_PATH); \
100 if test -e .git; then \
101 git describe --match 'v*' 2>/dev/null | tr -d '\n'; \
102 if ! git diff-index --quiet HEAD &>/dev/null; then \
103 echo "-dirty"; \
104 fi; \
105 fi))
106
107 # Either "version (pkgversion)", or just "version" if pkgversion not set
108 FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSION))
109
110 generated-files-y = qemu-version.h config-host.h qemu-options.def
111
112 GENERATED_QAPI_FILES = qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c
113 GENERATED_QAPI_FILES += qapi/qapi-types.h qapi/qapi-types.c
114 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.h)
115 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.c)
116 GENERATED_QAPI_FILES += qapi/qapi-builtin-visit.h qapi/qapi-builtin-visit.c
117 GENERATED_QAPI_FILES += qapi/qapi-visit.h qapi/qapi-visit.c
118 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.h)
119 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.c)
120 GENERATED_QAPI_FILES += qapi/qapi-init-commands.h qapi/qapi-init-commands.c
121 GENERATED_QAPI_FILES += qapi/qapi-commands.h qapi/qapi-commands.c
122 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.h)
123 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.c)
124 GENERATED_QAPI_FILES += qapi/qapi-emit-events.h qapi/qapi-emit-events.c
125 GENERATED_QAPI_FILES += qapi/qapi-events.h qapi/qapi-events.c
126 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.h)
127 GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.c)
128 GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
129 GENERATED_QAPI_FILES += qapi/qapi-doc.texi
130
131 generated-files-y += $(GENERATED_QAPI_FILES)
132
133 generated-files-y += trace/generated-tcg-tracers.h
134
135 generated-files-y += trace/generated-helpers-wrappers.h
136 generated-files-y += trace/generated-helpers.h
137 generated-files-y += trace/generated-helpers.c
138
139 generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.h
140 generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.c
141
142 generated-files-y += module_block.h
143
144 TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
145 TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
146 TRACE_DTRACE =
147 ifdef CONFIG_TRACE_DTRACE
148 TRACE_HEADERS += trace-dtrace-root.h $(trace-events-subdirs:%=%/trace-dtrace.h)
149 TRACE_DTRACE += trace-dtrace-root.dtrace $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
150 endif
151 ifdef CONFIG_TRACE_UST
152 TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
153 endif
154
155 generated-files-y += $(TRACE_HEADERS)
156 generated-files-y += $(TRACE_SOURCES)
157 generated-files-y += $(BUILD_DIR)/trace-events-all
158 generated-files-y += .git-submodule-status
159
160 trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
161
162 tracetool-y = $(SRC_PATH)/scripts/tracetool.py
163 tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
164
165 %/trace.h: %/trace.h-timestamp
166 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
167 %/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
168 $(call quiet-command,$(TRACETOOL) \
169 --group=$(call trace-group-name,$@) \
170 --format=h \
171 --backends=$(TRACE_BACKENDS) \
172 $< > $@,"GEN","$(@:%-timestamp=%)")
173
174 %/trace.c: %/trace.c-timestamp
175 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
176 %/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
177 $(call quiet-command,$(TRACETOOL) \
178 --group=$(call trace-group-name,$@) \
179 --format=c \
180 --backends=$(TRACE_BACKENDS) \
181 $< > $@,"GEN","$(@:%-timestamp=%)")
182
183 %/trace-ust.h: %/trace-ust.h-timestamp
184 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
185 %/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
186 $(call quiet-command,$(TRACETOOL) \
187 --group=$(call trace-group-name,$@) \
188 --format=ust-events-h \
189 --backends=$(TRACE_BACKENDS) \
190 $< > $@,"GEN","$(@:%-timestamp=%)")
191
192 %/trace-dtrace.dtrace: %/trace-dtrace.dtrace-timestamp
193 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
194 %/trace-dtrace.dtrace-timestamp: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
195 $(call quiet-command,$(TRACETOOL) \
196 --group=$(call trace-group-name,$@) \
197 --format=d \
198 --backends=$(TRACE_BACKENDS) \
199 $< > $@,"GEN","$(@:%-timestamp=%)")
200
201 %/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y)
202 $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
203
204 %/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
205
206
207 trace-root.h: trace-root.h-timestamp
208 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
209 trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
210 $(call quiet-command,$(TRACETOOL) \
211 --group=root \
212 --format=h \
213 --backends=$(TRACE_BACKENDS) \
214 $< > $@,"GEN","$(@:%-timestamp=%)")
215
216 trace-root.c: trace-root.c-timestamp
217 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
218 trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
219 $(call quiet-command,$(TRACETOOL) \
220 --group=root \
221 --format=c \
222 --backends=$(TRACE_BACKENDS) \
223 $< > $@,"GEN","$(@:%-timestamp=%)")
224
225 trace-ust-root.h: trace-ust-root.h-timestamp
226 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
227 trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
228 $(call quiet-command,$(TRACETOOL) \
229 --group=root \
230 --format=ust-events-h \
231 --backends=$(TRACE_BACKENDS) \
232 $< > $@,"GEN","$(@:%-timestamp=%)")
233
234 trace-ust-all.h: trace-ust-all.h-timestamp
235 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
236 trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak
237 $(call quiet-command,$(TRACETOOL) \
238 --group=all \
239 --format=ust-events-h \
240 --backends=$(TRACE_BACKENDS) \
241 $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
242
243 trace-ust-all.c: trace-ust-all.c-timestamp
244 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
245 trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak
246 $(call quiet-command,$(TRACETOOL) \
247 --group=all \
248 --format=ust-events-c \
249 --backends=$(TRACE_BACKENDS) \
250 $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
251
252 trace-dtrace-root.dtrace: trace-dtrace-root.dtrace-timestamp
253 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
254 trace-dtrace-root.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
255 $(call quiet-command,$(TRACETOOL) \
256 --group=root \
257 --format=d \
258 --backends=$(TRACE_BACKENDS) \
259 $< > $@,"GEN","$(@:%-timestamp=%)")
260
261 trace-dtrace-root.h: trace-dtrace-root.dtrace
262 $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
263
264 trace-dtrace-root.o: trace-dtrace-root.dtrace
265
266 KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
267 KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
268
269 KEYCODEMAP_FILES = \
270 ui/input-keymap-atset1-to-qcode.c \
271 ui/input-keymap-linux-to-qcode.c \
272 ui/input-keymap-qcode-to-atset1.c \
273 ui/input-keymap-qcode-to-atset2.c \
274 ui/input-keymap-qcode-to-atset3.c \
275 ui/input-keymap-qcode-to-linux.c \
276 ui/input-keymap-qcode-to-qnum.c \
277 ui/input-keymap-qcode-to-sun.c \
278 ui/input-keymap-qnum-to-qcode.c \
279 ui/input-keymap-usb-to-qcode.c \
280 ui/input-keymap-win32-to-qcode.c \
281 ui/input-keymap-x11-to-qcode.c \
282 ui/input-keymap-xorgevdev-to-qcode.c \
283 ui/input-keymap-xorgkbd-to-qcode.c \
284 ui/input-keymap-xorgxquartz-to-qcode.c \
285 ui/input-keymap-xorgxwin-to-qcode.c \
286 ui/input-keymap-osx-to-qcode.c \
287 $(NULL)
288
289 generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
290
291 ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
292 $(call quiet-command,\
293 stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \
294 test -e $(KEYCODEMAP_GEN) && \
295 $(PYTHON) $(KEYCODEMAP_GEN) \
296 --lang glib2 \
297 --varname qemu_input_map_$${src}_to_$${dst} \
298 code-map $(KEYCODEMAP_CSV) $${src} $${dst} \
299 > $@ || rm -f $@, "GEN", "$@")
300
301 $(KEYCODEMAP_GEN): .git-submodule-status
302 $(KEYCODEMAP_CSV): .git-submodule-status
303
304 edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
305 pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2
306 $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
307
308 # Don't try to regenerate Makefile or configure
309 # We don't generate any of them
310 Makefile: ;
311 configure: ;
312
313 .PHONY: all clean cscope distclean html info install install-doc \
314 pdf txt recurse-all dist msi FORCE
315
316 $(call set-vpath, $(SRC_PATH))
317
318 LIBS+=-lz $(LIBS_TOOLS)
319
320 vhost-user-json-y =
321 HELPERS-y =
322
323 HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
324
325 ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
326 HELPERS-y += vhost-user-gpu$(EXESUF)
327 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
328 endif
329
330 ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
331 HELPERS-y += virtiofsd$(EXESUF)
332 vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
333 endif
334
335 # Sphinx does not allow building manuals into the same directory as
336 # the source files, so if we're doing an in-tree QEMU build we must
337 # build the manuals into a subdirectory (and then install them from
338 # there for 'make install'). For an out-of-tree build we can just
339 # use the docs/ subdirectory in the build tree as normal.
340 ifeq ($(realpath $(SRC_PATH)),$(realpath .))
341 MANUAL_BUILDDIR := docs/built
342 else
343 MANUAL_BUILDDIR := docs
344 endif
345
346 ifdef BUILD_DOCS
347 DOCS=qemu-doc.html qemu-doc.txt
348 DOCS+=$(MANUAL_BUILDDIR)/system/qemu.1
349 DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-img.1
350 DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-nbd.8
351 DOCS+=$(MANUAL_BUILDDIR)/interop/qemu-ga.8
352 ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
353 DOCS+=$(MANUAL_BUILDDIR)/tools/virtiofsd.1
354 endif
355 DOCS+=$(MANUAL_BUILDDIR)/system/qemu-block-drivers.7
356 DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
357 DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
358 DOCS+=$(MANUAL_BUILDDIR)/system/qemu-cpu-models.7
359 DOCS+=$(MANUAL_BUILDDIR)/index.html
360 ifdef CONFIG_VIRTFS
361 DOCS+=$(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1
362 endif
363 ifdef CONFIG_TRACE_SYSTEMTAP
364 DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-trace-stap.1
365 endif
366 else
367 DOCS=
368 endif
369
370 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
371 SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(filter %-softmmu, $(TARGET_DIRS)))
372 SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %.d, $(SUBDIR_DEVICES_MAK))
373
374 ifeq ($(SUBDIR_DEVICES_MAK),)
375 config-all-devices.mak: config-host.mak
376 $(call quiet-command,echo '# no devices' > $@,"GEN","$@")
377 else
378 config-all-devices.mak: $(SUBDIR_DEVICES_MAK) config-host.mak
379 $(call quiet-command, sed -n \
380 's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \
381 $(SUBDIR_DEVICES_MAK) | sort -u > $@, \
382 "GEN","$@")
383 endif
384
385 -include $(SUBDIR_DEVICES_MAK_DEP)
386
387 # This has to be kept in sync with Kconfig.host.
388 MINIKCONF_ARGS = \
389 $(CONFIG_MINIKCONF_MODE) \
390 $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
391 CONFIG_KVM=$(CONFIG_KVM) \
392 CONFIG_SPICE=$(CONFIG_SPICE) \
393 CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
394 CONFIG_TPM=$(CONFIG_TPM) \
395 CONFIG_XEN=$(CONFIG_XEN) \
396 CONFIG_OPENGL=$(CONFIG_OPENGL) \
397 CONFIG_X11=$(CONFIG_X11) \
398 CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
399 CONFIG_VHOST_KERNEL=$(CONFIG_VHOST_KERNEL) \
400 CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
401 CONFIG_LINUX=$(CONFIG_LINUX) \
402 CONFIG_PVRDMA=$(CONFIG_PVRDMA)
403
404 MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
405 MINIKCONF_DEPS = $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig)
406 MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
407
408 $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_DEPS) $(BUILD_DIR)/config-host.mak
409 $(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
410 $(call quiet-command, if test -f $@; then \
411 if cmp -s $@.old $@; then \
412 mv $@.tmp $@; \
413 cp -p $@ $@.old; \
414 else \
415 if test -f $@.old; then \
416 echo "WARNING: $@ (user modified) out of date.";\
417 else \
418 echo "WARNING: $@ out of date.";\
419 fi; \
420 echo "Run \"$(MAKE) defconfig\" to regenerate."; \
421 rm $@.tmp; \
422 fi; \
423 else \
424 mv $@.tmp $@; \
425 cp -p $@ $@.old; \
426 fi,"GEN","$@");
427
428 defconfig:
429 rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
430
431 ifneq ($(wildcard config-host.mak),)
432 include $(SRC_PATH)/Makefile.objs
433 endif
434
435 dummy := $(call unnest-vars,, \
436 stub-obj-y \
437 authz-obj-y \
438 chardev-obj-y \
439 util-obj-y \
440 qga-obj-y \
441 elf2dmp-obj-y \
442 ivshmem-client-obj-y \
443 ivshmem-server-obj-y \
444 virtiofsd-obj-y \
445 rdmacm-mux-obj-y \
446 libvhost-user-obj-y \
447 vhost-user-scsi-obj-y \
448 vhost-user-blk-obj-y \
449 vhost-user-input-obj-y \
450 vhost-user-gpu-obj-y \
451 qga-vss-dll-obj-y \
452 block-obj-y \
453 block-obj-m \
454 crypto-obj-y \
455 qom-obj-y \
456 io-obj-y \
457 common-obj-y \
458 common-obj-m \
459 trace-obj-y)
460
461 include $(SRC_PATH)/tests/Makefile.include
462
463 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)
464
465 qemu-version.h: FORCE
466 $(call quiet-command, \
467 (printf '#define QEMU_PKGVERSION "$(QEMU_PKGVERSION)"\n'; \
468 printf '#define QEMU_FULL_VERSION "$(FULL_VERSION)"\n'; \
469 ) > $@.tmp)
470 $(call quiet-command, if ! cmp -s $@ $@.tmp; then \
471 mv $@.tmp $@; \
472 else \
473 rm $@.tmp; \
474 fi)
475
476 config-host.h: config-host.h-timestamp
477 config-host.h-timestamp: config-host.mak
478 qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
479 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
480
481 TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
482
483 SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES))
484 $(SOFTMMU_ALL_RULES): $(authz-obj-y)
485 $(SOFTMMU_ALL_RULES): $(block-obj-y)
486 $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
487 $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
488 $(SOFTMMU_ALL_RULES): $(io-obj-y)
489 $(SOFTMMU_ALL_RULES): config-all-devices.mak
490 ifdef DECOMPRESS_EDK2_BLOBS
491 $(SOFTMMU_ALL_RULES): $(edk2-decompressed)
492 endif
493
494 SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES))
495 $(SOFTMMU_FUZZ_RULES): $(authz-obj-y)
496 $(SOFTMMU_FUZZ_RULES): $(block-obj-y)
497 $(SOFTMMU_FUZZ_RULES): $(chardev-obj-y)
498 $(SOFTMMU_FUZZ_RULES): $(crypto-obj-y)
499 $(SOFTMMU_FUZZ_RULES): $(io-obj-y)
500 $(SOFTMMU_FUZZ_RULES): config-all-devices.mak
501 $(SOFTMMU_FUZZ_RULES): $(edk2-decompressed)
502
503 .PHONY: $(TARGET_DIRS_RULES)
504 # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
505 # $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal
506 $(TARGET_DIRS_RULES):
507 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
508
509 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
510 DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
511 DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
512
513 .PHONY: dtc/all
514 dtc/all: .git-submodule-status dtc/libfdt dtc/tests
515 $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
516
517 dtc/%: .git-submodule-status
518 @mkdir -p $@
519
520 # Overriding CFLAGS causes us to lose defines added in the sub-makefile.
521 # Not overriding CFLAGS leads to mis-matches between compilation modes.
522 # Therefore we replicate some of the logic in the sub-makefile.
523 # Remove all the extra -Warning flags that QEMU uses that Capstone doesn't;
524 # no need to annoy QEMU developers with such things.
525 CAP_CFLAGS = $(patsubst -W%,,$(CFLAGS) $(QEMU_CFLAGS))
526 CAP_CFLAGS += -DCAPSTONE_USE_SYS_DYN_MEM
527 CAP_CFLAGS += -DCAPSTONE_HAS_ARM
528 CAP_CFLAGS += -DCAPSTONE_HAS_ARM64
529 CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
530 CAP_CFLAGS += -DCAPSTONE_HAS_X86
531
532 .PHONY: capstone/all
533 capstone/all: .git-submodule-status
534 $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
535
536 .PHONY: slirp/all
537 slirp/all: .git-submodule-status
538 $(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp \
539 BUILD_DIR="$(BUILD_DIR)/slirp" \
540 PKG_CONFIG="$(PKG_CONFIG)" \
541 CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" \
542 CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)")
543
544 # Compatibility gunk to keep make working across the rename of targets
545 # for recursion, to be removed some time after 4.1.
546 subdir-dtc: dtc/all
547 subdir-capstone: capstone/all
548 subdir-slirp: slirp/all
549
550 $(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
551 $(qom-obj-y)
552
553 $(filter %/fuzz, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
554 $(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY))
555
556 ROM_DIRS = $(addprefix pc-bios/, $(ROMS))
557 ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
558 # Only keep -O and -g cflags
559 .PHONY: $(ROM_DIRS_RULES)
560 $(ROM_DIRS_RULES):
561 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),)
562
563 .PHONY: recurse-all recurse-clean recurse-install
564 recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS))
565 recurse-fuzz: $(addsuffix /fuzz, $(TARGET_DIRS) $(ROM_DIRS))
566 recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS))
567 recurse-install: $(addsuffix /install, $(TARGET_DIRS))
568 $(addsuffix /install, $(TARGET_DIRS)): all
569
570 $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h
571 $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"RC","version.o")
572
573 Makefile: $(version-obj-y)
574
575 ######################################################################
576 # Build libraries
577
578 libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y)
579 libvhost-user.a: $(libvhost-user-obj-y) $(util-obj-y) $(stub-obj-y)
580
581 ######################################################################
582
583 COMMON_LDADDS = libqemuutil.a
584
585 qemu-img.o: qemu-img-cmds.h
586
587 qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
588 qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
589 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
590
591 qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
592
593 qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
594
595 qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS)
596
597 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
598
599 scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
600 ifdef CONFIG_MPATH
601 scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
602 endif
603
604 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
605 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
606
607 qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
608 qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
609
610 qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
611 qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
612
613 qapi-py = $(SRC_PATH)/scripts/qapi/__init__.py \
614 $(SRC_PATH)/scripts/qapi/commands.py \
615 $(SRC_PATH)/scripts/qapi/common.py \
616 $(SRC_PATH)/scripts/qapi/doc.py \
617 $(SRC_PATH)/scripts/qapi/error.py \
618 $(SRC_PATH)/scripts/qapi/events.py \
619 $(SRC_PATH)/scripts/qapi/expr.py \
620 $(SRC_PATH)/scripts/qapi/gen.py \
621 $(SRC_PATH)/scripts/qapi/introspect.py \
622 $(SRC_PATH)/scripts/qapi/parser.py \
623 $(SRC_PATH)/scripts/qapi/schema.py \
624 $(SRC_PATH)/scripts/qapi/source.py \
625 $(SRC_PATH)/scripts/qapi/types.py \
626 $(SRC_PATH)/scripts/qapi/visit.py \
627 $(SRC_PATH)/scripts/qapi-gen.py
628
629 qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h \
630 qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h \
631 qga/qapi-generated/qga-qapi-commands.h qga/qapi-generated/qga-qapi-commands.c \
632 qga/qapi-generated/qga-qapi-init-commands.h qga/qapi-generated/qga-qapi-init-commands.c \
633 qga/qapi-generated/qga-qapi-doc.texi: \
634 qga/qapi-generated/qapi-gen-timestamp ;
635 qga/qapi-generated/qapi-gen-timestamp: $(SRC_PATH)/qga/qapi-schema.json $(qapi-py)
636 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
637 -o qga/qapi-generated -p "qga-" $<, \
638 "GEN","$(@:%-timestamp=%)")
639 @>$@
640
641 qapi-modules = $(SRC_PATH)/qapi/qapi-schema.json \
642 $(QAPI_MODULES:%=$(SRC_PATH)/qapi/%.json)
643
644 $(GENERATED_QAPI_FILES): qapi-gen-timestamp ;
645 qapi-gen-timestamp: $(qapi-modules) $(qapi-py)
646 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
647 -o "qapi" -b $<, \
648 "GEN","$(@:%-timestamp=%)")
649 @>$@
650
651 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qapi-commands.h qga-qapi-init-commands.h)
652 $(qga-obj-y): $(QGALIB_GEN)
653
654 qemu-ga$(EXESUF): $(qga-obj-y) $(COMMON_LDADDS)
655 $(call LINK, $^)
656
657 ifdef QEMU_GA_MSI_ENABLED
658 QEMU_GA_MSI=qemu-ga-$(ARCH).msi
659
660 msi: $(QEMU_GA_MSI)
661
662 $(QEMU_GA_MSI): qemu-ga.exe $(QGA_VSS_PROVIDER)
663
664 $(QEMU_GA_MSI): config-host.mak
665
666 $(QEMU_GA_MSI): $(SRC_PATH)/qga/installer/qemu-ga.wxs
667 $(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)" \
668 wixl -o $@ $(QEMU_GA_MSI_ARCH) $(QEMU_GA_MSI_WITH_VSS) $(QEMU_GA_MSI_MINGW_DLL_PATH) $<,"WIXL","$@")
669 else
670 msi:
671 @echo "MSI build not configured or dependency resolution failed (reconfigure with --enable-guest-agent-msi option)"
672 endif
673
674 ifneq ($(EXESUF),)
675 .PHONY: qemu-ga
676 qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
677 endif
678
679 elf2dmp$(EXESUF): $(elf2dmp-obj-y)
680 $(call LINK, $^)
681
682 ifdef CONFIG_IVSHMEM
683 ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
684 $(call LINK, $^)
685 ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
686 $(call LINK, $^)
687 endif
688 vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a
689 $(call LINK, $^)
690 vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a
691 $(call LINK, $^)
692
693 rdmacm-mux$(EXESUF): LIBS += "-libumad"
694 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
695 $(call LINK, $^)
696
697 # relies on Linux-specific syscalls
698 ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
699 virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS)
700 $(call LINK, $^)
701 endif
702
703 vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) libqemuutil.a libqemustub.a
704 $(call LINK, $^)
705
706 ifdef CONFIG_VHOST_USER_INPUT
707 ifdef CONFIG_LINUX
708 vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a libqemuutil.a
709 $(call LINK, $^)
710
711 # build by default, do not install
712 all: vhost-user-input$(EXESUF)
713 endif
714 endif
715
716 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
717 $(call quiet-command,$(PYTHON) $< $@ \
718 $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
719 "GEN","$@")
720
721 ifdef CONFIG_GCOV
722 .PHONY: clean-coverage
723 clean-coverage:
724 $(call quiet-command, \
725 find . \( -name '*.gcda' -o -name '*.gcov' \) -type f -exec rm {} +, \
726 "CLEAN", "coverage files")
727 endif
728
729 clean: recurse-clean
730 # avoid old build problems by removing potentially incorrect old files
731 rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
732 rm -f qemu-options.def
733 rm -f *.msi
734 find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \
735 ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
736 ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
737 ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \
738 -exec rm {} +
739 rm -f $(edk2-decompressed)
740 rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~
741 rm -f fsdev/*.pod scsi/*.pod
742 rm -f qemu-img-cmds.h
743 rm -f ui/shader/*-vert.h ui/shader/*-frag.h
744 @# May not be present in generated-files-y
745 rm -f trace/generated-tracers-dtrace.dtrace*
746 rm -f trace/generated-tracers-dtrace.h*
747 rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
748 rm -f qapi-gen-timestamp
749 rm -rf qga/qapi-generated
750 rm -f config-all-devices.mak
751
752 VERSION ?= $(shell cat VERSION)
753
754 dist: qemu-$(VERSION).tar.bz2
755
756 qemu-%.tar.bz2:
757 $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
758
759 define clean-manual =
760 rm -rf $(MANUAL_BUILDDIR)/$1/_static
761 rm -f $(MANUAL_BUILDDIR)/$1/objects.inv $(MANUAL_BUILDDIR)/$1/searchindex.js $(MANUAL_BUILDDIR)/$1/*.html
762 endef
763
764 distclean: clean
765 rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi
766 rm -f tests/tcg/config-*.mak
767 rm -f config-all-devices.mak config-all-disas.mak config.status
768 rm -f $(SUBDIR_DEVICES_MAK)
769 rm -f po/*.mo tests/qemu-iotests/common.env
770 rm -f roms/seabios/config.mak roms/vgabios/config.mak
771 rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps
772 rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
773 rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp
774 rm -f qemu-doc.vr qemu-doc.txt
775 rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
776 rm -f config.log
777 rm -f linux-headers/asm
778 rm -f docs/version.texi
779 rm -f docs/interop/qemu-ga-qapi.texi docs/interop/qemu-qmp-qapi.texi
780 rm -f docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7
781 rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
782 rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
783 rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
784 rm -rf .doctrees
785 $(call clean-manual,devel)
786 $(call clean-manual,interop)
787 $(call clean-manual,specs)
788 $(call clean-manual,system)
789 $(call clean-manual,tools)
790 $(call clean-manual,user)
791 for d in $(TARGET_DIRS); do \
792 rm -rf $$d || exit 1 ; \
793 done
794 rm -Rf .sdk
795 if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi
796
797 KEYMAPS=da en-gb et fr fr-ch is lt no pt-br sv \
798 ar de en-us fi fr-be hr it lv nl pl ru th \
799 de-ch es fo fr-ca hu ja mk pt sl tr \
800 bepo cz
801
802 ifdef INSTALL_BLOBS
803 BLOBS=bios.bin bios-256k.bin bios-microvm.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
804 vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \
805 vgabios-ramfb.bin vgabios-bochs-display.bin vgabios-ati.bin \
806 openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \
807 pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
808 pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
809 efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \
810 efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
811 efi-e1000e.rom efi-vmxnet3.rom \
812 qemu-nsis.bmp \
813 bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
814 multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin \
815 s390-ccw.img s390-netboot.img \
816 slof.bin skiboot.lid \
817 palcode-clipper \
818 u-boot.e500 u-boot-sam460-20100605.bin \
819 qemu_vga.ndrv \
820 edk2-licenses.txt \
821 hppa-firmware.img \
822 opensbi-riscv32-virt-fw_jump.bin \
823 opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin
824
825
826 DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \
827 60-edk2-aarch64.json 60-edk2-arm.json 60-edk2-i386.json 60-edk2-x86_64.json
828 else
829 BLOBS=
830 DESCS=
831 endif
832
833 # Note that we manually filter-out the non-Sphinx documentation which
834 # is currently built into the docs/interop directory in the build tree,
835 # and also any sphinx-built manpages.
836 define install-manual =
837 for d in $$(cd $(MANUAL_BUILDDIR) && find $1 -type d); do $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/$$d"; done
838 for f in $$(cd $(MANUAL_BUILDDIR) && find $1 -type f -a '!' '(' -name '*.[0-9]' -o -name 'qemu-*-qapi.*' -o -name 'qemu-*-ref.*' ')' ); do $(INSTALL_DATA) "$(MANUAL_BUILDDIR)/$$f" "$(DESTDIR)$(qemu_docdir)/$$f"; done
839 endef
840
841 # Note that we deliberately do not install the "devel" manual: it is
842 # for QEMU developers, and not interesting to our users.
843 .PHONY: install-sphinxdocs
844 install-sphinxdocs: sphinxdocs
845 $(call install-manual,interop)
846 $(call install-manual,specs)
847 $(call install-manual,system)
848 $(call install-manual,tools)
849 $(call install-manual,user)
850
851 install-doc: $(DOCS) install-sphinxdocs
852 $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
853 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)"
854 $(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)"
855 $(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)"
856 $(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
857 $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
858 ifdef CONFIG_POSIX
859 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
860 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu.1 "$(DESTDIR)$(mandir)/man1"
861 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
862 $(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
863 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
864 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu-cpu-models.7 "$(DESTDIR)$(mandir)/man7"
865 ifeq ($(CONFIG_TOOLS),y)
866 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-img.1 "$(DESTDIR)$(mandir)/man1"
867 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
868 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
869 endif
870 ifdef CONFIG_TRACE_SYSTEMTAP
871 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-trace-stap.1 "$(DESTDIR)$(mandir)/man1"
872 endif
873 ifneq (,$(findstring qemu-ga,$(TOOLS)))
874 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/interop/qemu-ga.8 "$(DESTDIR)$(mandir)/man8"
875 $(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)"
876 $(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)"
877 $(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7"
878 endif
879 endif
880 ifdef CONFIG_VIRTFS
881 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
882 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
883 endif
884 ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
885 $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtiofsd.1 "$(DESTDIR)$(mandir)/man1"
886 endif
887
888 install-datadir:
889 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
890
891 install-localstatedir:
892 ifdef CONFIG_POSIX
893 ifneq (,$(findstring qemu-ga,$(TOOLS)))
894 $(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run
895 endif
896 endif
897
898 ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
899
900 install-includedir:
901 $(INSTALL_DIR) "$(DESTDIR)$(includedir)"
902
903 install: all $(if $(BUILD_DOCS),install-doc) \
904 install-datadir install-localstatedir install-includedir \
905 $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
906 recurse-install
907 ifneq ($(TOOLS),)
908 $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
909 endif
910 ifneq ($(CONFIG_MODULES),)
911 $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
912 for s in $(modules-m:.mo=$(DSOSUF)); do \
913 t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \
914 $(INSTALL_LIB) $$s "$$t"; \
915 test -z "$(STRIP)" || $(STRIP) "$$t"; \
916 done
917 endif
918 ifneq ($(HELPERS-y),)
919 $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
920 endif
921 ifneq ($(vhost-user-json-y),)
922 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/vhost-user/"
923 for x in $(vhost-user-json-y); do \
924 $(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)/vhost-user/"; \
925 done
926 endif
927 ifdef CONFIG_TRACE_SYSTEMTAP
928 $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
929 endif
930 ifneq ($(BLOBS),)
931 set -e; for x in $(BLOBS); do \
932 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
933 done
934 endif
935 ifdef INSTALL_BLOBS
936 set -e; for x in $(edk2-decompressed); do \
937 $(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)"; \
938 done
939 endif
940 ifneq ($(DESCS),)
941 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
942 set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
943 for x in $(DESCS); do \
944 sed -e 's,@DATADIR@,$(qemu_datadir),' \
945 "$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \
946 $(INSTALL_DATA) "$$tmpf" \
947 "$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \
948 done
949 endif
950 for s in $(ICON_SIZES); do \
951 mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \
952 $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \
953 "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps/qemu.png"; \
954 done; \
955 mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps"; \
956 $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_32x32.bmp \
957 "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps/qemu.bmp"; \
958 mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps"; \
959 $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu.svg \
960 "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps/qemu.svg"
961 mkdir -p "$(DESTDIR)$(qemu_desktopdir)"
962 $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \
963 "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop"
964 ifdef CONFIG_GTK
965 $(MAKE) -C po $@
966 endif
967 ifeq ($(CONFIG_PLUGIN),y)
968 $(INSTALL_DATA) $(SRC_PATH)/include/qemu/qemu-plugin.h "$(DESTDIR)$(includedir)/qemu-plugin.h"
969 endif
970 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
971 set -e; for x in $(KEYMAPS); do \
972 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
973 done
974 $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
975
976 .PHONY: ctags
977 ctags:
978 rm -f tags
979 find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
980
981 .PHONY: TAGS
982 TAGS:
983 rm -f TAGS
984 find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
985
986 cscope:
987 rm -f "$(SRC_PATH)"/cscope.*
988 find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed 's,^\./,,' > "$(SRC_PATH)/cscope.files"
989 cscope -b -i"$(SRC_PATH)/cscope.files"
990
991 # opengl shader programs
992 ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert $(SRC_PATH)/scripts/shaderinclude.pl
993 @mkdir -p $(dir $@)
994 $(call quiet-command,\
995 perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
996 "VERT","$@")
997
998 ui/shader/%-frag.h: $(SRC_PATH)/ui/shader/%.frag $(SRC_PATH)/scripts/shaderinclude.pl
999 @mkdir -p $(dir $@)
1000 $(call quiet-command,\
1001 perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
1002 "FRAG","$@")
1003
1004 ui/shader.o: $(SRC_PATH)/ui/shader.c \
1005 ui/shader/texture-blit-vert.h \
1006 ui/shader/texture-blit-flip-vert.h \
1007 ui/shader/texture-blit-frag.h
1008
1009 # documentation
1010 MAKEINFO=makeinfo
1011 MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D)
1012 MAKEINFOFLAGS=--no-split --number-sections $(MAKEINFOINCLUDES)
1013 TEXI2PODFLAGS=$(MAKEINFOINCLUDES) -DVERSION="$(VERSION)" -DCONFDIR="$(qemu_confdir)"
1014 TEXI2PDFFLAGS=$(if $(V),,--quiet) -I $(SRC_PATH) $(MAKEINFOINCLUDES)
1015
1016 docs/version.texi: $(SRC_PATH)/VERSION config-host.mak
1017 $(call quiet-command,(\
1018 echo "@set VERSION $(VERSION)" && \
1019 echo "@set CONFDIR $(qemu_confdir)" \
1020 )> $@,"GEN","$@")
1021
1022 %.html: %.texi docs/version.texi
1023 $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \
1024 --html $< -o $@,"GEN","$@")
1025
1026 %.info: %.texi docs/version.texi
1027 $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@")
1028
1029 %.txt: %.texi docs/version.texi
1030 $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \
1031 --plaintext $< -o $@,"GEN","$@")
1032
1033 %.pdf: %.texi docs/version.texi
1034 $(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@")
1035
1036 # Sphinx builds all its documentation at once in one invocation
1037 # and handles "don't rebuild things unless necessary" itself.
1038 # The '.doctrees' files are cached information to speed this up.
1039 .PHONY: sphinxdocs
1040 sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
1041 $(MANUAL_BUILDDIR)/interop/index.html \
1042 $(MANUAL_BUILDDIR)/specs/index.html \
1043 $(MANUAL_BUILDDIR)/system/index.html \
1044 $(MANUAL_BUILDDIR)/tools/index.html \
1045 $(MANUAL_BUILDDIR)/user/index.html
1046
1047 # Canned command to build a single manual
1048 # Arguments: $1 = manual name, $2 = Sphinx builder ('html' or 'man')
1049 # Note the use of different doctree for each (manual, builder) tuple;
1050 # this works around Sphinx not handling parallel invocation on
1051 # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946
1052 build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
1053 # We assume all RST files in the manual's directory are used in it
1054 manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) \
1055 $(SRC_PATH)/docs/defs.rst.inc \
1056 $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py
1057 # Macro to write out the rule and dependencies for building manpages
1058 # Usage: $(call define-manpage-rule,manualname,manpage1 manpage2...[,extradeps])
1059 # 'extradeps' is optional, and specifies extra files (eg .hx files) that
1060 # the manual page depends on.
1061 define define-manpage-rule
1062 $(call atomic,$(foreach manpage,$2,$(MANUAL_BUILDDIR)/$1/$(manpage)),$(call manual-deps,$1) $3)
1063 $(call build-manual,$1,man)
1064 endef
1065
1066 $(MANUAL_BUILDDIR)/devel/index.html: $(call manual-deps,devel)
1067 $(call build-manual,devel,html)
1068
1069 $(MANUAL_BUILDDIR)/interop/index.html: $(call manual-deps,interop)
1070 $(call build-manual,interop,html)
1071
1072 $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs)
1073 $(call build-manual,specs,html)
1074
1075 $(MANUAL_BUILDDIR)/system/index.html: $(call manual-deps,system) $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/qemu-options.hx
1076 $(call build-manual,system,html)
1077
1078 $(MANUAL_BUILDDIR)/tools/index.html: $(call manual-deps,tools) $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/docs/qemu-option-trace.rst.inc
1079 $(call build-manual,tools,html)
1080
1081 $(MANUAL_BUILDDIR)/user/index.html: $(call manual-deps,user)
1082 $(call build-manual,user,html)
1083
1084 $(call define-manpage-rule,interop,qemu-ga.8)
1085
1086 $(call define-manpage-rule,system,qemu.1 qemu-block-drivers.7 qemu-cpu-models.7)
1087
1088 $(call define-manpage-rule,tools,\
1089 qemu-img.1 qemu-nbd.8 qemu-trace-stap.1\
1090 virtiofsd.1 virtfs-proxy-helper.1,\
1091 $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/docs/qemu-option-trace.rst.inc)
1092
1093 $(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h
1094 @mkdir -p "$(MANUAL_BUILDDIR)"
1095 $(call quiet-command, sed "s|@@VERSION@@|${VERSION}|g" $< >$@, \
1096 "GEN","$@")
1097
1098 qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
1099 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
1100
1101 qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
1102 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
1103
1104 qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool
1105 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
1106
1107 docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi
1108 @cp -p $< $@
1109
1110 docs/interop/qemu-ga-qapi.texi: qga/qapi-generated/qga-qapi-doc.texi
1111 @cp -p $< $@
1112
1113 html: qemu-doc.html docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs
1114 info: qemu-doc.info docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
1115 pdf: qemu-doc.pdf docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
1116 txt: qemu-doc.txt docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
1117
1118 qemu-doc.html qemu-doc.info qemu-doc.pdf qemu-doc.txt: \
1119 qemu-options.texi \
1120 qemu-monitor.texi \
1121 qemu-monitor-info.texi \
1122 docs/system/quickstart.texi \
1123 docs/system/invocation.texi \
1124 docs/system/keys.texi \
1125 docs/system/mux-chardev.texi \
1126 docs/system/monitor.texi \
1127 docs/system/cpu-models-x86.texi \
1128 docs/system/images.texi \
1129 docs/system/net.texi \
1130 docs/system/usb.texi \
1131 docs/system/ivshmem.texi \
1132 docs/system/linuxboot.texi \
1133 docs/system/vnc-security.texi \
1134 docs/system/tls.texi \
1135 docs/system/gdb.texi \
1136 docs/system/build-platforms.texi \
1137 docs/system/license.texi \
1138 docs/system/cpu-models-x86.texi docs/system/cpu-models-mips.texi \
1139 docs/system/deprecated.texi docs/system/qemu-option-trace.texi \
1140 docs/system/security.texi
1141
1142 docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \
1143 docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \
1144 docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7: \
1145 docs/interop/qemu-ga-ref.texi docs/interop/qemu-ga-qapi.texi
1146
1147 docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \
1148 docs/interop/qemu-qmp-ref.info docs/interop/qemu-qmp-ref.pdf \
1149 docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \
1150 docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi
1151
1152 $(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl
1153
1154 # Reports/Analysis
1155
1156 %/coverage-report.html:
1157 @mkdir -p $*
1158 $(call quiet-command,\
1159 gcovr -r $(SRC_PATH) \
1160 $(foreach t, $(TARGET_DIRS), --object-directory $(BUILD_DIR)/$(t)) \
1161 --object-directory $(BUILD_DIR) \
1162 -p --html --html-details -o $@, \
1163 "GEN", "coverage-report.html")
1164
1165 .PHONY: coverage-report
1166 coverage-report: $(CURDIR)/reports/coverage/coverage-report.html
1167
1168 ifdef CONFIG_WIN32
1169
1170 INSTALLER = qemu-setup-$(VERSION)$(EXESUF)
1171
1172 nsisflags = -V2 -NOCD
1173
1174 ifneq ($(wildcard $(SRC_PATH)/dll),)
1175 ifeq ($(ARCH),x86_64)
1176 # 64 bit executables
1177 DLL_PATH = $(SRC_PATH)/dll/w64
1178 nsisflags += -DW64
1179 else
1180 # 32 bit executables
1181 DLL_PATH = $(SRC_PATH)/dll/w32
1182 endif
1183 endif
1184
1185 .PHONY: installer
1186 installer: $(INSTALLER)
1187
1188 INSTDIR=/tmp/qemu-nsis
1189
1190 $(INSTALLER): install-doc $(SRC_PATH)/qemu.nsi
1191 $(MAKE) install prefix=${INSTDIR}
1192 ifdef SIGNCODE
1193 (cd ${INSTDIR}; \
1194 for i in *.exe; do \
1195 $(SIGNCODE) $${i}; \
1196 done \
1197 )
1198 endif # SIGNCODE
1199 (cd ${INSTDIR}; \
1200 for i in qemu-system-*.exe; do \
1201 arch=$${i%.exe}; \
1202 arch=$${arch#qemu-system-}; \
1203 echo Section \"$$arch\" Section_$$arch; \
1204 echo SetOutPath \"\$$INSTDIR\"; \
1205 echo File \"\$${BINDIR}\\$$i\"; \
1206 echo SectionEnd; \
1207 done \
1208 ) >${INSTDIR}/system-emulations.nsh
1209 makensis $(nsisflags) \
1210 $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \
1211 $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \
1212 -DBINDIR="${INSTDIR}" \
1213 $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \
1214 -DSRCDIR="$(SRC_PATH)" \
1215 -DOUTFILE="$(INSTALLER)" \
1216 -DDISPLAYVERSION="$(VERSION)" \
1217 $(SRC_PATH)/qemu.nsi
1218 rm -r ${INSTDIR}
1219 ifdef SIGNCODE
1220 $(SIGNCODE) $(INSTALLER)
1221 endif # SIGNCODE
1222 endif # CONFIG_WIN
1223
1224 # Add a dependency on the generated files, so that they are always
1225 # rebuilt before other object files
1226 ifneq ($(wildcard config-host.mak),)
1227 ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
1228 Makefile: $(generated-files-y)
1229 endif
1230 endif
1231
1232 .SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \
1233 $(TRACE_SOURCES) $(TRACE_SOURCES:%=%-timestamp) \
1234 $(TRACE_DTRACE) $(TRACE_DTRACE:%=%-timestamp)
1235
1236 # Include automatically generated dependency files
1237 # Dependencies in Makefile.objs files come from our recursive subdir rules
1238 -include $(wildcard *.d tests/*.d)
1239
1240 include $(SRC_PATH)/tests/docker/Makefile.include
1241 include $(SRC_PATH)/tests/vm/Makefile.include
1242
1243 .PHONY: help
1244 help:
1245 @echo 'Generic targets:'
1246 @echo ' all - Build all'
1247 ifdef CONFIG_MODULES
1248 @echo ' modules - Build all modules'
1249 endif
1250 @echo ' dir/file.o - Build specified target only'
1251 @echo ' install - Install QEMU, documentation and tools'
1252 @echo ' ctags/TAGS - Generate tags file for editors'
1253 @echo ' cscope - Generate cscope index'
1254 @echo ''
1255 @$(if $(TARGET_DIRS), \
1256 echo 'Architecture specific targets:'; \
1257 $(foreach t, $(TARGET_DIRS), \
1258 printf " %-30s - Build for %s\\n" $(t)/all $(t);) \
1259 echo '')
1260 @echo 'Cleaning targets:'
1261 @echo ' clean - Remove most generated files but keep the config'
1262 ifdef CONFIG_GCOV
1263 @echo ' clean-coverage - Remove coverage files'
1264 endif
1265 @echo ' distclean - Remove all generated files'
1266 @echo ' dist - Build a distributable tarball'
1267 @echo ''
1268 @echo 'Test targets:'
1269 @echo ' check - Run all tests (check-help for details)'
1270 @echo ' docker - Help about targets running tests inside containers'
1271 @echo ' vm-help - Help about targets running tests inside VM'
1272 @echo ''
1273 @echo 'Documentation targets:'
1274 @echo ' html info pdf txt'
1275 @echo ' - Build documentation in specified format'
1276 ifdef CONFIG_GCOV
1277 @echo ' coverage-report - Create code coverage report'
1278 endif
1279 @echo ''
1280 ifdef CONFIG_WIN32
1281 @echo 'Windows targets:'
1282 @echo ' installer - Build NSIS-based installer for QEMU'
1283 ifdef QEMU_GA_MSI_ENABLED
1284 @echo ' msi - Build MSI-based installer for qemu-ga'
1285 endif
1286 @echo ''
1287 endif
1288 @echo ' $(MAKE) [targets] (quiet build, default)'
1289 @echo ' $(MAKE) V=1 [targets] (verbose build)'