]>
Commit | Line | Data |
---|---|---|
0cb3fb1e PB |
1 | # Makefile for QEMU. |
2 | ||
4ace32e2 AO |
3 | ifneq ($(words $(subst :, ,$(CURDIR))), 1) |
4 | $(error main directory cannot contain spaces nor colons) | |
5 | endif | |
6 | ||
519e1693 SW |
7 | # Always point to the root of the build tree (needs GNU make). |
8 | BUILD_DIR=$(CURDIR) | |
388d4758 | 9 | |
eaa2ddbb FZ |
10 | # Before including a proper config-host.mak, assume we are in the source tree |
11 | SRC_PATH=. | |
12 | ||
28fa2927 PMD |
13 | UNCHECKED_GOALS := %clean TAGS cscope ctags dist \ |
14 | html info pdf txt \ | |
de1da442 | 15 | help check-help print-% \ |
4f2f6276 | 16 | docker docker-% vm-help vm-test vm-build-% |
eaa2ddbb | 17 | |
250b086e | 18 | # All following code might depend on configuration variables |
55d7e8f6 | 19 | ifneq ($(wildcard config-host.mak),) |
1ad2134f | 20 | # Put the all: rule here so that config-host.mak can contain dependencies. |
8f67aa82 | 21 | all: |
ad064840 | 22 | include config-host.mak |
d1bd2423 | 23 | |
aef45d51 DB |
24 | git-submodule-update: |
25 | ||
26 | .PHONY: git-submodule-update | |
27 | ||
c4b01c7c DB |
28 | git_module_status := $(shell \ |
29 | cd '$(SRC_PATH)' && \ | |
30 | GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \ | |
31 | echo $$?; \ | |
32 | ) | |
aef45d51 DB |
33 | |
34 | ifeq (1,$(git_module_status)) | |
f62bbee5 DB |
35 | ifeq (no,$(GIT_UPDATE)) |
36 | git-submodule-update: | |
37 | $(call quiet-command, \ | |
38 | echo && \ | |
39 | echo "GIT submodule checkout is out of date. Please run" && \ | |
40 | echo " scripts/git-submodule.sh update $(GIT_SUBMODULES)" && \ | |
41 | echo "from the source directory checkout $(SRC_PATH)" && \ | |
42 | echo && \ | |
43 | exit 1) | |
44 | else | |
aef45d51 DB |
45 | git-submodule-update: |
46 | $(call quiet-command, \ | |
cc84d63a | 47 | (cd $(SRC_PATH) && GIT="$(GIT)" ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \ |
aef45d51 DB |
48 | "GIT","$(GIT_SUBMODULES)") |
49 | endif | |
50 | endif | |
51 | ||
a5665051 PB |
52 | export NINJA=./ninjatool |
53 | ||
54 | # Running meson regenerates both build.ninja and ninjatool, and that is | |
55 | # enough to prime the rest of the build. | |
56 | ninjatool: build.ninja | |
57 | ||
58 | # Only needed in case Makefile.ninja does not exist. | |
59 | .PHONY: ninja-clean ninja-distclean clean-ctlist | |
60 | clean-ctlist: | |
61 | ninja-clean:: | |
62 | ninja-distclean:: | |
63 | build.ninja: config-host.mak | |
64 | ||
65 | Makefile.ninja: build.ninja ninjatool | |
66 | ./ninjatool -t ninja2make --omit clean dist uninstall < $< > $@ | |
67 | -include Makefile.ninja | |
68 | ||
69 | ${ninja-targets-c_COMPILER} ${ninja-targets-cpp_COMPILER}: .var.command += -MP | |
70 | ||
245dac4a PB |
71 | # If MESON is empty, the rule will be re-evaluated after Makefiles are |
72 | # reread (and MESON won't be empty anymore). | |
73 | ifneq ($(MESON),) | |
74 | Makefile.mtest: build.ninja scripts/mtest2make.py | |
75 | $(MESON) introspect --tests | $(PYTHON) scripts/mtest2make.py > $@ | |
76 | -include Makefile.mtest | |
77 | endif | |
78 | ||
92712822 | 79 | .git-submodule-status: git-submodule-update config-host.mak |
aef45d51 | 80 | |
d1bd2423 PM |
81 | # Check that we're not trying to do an out-of-tree build from |
82 | # a tree that's been used for an in-tree build. | |
83 | ifneq ($(realpath $(SRC_PATH)),$(realpath .)) | |
84 | ifneq ($(wildcard $(SRC_PATH)/config-host.mak),) | |
85 | $(error This is an out of tree build but your source tree ($(SRC_PATH)) \ | |
86 | seems to have been used for an in-tree build. You can fix this by running \ | |
b98a3bae | 87 | "$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree) |
d1bd2423 PM |
88 | endif |
89 | endif | |
90 | ||
2b1f35b9 AB |
91 | CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y) |
92 | CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y) | |
6b827cca | 93 | CONFIG_XEN := $(CONFIG_XEN_BACKEND) |
f3aa844b PB |
94 | CONFIG_ALL=y |
95 | -include config-all-devices.mak | |
96 | -include config-all-disas.mak | |
97 | ||
3a6b016d | 98 | config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION |
e5efe7f5 | 99 | @echo $@ is out-of-date, running configure |
a5665051 PB |
100 | @if test -f meson-private/coredata.dat; then \ |
101 | ./config.status --skip-meson; \ | |
102 | else \ | |
103 | ./config.status; \ | |
104 | fi | |
26fffe29 EC |
105 | |
106 | # Force configure to re-run if the API symbols are updated | |
107 | ifeq ($(CONFIG_PLUGIN),y) | |
108 | config-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols | |
109 | endif | |
110 | ||
55d7e8f6 AJ |
111 | else |
112 | config-host.mak: | |
eaa2ddbb | 113 | ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
55d7e8f6 AJ |
114 | @echo "Please call configure before running make!" |
115 | @exit 1 | |
116 | endif | |
7748b8cb | 117 | endif |
766a487a | 118 | |
fb57c881 FZ |
119 | include $(SRC_PATH)/rules.mak |
120 | ||
c932ce31 | 121 | # lor is defined in rules.mak |
29de2804 LV |
122 | CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) |
123 | ||
d3b18480 MAL |
124 | generated-files-y += target/s390x/gen-features.h |
125 | target/s390x/gen-features.h: Makefile.ninja | |
0c0c1fd9 | 126 | |
3dff199c | 127 | generated-files-y += .git-submodule-status |
0ab8ed18 | 128 | |
d9ace8b3 JQ |
129 | # Don't try to regenerate Makefile or configure |
130 | # We don't generate any of them | |
131 | Makefile: ; | |
132 | configure: ; | |
133 | ||
bd3f5706 | 134 | .PHONY: all clean cscope distclean html info install install-doc \ |
7c3d1917 | 135 | pdf txt recurse-all dist msi FORCE |
0cb3fb1e | 136 | |
fec90ff0 | 137 | $(call set-vpath, $(SRC_PATH)) |
8c462f8f | 138 | |
3e2e0e6b | 139 | LIBS+=-lz $(LIBS_TOOLS) |
67c0f08d | 140 | |
b53c54c6 PM |
141 | # Sphinx does not allow building manuals into the same directory as |
142 | # the source files, so if we're doing an in-tree QEMU build we must | |
143 | # build the manuals into a subdirectory (and then install them from | |
144 | # there for 'make install'). For an out-of-tree build we can just | |
145 | # use the docs/ subdirectory in the build tree as normal. | |
146 | ifeq ($(realpath $(SRC_PATH)),$(realpath .)) | |
147 | MANUAL_BUILDDIR := docs/built | |
148 | else | |
149 | MANUAL_BUILDDIR := docs | |
150 | endif | |
151 | ||
cc8ae6de | 152 | ifdef BUILD_DOCS |
d06118bf | 153 | DOCS+=$(MANUAL_BUILDDIR)/system/qemu.1 |
a08b4a9f PM |
154 | DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-img.1 |
155 | DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-nbd.8 | |
87c0868f | 156 | DOCS+=$(MANUAL_BUILDDIR)/interop/qemu-ga.8 |
6a7e2bbe | 157 | ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) |
a08b4a9f | 158 | DOCS+=$(MANUAL_BUILDDIR)/tools/virtiofsd.1 |
6a7e2bbe | 159 | endif |
acab923d | 160 | DOCS+=$(MANUAL_BUILDDIR)/system/qemu-block-drivers.7 |
d59157ea PB |
161 | DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7 |
162 | DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7 | |
1bf84a1e | 163 | DOCS+=$(MANUAL_BUILDDIR)/system/qemu-cpu-models.7 |
22108f33 | 164 | DOCS+=$(MANUAL_BUILDDIR)/index.html |
983eef5a | 165 | ifdef CONFIG_VIRTFS |
a08b4a9f | 166 | DOCS+=$(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1 |
983eef5a | 167 | endif |
62dd1048 | 168 | ifdef CONFIG_TRACE_SYSTEMTAP |
a08b4a9f | 169 | DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-trace-stap.1 |
62dd1048 | 170 | endif |
cc8ae6de PB |
171 | else |
172 | DOCS= | |
173 | endif | |
aa05ae6f | 174 | |
8cc357b5 | 175 | SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR) |
a992fe3d | 176 | |
992aeb8e PB |
177 | ifneq ($(wildcard config-host.mak),) |
178 | include $(SRC_PATH)/Makefile.objs | |
ba1183da FZ |
179 | endif |
180 | ||
46e7b706 | 181 | include $(SRC_PATH)/tests/Makefile.include |
992aeb8e | 182 | |
c3a0ee84 | 183 | all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules |
b9dea4fb | 184 | |
1215c6e7 JQ |
185 | config-host.h: config-host.h-timestamp |
186 | config-host.h-timestamp: config-host.mak | |
187 | ||
c621dc3e | 188 | TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(TARGET_DIRS))) |
916359f6 | 189 | |
1338a4b7 MA |
190 | SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES)) |
191 | $(SOFTMMU_ALL_RULES): $(authz-obj-y) | |
192 | $(SOFTMMU_ALL_RULES): $(block-obj-y) | |
193 | $(SOFTMMU_ALL_RULES): $(chardev-obj-y) | |
194 | $(SOFTMMU_ALL_RULES): $(crypto-obj-y) | |
195 | $(SOFTMMU_ALL_RULES): $(io-obj-y) | |
de59dda3 | 196 | $(SOFTMMU_ALL_RULES): $(qom-obj-y) |
1338a4b7 | 197 | $(SOFTMMU_ALL_RULES): config-all-devices.mak |
cec7d0b6 | 198 | |
c621dc3e AB |
199 | SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES)) |
200 | $(SOFTMMU_FUZZ_RULES): $(authz-obj-y) | |
201 | $(SOFTMMU_FUZZ_RULES): $(block-obj-y) | |
202 | $(SOFTMMU_FUZZ_RULES): $(chardev-obj-y) | |
203 | $(SOFTMMU_FUZZ_RULES): $(crypto-obj-y) | |
204 | $(SOFTMMU_FUZZ_RULES): $(io-obj-y) | |
205 | $(SOFTMMU_FUZZ_RULES): config-all-devices.mak | |
206 | $(SOFTMMU_FUZZ_RULES): $(edk2-decompressed) | |
207 | ||
2becc36a PB |
208 | # meson: this is sub-optimal but going away after conversion |
209 | TARGET_DEPS = $(patsubst %,%-config-target.h, $(TARGET_DIRS)) | |
210 | TARGET_DEPS += $(patsubst %,%-config-devices.h, $(filter %-softmmu,$(TARGET_DIRS))) | |
211 | TARGET_DEPS += $(patsubst %,libqemu-%.fa, $(TARGET_DIRS)) | |
212 | ||
1338a4b7 MA |
213 | .PHONY: $(TARGET_DIRS_RULES) |
214 | # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that | |
215 | # $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal | |
2becc36a | 216 | $(TARGET_DIRS_RULES): $(TARGET_DEPS) |
1338a4b7 | 217 | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) |
4aa42531 | 218 | |
67953a37 CF |
219 | # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC |
220 | DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib="" | |
965f486c | 221 | DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) |
67953a37 | 222 | DTC_CPPFLAGS=-I$(SRC_PATH)/dtc/libfdt |
a540f158 | 223 | |
3b8593ee | 224 | .PHONY: dtc/all |
67953a37 CF |
225 | dtc/all: .git-submodule-status dtc/libfdt |
226 | $(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,) | |
a540f158 | 227 | |
00525864 | 228 | dtc/%: .git-submodule-status |
814e1110 | 229 | @mkdir -p $@ |
a540f158 | 230 | |
e219c499 RH |
231 | # Overriding CFLAGS causes us to lose defines added in the sub-makefile. |
232 | # Not overriding CFLAGS leads to mis-matches between compilation modes. | |
233 | # Therefore we replicate some of the logic in the sub-makefile. | |
234 | # Remove all the extra -Warning flags that QEMU uses that Capstone doesn't; | |
235 | # no need to annoy QEMU developers with such things. | |
236 | CAP_CFLAGS = $(patsubst -W%,,$(CFLAGS) $(QEMU_CFLAGS)) | |
237 | CAP_CFLAGS += -DCAPSTONE_USE_SYS_DYN_MEM | |
238 | CAP_CFLAGS += -DCAPSTONE_HAS_ARM | |
239 | CAP_CFLAGS += -DCAPSTONE_HAS_ARM64 | |
240 | CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC | |
241 | CAP_CFLAGS += -DCAPSTONE_HAS_X86 | |
242 | ||
3b8593ee MA |
243 | .PHONY: capstone/all |
244 | capstone/all: .git-submodule-status | |
9f81aeb5 | 245 | $(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)) |
e219c499 | 246 | |
3b8593ee MA |
247 | .PHONY: slirp/all |
248 | slirp/all: .git-submodule-status | |
daa79d9a AB |
249 | $(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp \ |
250 | BUILD_DIR="$(BUILD_DIR)/slirp" \ | |
251 | PKG_CONFIG="$(PKG_CONFIG)" \ | |
252 | CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" \ | |
db5adeaa | 253 | CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)") |
675b9b53 | 254 | |
1338a4b7 | 255 | $(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \ |
3154fee4 | 256 | $(qom-obj-y) block.syms qemu.syms |
add16157 | 257 | |
c621dc3e AB |
258 | $(filter %/fuzz, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \ |
259 | $(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY)) | |
260 | ||
3b8593ee | 261 | ROM_DIRS = $(addprefix pc-bios/, $(ROMS)) |
1338a4b7 | 262 | ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) |
a9c87304 | 263 | # Only keep -O and -g cflags |
1338a4b7 MA |
264 | .PHONY: $(ROM_DIRS_RULES) |
265 | $(ROM_DIRS_RULES): | |
266 | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),) | |
c05ac895 | 267 | |
8d358a5e | 268 | .PHONY: recurse-all recurse-clean recurse-install |
1338a4b7 MA |
269 | recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS)) |
270 | recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS)) | |
271 | recurse-install: $(addsuffix /install, $(TARGET_DIRS)) | |
47ae060e | 272 | $(addsuffix /install, $(TARGET_DIRS)): all |
83f64091 | 273 | |
c17a18ef | 274 | $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h |
0bdb12c7 | 275 | $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"RC","version.o") |
5354e4d2 | 276 | |
c17a18ef | 277 | Makefile: $(version-obj-y) |
3bc2f570 | 278 | |
44dc0ca3 | 279 | ###################################################################### |
4fb240a4 | 280 | |
ebedb37c | 281 | COMMON_LDADDS = libqemuutil.a |
0ab8ed18 | 282 | |
a5665051 PB |
283 | clean: recurse-clean ninja-clean clean-ctlist |
284 | -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean | |
2d80ae89 | 285 | # avoid old build problems by removing potentially incorrect old files |
25be210f | 286 | rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h |
23858f40 LE |
287 | find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ |
288 | ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ | |
289 | ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ | |
290 | ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ | |
291 | -exec rm {} + | |
c3a0ee84 | 292 | rm -f TAGS cscope.* *.pod *~ */*~ |
b855f8d1 | 293 | rm -f fsdev/*.pod scsi/*.pod |
3dff199c | 294 | rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) |
31e31b8a | 295 | |
34bb443e AL |
296 | VERSION ?= $(shell cat VERSION) |
297 | ||
298 | dist: qemu-$(VERSION).tar.bz2 | |
299 | ||
34bb443e AL |
300 | qemu-%.tar.bz2: |
301 | $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" | |
302 | ||
5f71eac0 | 303 | define clean-manual = |
1290e671 PM |
304 | rm -rf $(MANUAL_BUILDDIR)/$1/_static |
305 | rm -f $(MANUAL_BUILDDIR)/$1/objects.inv $(MANUAL_BUILDDIR)/$1/searchindex.js $(MANUAL_BUILDDIR)/$1/*.html | |
5f71eac0 PM |
306 | endef |
307 | ||
a5665051 PB |
308 | distclean: clean ninja-distclean |
309 | -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean -g | |
ee5195ee | 310 | rm -f config-host.mak config-host.h* $(DOCS) |
2038f8c8 | 311 | rm -f tests/tcg/config-*.mak |
2becc36a | 312 | rm -f config-all-disas.mak config.status |
ae219359 | 313 | rm -f po/*.mo tests/qemu-iotests/common.env |
fc8e320e | 314 | rm -f roms/seabios/config.mak roms/vgabios/config.mak |
26fffe29 | 315 | rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols |
a5665051 | 316 | rm -rf meson-private meson-logs meson-info compile_commands.json |
245dac4a | 317 | rm -f Makefile.ninja ninjatool ninjatool.stamp Makefile.mtest |
793553ac | 318 | rm -f config.log |
67ed96f9 | 319 | rm -f linux-headers/asm |
d59157ea PB |
320 | rm -f docs/version.texi |
321 | rm -f docs/interop/qemu-ga-qapi.texi docs/interop/qemu-qmp-qapi.texi | |
322 | rm -f docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7 | |
323 | rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt | |
324 | rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf | |
325 | rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html | |
81f33401 | 326 | rm -rf .doctrees |
5f71eac0 PM |
327 | $(call clean-manual,devel) |
328 | $(call clean-manual,interop) | |
0783a732 | 329 | $(call clean-manual,specs) |
0928523a | 330 | $(call clean-manual,system) |
65c3542b | 331 | $(call clean-manual,tools) |
09147930 | 332 | $(call clean-manual,user) |
2b1f35b9 | 333 | for d in $(TARGET_DIRS); do \ |
bc1b050d | 334 | rm -rf $$d || exit 1 ; \ |
76bc6838 | 335 | done |
d9840e25 | 336 | rm -Rf .sdk |
7d13299d | 337 | |
06e7772f | 338 | KEYMAPS=da en-gb et fr fr-ch is lt no pt-br sv \ |
fed4a9ad | 339 | ar de en-us fi fr-be hr it lv nl pl ru th \ |
26b1cbf8 | 340 | de-ch es fo fr-ca hu ja mk pt sl tr \ |
3751e722 | 341 | bepo cz |
fed4a9ad | 342 | |
77755340 | 343 | ifdef INSTALL_BLOBS |
32eb2da3 | 344 | BLOBS=bios.bin bios-256k.bin bios-microvm.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ |
7a4dfd1e | 345 | vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \ |
0a87fd69 | 346 | vgabios-ramfb.bin vgabios-bochs-display.bin vgabios-ati.bin \ |
b2ce76a0 | 347 | openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \ |
5ee8ad71 AW |
348 | pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ |
349 | pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ | |
9fd02979 SE |
350 | efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \ |
351 | efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \ | |
45027808 | 352 | efi-e1000e.rom efi-vmxnet3.rom \ |
b3ce38dc | 353 | qemu-nsis.bmp \ |
4b387f9e | 354 | bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ |
2785dc7b | 355 | multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin \ |
6c5359e1 | 356 | s390-ccw.img s390-netboot.img \ |
744a928c | 357 | slof.bin skiboot.lid \ |
0c6ab8c9 | 358 | palcode-clipper \ |
82e65fe0 | 359 | u-boot.e500 u-boot-sam460-20100605.bin \ |
43ad2564 | 360 | qemu_vga.ndrv \ |
26ce90fd | 361 | edk2-licenses.txt \ |
91f3a2f0 | 362 | hppa-firmware.img \ |
a6fcc80b | 363 | opensbi-riscv32-sifive_u-fw_jump.bin opensbi-riscv32-virt-fw_jump.bin \ |
91f3a2f0 | 364 | opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin |
77755340 TS |
365 | else |
366 | BLOBS= | |
367 | endif | |
368 | ||
336cfef4 | 369 | # Note that we manually filter-out the non-Sphinx documentation which |
27a296fc PM |
370 | # is currently built into the docs/interop directory in the build tree, |
371 | # and also any sphinx-built manpages. | |
5f71eac0 | 372 | define install-manual = |
1290e671 | 373 | for d in $$(cd $(MANUAL_BUILDDIR) && find $1 -type d); do $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/$$d"; done |
27a296fc | 374 | 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 |
5f71eac0 PM |
375 | endef |
376 | ||
377 | # Note that we deliberately do not install the "devel" manual: it is | |
378 | # for QEMU developers, and not interesting to our users. | |
379 | .PHONY: install-sphinxdocs | |
380 | install-sphinxdocs: sphinxdocs | |
381 | $(call install-manual,interop) | |
0783a732 | 382 | $(call install-manual,specs) |
0928523a | 383 | $(call install-manual,system) |
65c3542b | 384 | $(call install-manual,tools) |
09147930 | 385 | $(call install-manual,user) |
5f71eac0 PM |
386 | |
387 | install-doc: $(DOCS) install-sphinxdocs | |
d7dd65ba | 388 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" |
22108f33 | 389 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)" |
c13dba2c LP |
390 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/interop" |
391 | $(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)/interop" | |
392 | $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)/interop" | |
96d409eb | 393 | ifdef CONFIG_POSIX |
58f8aead | 394 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" |
d06118bf | 395 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu.1 "$(DESTDIR)$(mandir)/man1" |
56e8bdd4 | 396 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7" |
d59157ea | 397 | $(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7" |
acab923d | 398 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7" |
1bf84a1e | 399 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu-cpu-models.7 "$(DESTDIR)$(mandir)/man7" |
c932ce31 | 400 | ifeq ($(CONFIG_TOOLS),y) |
a08b4a9f | 401 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
58f8aead | 402 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" |
a08b4a9f | 403 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" |
38954dca | 404 | endif |
62dd1048 | 405 | ifdef CONFIG_TRACE_SYSTEMTAP |
a08b4a9f | 406 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-trace-stap.1 "$(DESTDIR)$(mandir)/man1" |
62dd1048 | 407 | endif |
f15bff25 | 408 | ifeq ($(CONFIG_GUEST_AGENT),y) |
b53c54c6 | 409 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/interop/qemu-ga.8 "$(DESTDIR)$(mandir)/man8" |
c13dba2c LP |
410 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/interop" |
411 | $(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)/interop" | |
412 | $(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)/interop" | |
d59157ea | 413 | $(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7" |
665b5d0d | 414 | endif |
8a3e8f7f | 415 | endif |
a2d8f1be MK |
416 | ifdef CONFIG_VIRTFS |
417 | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" | |
a08b4a9f | 418 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1" |
a2d8f1be | 419 | endif |
6a7e2bbe | 420 | ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) |
a08b4a9f | 421 | $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtiofsd.1 "$(DESTDIR)$(mandir)/man1" |
6a7e2bbe | 422 | endif |
e2d87bff EH |
423 | |
424 | install-datadir: | |
425 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" | |
426 | ||
f2e3978b LE |
427 | install-localstatedir: |
428 | ifdef CONFIG_POSIX | |
f15bff25 | 429 | ifeq ($(CONFIG_GUEST_AGENT),y) |
f2e3978b LE |
430 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run |
431 | endif | |
432 | endif | |
433 | ||
a8260d38 | 434 | ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 |
e2d87bff | 435 | |
a5665051 PB |
436 | # Needed by "meson install" |
437 | export DESTDIR | |
54cb65d8 | 438 | install: all $(if $(BUILD_DOCS),install-doc) \ |
f556b4a1 | 439 | install-datadir install-localstatedir \ |
1338a4b7 | 440 | recurse-install |
62dd1048 DB |
441 | ifdef CONFIG_TRACE_SYSTEMTAP |
442 | $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) | |
443 | endif | |
77755340 | 444 | ifneq ($(BLOBS),) |
77755340 | 445 | set -e; for x in $(BLOBS); do \ |
6aae2a2e | 446 | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ |
ad064840 | 447 | done |
834574ea | 448 | endif |
a8260d38 | 449 | for s in $(ICON_SIZES); do \ |
6c11dda9 | 450 | mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \ |
a8260d38 | 451 | $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \ |
6c11dda9 | 452 | "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps/qemu.png"; \ |
a8260d38 | 453 | done; \ |
6c11dda9 | 454 | mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps"; \ |
a8260d38 | 455 | $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_32x32.bmp \ |
6c11dda9 SH |
456 | "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps/qemu.bmp"; \ |
457 | mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps"; \ | |
a8260d38 | 458 | $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu.svg \ |
6c11dda9 SH |
459 | "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps/qemu.svg" |
460 | mkdir -p "$(DESTDIR)$(qemu_desktopdir)" | |
67ea9546 | 461 | $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \ |
6c11dda9 | 462 | "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop" |
2a6b5372 | 463 | ifdef CONFIG_GTK |
834574ea | 464 | $(MAKE) -C po $@ |
77755340 | 465 | endif |
6aae2a2e | 466 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" |
18be8d77 | 467 | set -e; for x in $(KEYMAPS); do \ |
6aae2a2e | 468 | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ |
ad064840 | 469 | done |
a81df1b6 PB |
470 | for d in $(TARGET_DIRS); do \ |
471 | $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ | |
472 | done | |
612384d7 | 473 | |
3ef693a0 | 474 | # documentation |
e8518c92 | 475 | MAKEINFO=makeinfo |
d59157ea PB |
476 | MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D) |
477 | MAKEINFOFLAGS=--no-split --number-sections $(MAKEINFOINCLUDES) | |
e8338fdb | 478 | TEXI2PODFLAGS=$(MAKEINFOINCLUDES) -DVERSION="$(VERSION)" -DCONFDIR="$(qemu_confdir)" |
d59157ea | 479 | TEXI2PDFFLAGS=$(if $(V),,--quiet) -I $(SRC_PATH) $(MAKEINFOINCLUDES) |
56e8bdd4 | 480 | |
e8338fdb MAL |
481 | docs/version.texi: $(SRC_PATH)/VERSION config-host.mak |
482 | $(call quiet-command,(\ | |
483 | echo "@set VERSION $(VERSION)" && \ | |
484 | echo "@set CONFDIR $(qemu_confdir)" \ | |
485 | )> $@,"GEN","$@") | |
fea346f5 | 486 | |
44cb280d | 487 | %.html: %.texi docs/version.texi |
e9ee06bd MAL |
488 | $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ |
489 | --html $< -o $@,"GEN","$@") | |
3ef693a0 | 490 | |
44cb280d | 491 | %.info: %.texi docs/version.texi |
e9ee06bd | 492 | $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@") |
f3548328 | 493 | |
44cb280d | 494 | %.txt: %.texi docs/version.texi |
f8bab10b MAL |
495 | $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ |
496 | --plaintext $< -o $@,"GEN","$@") | |
497 | ||
44cb280d | 498 | %.pdf: %.texi docs/version.texi |
d59157ea | 499 | $(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@") |
bd7f9747 | 500 | |
5f71eac0 PM |
501 | # Sphinx builds all its documentation at once in one invocation |
502 | # and handles "don't rebuild things unless necessary" itself. | |
503 | # The '.doctrees' files are cached information to speed this up. | |
504 | .PHONY: sphinxdocs | |
0928523a PM |
505 | sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \ |
506 | $(MANUAL_BUILDDIR)/interop/index.html \ | |
507 | $(MANUAL_BUILDDIR)/specs/index.html \ | |
65c3542b | 508 | $(MANUAL_BUILDDIR)/system/index.html \ |
09147930 PB |
509 | $(MANUAL_BUILDDIR)/tools/index.html \ |
510 | $(MANUAL_BUILDDIR)/user/index.html | |
5f71eac0 PM |
511 | |
512 | # Canned command to build a single manual | |
27a296fc | 513 | # Arguments: $1 = manual name, $2 = Sphinx builder ('html' or 'man') |
6bda415c EH |
514 | # Note the use of different doctree for each (manual, builder) tuple; |
515 | # this works around Sphinx not handling parallel invocation on | |
516 | # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946 | |
516e8b7d | 517 | build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) $(SPHINX_WERROR) -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") |
5f71eac0 | 518 | # We assume all RST files in the manual's directory are used in it |
814e068f | 519 | manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*/*.rst) \ |
de1572ca | 520 | $(SRC_PATH)/docs/defs.rst.inc \ |
9165d323 PM |
521 | $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py \ |
522 | $(SRC_PATH)/docs/sphinx/*.py | |
e0f3728d PM |
523 | # Macro to write out the rule and dependencies for building manpages |
524 | # Usage: $(call define-manpage-rule,manualname,manpage1 manpage2...[,extradeps]) | |
525 | # 'extradeps' is optional, and specifies extra files (eg .hx files) that | |
526 | # the manual page depends on. | |
527 | define define-manpage-rule | |
528 | $(call atomic,$(foreach manpage,$2,$(MANUAL_BUILDDIR)/$1/$(manpage)),$(call manual-deps,$1) $3) | |
529 | $(call build-manual,$1,man) | |
530 | endef | |
5f71eac0 | 531 | |
1290e671 | 532 | $(MANUAL_BUILDDIR)/devel/index.html: $(call manual-deps,devel) |
27a296fc | 533 | $(call build-manual,devel,html) |
5f71eac0 | 534 | |
a08b4a9f | 535 | $(MANUAL_BUILDDIR)/interop/index.html: $(call manual-deps,interop) |
27a296fc | 536 | $(call build-manual,interop,html) |
5f71eac0 | 537 | |
0783a732 | 538 | $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs) |
27a296fc PM |
539 | $(call build-manual,specs,html) |
540 | ||
09ce5f2d | 541 | $(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 |
0928523a PM |
542 | $(call build-manual,system,html) |
543 | ||
a08b4a9f | 544 | $(MANUAL_BUILDDIR)/tools/index.html: $(call manual-deps,tools) $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/docs/qemu-option-trace.rst.inc |
65c3542b PM |
545 | $(call build-manual,tools,html) |
546 | ||
09147930 PB |
547 | $(MANUAL_BUILDDIR)/user/index.html: $(call manual-deps,user) |
548 | $(call build-manual,user,html) | |
549 | ||
a08b4a9f | 550 | $(call define-manpage-rule,interop,qemu-ga.8) |
87c0868f | 551 | |
d06118bf | 552 | $(call define-manpage-rule,system,qemu.1 qemu-block-drivers.7 qemu-cpu-models.7) |
acab923d | 553 | |
a08b4a9f PM |
554 | $(call define-manpage-rule,tools,\ |
555 | qemu-img.1 qemu-nbd.8 qemu-trace-stap.1\ | |
556 | virtiofsd.1 virtfs-proxy-helper.1,\ | |
557 | $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/docs/qemu-option-trace.rst.inc) | |
558 | ||
22108f33 | 559 | $(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h |
d83bbeda | 560 | @mkdir -p "$(MANUAL_BUILDDIR)" |
22108f33 SH |
561 | $(call quiet-command, sed "s|@@VERSION@@|${VERSION}|g" $< >$@, \ |
562 | "GEN","$@") | |
563 | ||
eb815e24 | 564 | docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi |
fb0bc835 | 565 | @cp -p $< $@ |
4afeeb57 | 566 | |
f15bff25 | 567 | docs/interop/qemu-ga-qapi.texi: qga/qga-qapi-doc.texi |
fb0bc835 | 568 | @cp -p $< $@ |
56e8bdd4 | 569 | |
5b1d0e92 PM |
570 | html: docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs |
571 | info: docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info | |
572 | pdf: docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf | |
573 | txt: docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt | |
818220f5 | 574 | |
d59157ea PB |
575 | docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \ |
576 | docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \ | |
577 | docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7: \ | |
578 | docs/interop/qemu-ga-ref.texi docs/interop/qemu-ga-qapi.texi | |
56e8bdd4 | 579 | |
d59157ea PB |
580 | docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \ |
581 | docs/interop/qemu-qmp-ref.info docs/interop/qemu-qmp-ref.pdf \ | |
582 | docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \ | |
583 | docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi | |
56e8bdd4 | 584 | |
ae560cc3 EB |
585 | $(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl |
586 | ||
fe8bf5f6 AB |
587 | # Reports/Analysis |
588 | ||
589 | %/coverage-report.html: | |
590 | @mkdir -p $* | |
591 | $(call quiet-command,\ | |
5eda6e42 AB |
592 | gcovr -r $(SRC_PATH) \ |
593 | $(foreach t, $(TARGET_DIRS), --object-directory $(BUILD_DIR)/$(t)) \ | |
594 | --object-directory $(BUILD_DIR) \ | |
337f2311 | 595 | -p --html --html-details -o $@, \ |
fe8bf5f6 AB |
596 | "GEN", "coverage-report.html") |
597 | ||
598 | .PHONY: coverage-report | |
599 | coverage-report: $(CURDIR)/reports/coverage/coverage-report.html | |
56e8bdd4 | 600 | |
f53ec699 SW |
601 | ifdef CONFIG_WIN32 |
602 | ||
603 | INSTALLER = qemu-setup-$(VERSION)$(EXESUF) | |
604 | ||
605 | nsisflags = -V2 -NOCD | |
606 | ||
607 | ifneq ($(wildcard $(SRC_PATH)/dll),) | |
608 | ifeq ($(ARCH),x86_64) | |
609 | # 64 bit executables | |
610 | DLL_PATH = $(SRC_PATH)/dll/w64 | |
611 | nsisflags += -DW64 | |
612 | else | |
613 | # 32 bit executables | |
614 | DLL_PATH = $(SRC_PATH)/dll/w32 | |
615 | endif | |
616 | endif | |
617 | ||
618 | .PHONY: installer | |
619 | installer: $(INSTALLER) | |
620 | ||
621 | INSTDIR=/tmp/qemu-nsis | |
622 | ||
1b00a4c4 PB |
623 | $(INSTALLER): $(SRC_PATH)/qemu.nsi |
624 | $(MAKE) install DESTDIR=${INSTDIR} | |
f53ec699 | 625 | ifdef SIGNCODE |
1b00a4c4 | 626 | (cd ${INSTDIR}/${bindir}; \ |
f53ec699 SW |
627 | for i in *.exe; do \ |
628 | $(SIGNCODE) $${i}; \ | |
629 | done \ | |
630 | ) | |
631 | endif # SIGNCODE | |
1b00a4c4 | 632 | (cd ${INSTDIR}/${bindir}; \ |
f53ec699 SW |
633 | for i in qemu-system-*.exe; do \ |
634 | arch=$${i%.exe}; \ | |
635 | arch=$${arch#qemu-system-}; \ | |
636 | echo Section \"$$arch\" Section_$$arch; \ | |
637 | echo SetOutPath \"\$$INSTDIR\"; \ | |
638 | echo File \"\$${BINDIR}\\$$i\"; \ | |
639 | echo SectionEnd; \ | |
640 | done \ | |
1b00a4c4 | 641 | ) >${INSTDIR}/${bindir}/system-emulations.nsh |
f53ec699 SW |
642 | makensis $(nsisflags) \ |
643 | $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \ | |
644 | $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \ | |
1b00a4c4 | 645 | -DBINDIR="${INSTDIR}/${bindir}" \ |
f53ec699 SW |
646 | $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \ |
647 | -DSRCDIR="$(SRC_PATH)" \ | |
648 | -DOUTFILE="$(INSTALLER)" \ | |
805d8a67 | 649 | -DDISPLAYVERSION="$(VERSION)" \ |
f53ec699 SW |
650 | $(SRC_PATH)/qemu.nsi |
651 | rm -r ${INSTDIR} | |
652 | ifdef SIGNCODE | |
653 | $(SIGNCODE) $(INSTALLER) | |
654 | endif # SIGNCODE | |
655 | endif # CONFIG_WIN | |
656 | ||
cb5fc67d AL |
657 | # Add a dependency on the generated files, so that they are always |
658 | # rebuilt before other object files | |
428952cf | 659 | ifneq ($(wildcard config-host.mak),) |
eaa2ddbb | 660 | ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
3dff199c | 661 | Makefile: $(generated-files-y) |
7748b8cb | 662 | endif |
428952cf | 663 | endif |
cb5fc67d | 664 | |
4fb240a4 | 665 | # Include automatically generated dependency files |
1435ddb8 PB |
666 | # Dependencies in Makefile.objs files come from our recursive subdir rules |
667 | -include $(wildcard *.d tests/*.d) | |
324027c2 FZ |
668 | |
669 | include $(SRC_PATH)/tests/docker/Makefile.include | |
b1fb9a63 | 670 | include $(SRC_PATH)/tests/vm/Makefile.include |
0d8e065f | 671 | |
c355de59 PMD |
672 | print-help-run = printf " %-30s - %s\\n" "$1" "$2" |
673 | print-help = $(quiet-@)$(call print-help-run,$1,$2) | |
674 | ||
0d8e065f MAL |
675 | .PHONY: help |
676 | help: | |
677 | @echo 'Generic targets:' | |
c355de59 | 678 | $(call print-help,all,Build all) |
0decdfe2 | 679 | ifdef CONFIG_MODULES |
c355de59 | 680 | $(call print-help,modules,Build all modules) |
0decdfe2 | 681 | endif |
c355de59 PMD |
682 | $(call print-help,dir/file.o,Build specified target only) |
683 | $(call print-help,install,Install QEMU, documentation and tools) | |
684 | $(call print-help,ctags/TAGS,Generate tags file for editors) | |
685 | $(call print-help,cscope,Generate cscope index) | |
968b4db3 | 686 | $(call print-help,sparse,Run sparse on the QEMU source) |
0d8e065f | 687 | @echo '' |
2b1f35b9 | 688 | @$(if $(TARGET_DIRS), \ |
0d8e065f | 689 | echo 'Architecture specific targets:'; \ |
2b1f35b9 | 690 | $(foreach t, $(TARGET_DIRS), \ |
763815a8 PMD |
691 | $(call print-help-run,$(t)/all,Build for $(t)); \ |
692 | $(if $(CONFIG_FUZZ), \ | |
693 | $(if $(findstring softmmu,$(t)), \ | |
694 | $(call print-help-run,$(t)/fuzz,Build fuzzer for $(t)); \ | |
695 | ))) \ | |
0d8e065f MAL |
696 | echo '') |
697 | @echo 'Cleaning targets:' | |
c355de59 | 698 | $(call print-help,clean,Remove most generated files but keep the config) |
c355de59 PMD |
699 | $(call print-help,distclean,Remove all generated files) |
700 | $(call print-help,dist,Build a distributable tarball) | |
0d8e065f MAL |
701 | @echo '' |
702 | @echo 'Test targets:' | |
c355de59 PMD |
703 | $(call print-help,check,Run all tests (check-help for details)) |
704 | $(call print-help,docker,Help about targets running tests inside containers) | |
705 | $(call print-help,vm-help,Help about targets running tests inside VM) | |
0d8e065f MAL |
706 | @echo '' |
707 | @echo 'Documentation targets:' | |
c355de59 | 708 | $(call print-help,html info pdf txt,Build documentation in specified format) |
0d8e065f MAL |
709 | @echo '' |
710 | ifdef CONFIG_WIN32 | |
711 | @echo 'Windows targets:' | |
c355de59 | 712 | $(call print-help,installer,Build NSIS-based installer for QEMU) |
0d8e065f | 713 | ifdef QEMU_GA_MSI_ENABLED |
c355de59 | 714 | $(call print-help,msi,Build MSI-based installer for qemu-ga) |
0d8e065f MAL |
715 | endif |
716 | @echo '' | |
717 | endif | |
c355de59 PMD |
718 | $(call print-help,$(MAKE) [targets],(quiet build, default)) |
719 | $(call print-help,$(MAKE) V=1 [targets],(verbose build)) |