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