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