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 | 13 | UNCHECKED_GOALS := %clean TAGS cscope ctags dist \ |
de1da442 | 14 | help check-help print-% \ |
4f2f6276 | 15 | docker docker-% vm-help vm-test vm-build-% |
eaa2ddbb | 16 | |
250b086e | 17 | # All following code might depend on configuration variables |
55d7e8f6 | 18 | ifneq ($(wildcard config-host.mak),) |
1ad2134f | 19 | # Put the all: rule here so that config-host.mak can contain dependencies. |
8f67aa82 | 20 | all: |
ad064840 | 21 | include config-host.mak |
d1bd2423 | 22 | |
aef45d51 DB |
23 | git-submodule-update: |
24 | ||
25 | .PHONY: git-submodule-update | |
26 | ||
c4b01c7c DB |
27 | git_module_status := $(shell \ |
28 | cd '$(SRC_PATH)' && \ | |
29 | GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \ | |
30 | echo $$?; \ | |
31 | ) | |
aef45d51 DB |
32 | |
33 | ifeq (1,$(git_module_status)) | |
f62bbee5 DB |
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 | |
aef45d51 DB |
44 | git-submodule-update: |
45 | $(call quiet-command, \ | |
cc84d63a | 46 | (cd $(SRC_PATH) && GIT="$(GIT)" ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \ |
aef45d51 DB |
47 | "GIT","$(GIT_SUBMODULES)") |
48 | endif | |
49 | endif | |
50 | ||
a5665051 PB |
51 | export NINJA=./ninjatool |
52 | ||
53 | # Running meson regenerates both build.ninja and ninjatool, and that is | |
54 | # enough to prime the rest of the build. | |
55 | ninjatool: build.ninja | |
56 | ||
57 | # Only needed in case Makefile.ninja does not exist. | |
58 | .PHONY: ninja-clean ninja-distclean clean-ctlist | |
59 | clean-ctlist: | |
60 | ninja-clean:: | |
61 | ninja-distclean:: | |
62 | build.ninja: config-host.mak | |
63 | ||
64 | Makefile.ninja: build.ninja ninjatool | |
65 | ./ninjatool -t ninja2make --omit clean dist uninstall < $< > $@ | |
66 | -include Makefile.ninja | |
67 | ||
68 | ${ninja-targets-c_COMPILER} ${ninja-targets-cpp_COMPILER}: .var.command += -MP | |
69 | ||
245dac4a PB |
70 | # If MESON is empty, the rule will be re-evaluated after Makefiles are |
71 | # reread (and MESON won't be empty anymore). | |
72 | ifneq ($(MESON),) | |
73 | Makefile.mtest: build.ninja scripts/mtest2make.py | |
74 | $(MESON) introspect --tests | $(PYTHON) scripts/mtest2make.py > $@ | |
75 | -include Makefile.mtest | |
76 | endif | |
77 | ||
92712822 | 78 | .git-submodule-status: git-submodule-update config-host.mak |
aef45d51 | 79 | |
d1bd2423 PM |
80 | # Check that we're not trying to do an out-of-tree build from |
81 | # a tree that's been used for an in-tree build. | |
82 | ifneq ($(realpath $(SRC_PATH)),$(realpath .)) | |
83 | ifneq ($(wildcard $(SRC_PATH)/config-host.mak),) | |
84 | $(error This is an out of tree build but your source tree ($(SRC_PATH)) \ | |
85 | seems to have been used for an in-tree build. You can fix this by running \ | |
b98a3bae | 86 | "$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree) |
d1bd2423 PM |
87 | endif |
88 | endif | |
89 | ||
2b1f35b9 AB |
90 | CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y) |
91 | CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y) | |
6b827cca | 92 | CONFIG_XEN := $(CONFIG_XEN_BACKEND) |
f3aa844b PB |
93 | CONFIG_ALL=y |
94 | -include config-all-devices.mak | |
95 | -include config-all-disas.mak | |
96 | ||
3a6b016d | 97 | config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION |
e5efe7f5 | 98 | @echo $@ is out-of-date, running configure |
a5665051 PB |
99 | @if test -f meson-private/coredata.dat; then \ |
100 | ./config.status --skip-meson; \ | |
101 | else \ | |
102 | ./config.status; \ | |
103 | fi | |
26fffe29 EC |
104 | |
105 | # Force configure to re-run if the API symbols are updated | |
106 | ifeq ($(CONFIG_PLUGIN),y) | |
107 | config-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols | |
108 | endif | |
109 | ||
55d7e8f6 AJ |
110 | else |
111 | config-host.mak: | |
eaa2ddbb | 112 | ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
55d7e8f6 AJ |
113 | @echo "Please call configure before running make!" |
114 | @exit 1 | |
115 | endif | |
7748b8cb | 116 | endif |
766a487a | 117 | |
fb57c881 FZ |
118 | include $(SRC_PATH)/rules.mak |
119 | ||
c932ce31 | 120 | # lor is defined in rules.mak |
29de2804 LV |
121 | CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) |
122 | ||
3dff199c | 123 | generated-files-y += .git-submodule-status |
0ab8ed18 | 124 | |
d9ace8b3 JQ |
125 | # Don't try to regenerate Makefile or configure |
126 | # We don't generate any of them | |
127 | Makefile: ; | |
128 | configure: ; | |
129 | ||
acfdaac5 PB |
130 | .PHONY: all clean cscope distclean install \ |
131 | recurse-all dist msi FORCE | |
0cb3fb1e | 132 | |
fec90ff0 | 133 | $(call set-vpath, $(SRC_PATH)) |
8c462f8f | 134 | |
3e2e0e6b | 135 | LIBS+=-lz $(LIBS_TOOLS) |
67c0f08d | 136 | |
8cc357b5 | 137 | SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR) |
a992fe3d | 138 | |
992aeb8e PB |
139 | ifneq ($(wildcard config-host.mak),) |
140 | include $(SRC_PATH)/Makefile.objs | |
ba1183da FZ |
141 | endif |
142 | ||
46e7b706 | 143 | include $(SRC_PATH)/tests/Makefile.include |
992aeb8e | 144 | |
484e2cc7 | 145 | all: recurse-all |
859aef02 | 146 | Makefile: $(addsuffix /all, $(SUBDIRS)) |
b9dea4fb | 147 | |
67953a37 CF |
148 | # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC |
149 | DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib="" | |
965f486c | 150 | DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) |
67953a37 | 151 | DTC_CPPFLAGS=-I$(SRC_PATH)/dtc/libfdt |
a540f158 | 152 | |
3b8593ee | 153 | .PHONY: dtc/all |
67953a37 CF |
154 | dtc/all: .git-submodule-status dtc/libfdt |
155 | $(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 | 156 | |
00525864 | 157 | dtc/%: .git-submodule-status |
814e1110 | 158 | @mkdir -p $@ |
a540f158 | 159 | |
e219c499 RH |
160 | # Overriding CFLAGS causes us to lose defines added in the sub-makefile. |
161 | # Not overriding CFLAGS leads to mis-matches between compilation modes. | |
162 | # Therefore we replicate some of the logic in the sub-makefile. | |
163 | # Remove all the extra -Warning flags that QEMU uses that Capstone doesn't; | |
164 | # no need to annoy QEMU developers with such things. | |
165 | CAP_CFLAGS = $(patsubst -W%,,$(CFLAGS) $(QEMU_CFLAGS)) | |
166 | CAP_CFLAGS += -DCAPSTONE_USE_SYS_DYN_MEM | |
167 | CAP_CFLAGS += -DCAPSTONE_HAS_ARM | |
168 | CAP_CFLAGS += -DCAPSTONE_HAS_ARM64 | |
169 | CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC | |
170 | CAP_CFLAGS += -DCAPSTONE_HAS_X86 | |
171 | ||
3b8593ee MA |
172 | .PHONY: capstone/all |
173 | capstone/all: .git-submodule-status | |
9f81aeb5 | 174 | $(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 | 175 | |
3b8593ee MA |
176 | .PHONY: slirp/all |
177 | slirp/all: .git-submodule-status | |
daa79d9a AB |
178 | $(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp \ |
179 | BUILD_DIR="$(BUILD_DIR)/slirp" \ | |
180 | PKG_CONFIG="$(PKG_CONFIG)" \ | |
181 | CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" \ | |
db5adeaa | 182 | CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)") |
675b9b53 | 183 | |
3b8593ee | 184 | ROM_DIRS = $(addprefix pc-bios/, $(ROMS)) |
1338a4b7 | 185 | ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) |
a9c87304 | 186 | # Only keep -O and -g cflags |
1338a4b7 MA |
187 | .PHONY: $(ROM_DIRS_RULES) |
188 | $(ROM_DIRS_RULES): | |
189 | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),) | |
c05ac895 | 190 | |
5e6d1573 PB |
191 | .PHONY: recurse-all recurse-clean |
192 | recurse-all: $(ROM_DIRS) | |
193 | recurse-clean: $(addsuffix /clean, $(ROM_DIRS)) | |
83f64091 | 194 | |
44dc0ca3 | 195 | ###################################################################### |
4fb240a4 | 196 | |
a5665051 PB |
197 | clean: recurse-clean ninja-clean clean-ctlist |
198 | -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean | |
2d80ae89 | 199 | # avoid old build problems by removing potentially incorrect old files |
25be210f | 200 | rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h |
484e2cc7 | 201 | find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \ |
23858f40 LE |
202 | ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ |
203 | ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ | |
204 | ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ | |
205 | -exec rm {} + | |
c3a0ee84 | 206 | rm -f TAGS cscope.* *.pod *~ */*~ |
b855f8d1 | 207 | rm -f fsdev/*.pod scsi/*.pod |
3dff199c | 208 | rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) |
31e31b8a | 209 | |
859aef02 | 210 | VERSION = $(shell cat $(SRC_PATH)/VERSION) |
34bb443e AL |
211 | |
212 | dist: qemu-$(VERSION).tar.bz2 | |
213 | ||
34bb443e AL |
214 | qemu-%.tar.bz2: |
215 | $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" | |
216 | ||
a5665051 PB |
217 | distclean: clean ninja-distclean |
218 | -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean -g | |
acfdaac5 | 219 | rm -f config-host.mak config-host.h* |
2038f8c8 | 220 | rm -f tests/tcg/config-*.mak |
2becc36a | 221 | rm -f config-all-disas.mak config.status |
ae219359 | 222 | rm -f po/*.mo tests/qemu-iotests/common.env |
fc8e320e | 223 | rm -f roms/seabios/config.mak roms/vgabios/config.mak |
26fffe29 | 224 | rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols |
64ed6f92 | 225 | rm -f *-config-target.h *-config-devices.mak *-config-devices.h |
a5665051 | 226 | rm -rf meson-private meson-logs meson-info compile_commands.json |
245dac4a | 227 | rm -f Makefile.ninja ninjatool ninjatool.stamp Makefile.mtest |
793553ac | 228 | rm -f config.log |
67ed96f9 | 229 | rm -f linux-headers/asm |
d9840e25 | 230 | rm -Rf .sdk |
7d13299d | 231 | |
06e7772f | 232 | KEYMAPS=da en-gb et fr fr-ch is lt no pt-br sv \ |
fed4a9ad | 233 | ar de en-us fi fr-be hr it lv nl pl ru th \ |
26b1cbf8 | 234 | de-ch es fo fr-ca hu ja mk pt sl tr \ |
3751e722 | 235 | bepo cz |
fed4a9ad | 236 | |
77755340 | 237 | ifdef INSTALL_BLOBS |
32eb2da3 | 238 | BLOBS=bios.bin bios-256k.bin bios-microvm.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ |
7a4dfd1e | 239 | vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \ |
0a87fd69 | 240 | vgabios-ramfb.bin vgabios-bochs-display.bin vgabios-ati.bin \ |
b2ce76a0 | 241 | openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \ |
5ee8ad71 AW |
242 | pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ |
243 | pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ | |
9fd02979 SE |
244 | efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \ |
245 | efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \ | |
45027808 | 246 | efi-e1000e.rom efi-vmxnet3.rom \ |
b3ce38dc | 247 | qemu-nsis.bmp \ |
4b387f9e | 248 | bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ |
2785dc7b | 249 | multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin \ |
6c5359e1 | 250 | s390-ccw.img s390-netboot.img \ |
744a928c | 251 | slof.bin skiboot.lid \ |
0c6ab8c9 | 252 | palcode-clipper \ |
82e65fe0 | 253 | u-boot.e500 u-boot-sam460-20100605.bin \ |
43ad2564 | 254 | qemu_vga.ndrv \ |
26ce90fd | 255 | edk2-licenses.txt \ |
91f3a2f0 | 256 | hppa-firmware.img \ |
a6fcc80b | 257 | opensbi-riscv32-sifive_u-fw_jump.bin opensbi-riscv32-virt-fw_jump.bin \ |
91f3a2f0 | 258 | opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin |
77755340 TS |
259 | else |
260 | BLOBS= | |
261 | endif | |
262 | ||
e2d87bff EH |
263 | install-datadir: |
264 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" | |
265 | ||
f2e3978b LE |
266 | install-localstatedir: |
267 | ifdef CONFIG_POSIX | |
f15bff25 | 268 | ifeq ($(CONFIG_GUEST_AGENT),y) |
f2e3978b LE |
269 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run |
270 | endif | |
271 | endif | |
272 | ||
a8260d38 | 273 | ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 |
e2d87bff | 274 | |
a5665051 PB |
275 | # Needed by "meson install" |
276 | export DESTDIR | |
acfdaac5 | 277 | install: all install-datadir install-localstatedir |
62dd1048 DB |
278 | ifdef CONFIG_TRACE_SYSTEMTAP |
279 | $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) | |
280 | endif | |
77755340 | 281 | ifneq ($(BLOBS),) |
77755340 | 282 | set -e; for x in $(BLOBS); do \ |
6aae2a2e | 283 | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ |
ad064840 | 284 | done |
834574ea | 285 | endif |
a8260d38 | 286 | for s in $(ICON_SIZES); do \ |
6c11dda9 | 287 | mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \ |
a8260d38 | 288 | $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \ |
6c11dda9 | 289 | "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps/qemu.png"; \ |
a8260d38 | 290 | done; \ |
6c11dda9 | 291 | mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps"; \ |
a8260d38 | 292 | $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_32x32.bmp \ |
6c11dda9 SH |
293 | "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps/qemu.bmp"; \ |
294 | mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps"; \ | |
a8260d38 | 295 | $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu.svg \ |
6c11dda9 SH |
296 | "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps/qemu.svg" |
297 | mkdir -p "$(DESTDIR)$(qemu_desktopdir)" | |
67ea9546 | 298 | $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \ |
6c11dda9 | 299 | "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop" |
2a6b5372 | 300 | ifdef CONFIG_GTK |
834574ea | 301 | $(MAKE) -C po $@ |
77755340 | 302 | endif |
6aae2a2e | 303 | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" |
18be8d77 | 304 | set -e; for x in $(KEYMAPS); do \ |
6aae2a2e | 305 | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ |
ad064840 | 306 | done |
612384d7 | 307 | |
f53ec699 SW |
308 | ifdef CONFIG_WIN32 |
309 | ||
310 | INSTALLER = qemu-setup-$(VERSION)$(EXESUF) | |
311 | ||
312 | nsisflags = -V2 -NOCD | |
313 | ||
314 | ifneq ($(wildcard $(SRC_PATH)/dll),) | |
315 | ifeq ($(ARCH),x86_64) | |
316 | # 64 bit executables | |
317 | DLL_PATH = $(SRC_PATH)/dll/w64 | |
318 | nsisflags += -DW64 | |
319 | else | |
320 | # 32 bit executables | |
321 | DLL_PATH = $(SRC_PATH)/dll/w32 | |
322 | endif | |
323 | endif | |
324 | ||
325 | .PHONY: installer | |
326 | installer: $(INSTALLER) | |
327 | ||
328 | INSTDIR=/tmp/qemu-nsis | |
329 | ||
1b00a4c4 PB |
330 | $(INSTALLER): $(SRC_PATH)/qemu.nsi |
331 | $(MAKE) install DESTDIR=${INSTDIR} | |
f53ec699 | 332 | ifdef SIGNCODE |
1b00a4c4 | 333 | (cd ${INSTDIR}/${bindir}; \ |
f53ec699 SW |
334 | for i in *.exe; do \ |
335 | $(SIGNCODE) $${i}; \ | |
336 | done \ | |
337 | ) | |
338 | endif # SIGNCODE | |
1b00a4c4 | 339 | (cd ${INSTDIR}/${bindir}; \ |
f53ec699 SW |
340 | for i in qemu-system-*.exe; do \ |
341 | arch=$${i%.exe}; \ | |
342 | arch=$${arch#qemu-system-}; \ | |
343 | echo Section \"$$arch\" Section_$$arch; \ | |
344 | echo SetOutPath \"\$$INSTDIR\"; \ | |
345 | echo File \"\$${BINDIR}\\$$i\"; \ | |
346 | echo SectionEnd; \ | |
347 | done \ | |
1b00a4c4 | 348 | ) >${INSTDIR}/${bindir}/system-emulations.nsh |
f53ec699 SW |
349 | makensis $(nsisflags) \ |
350 | $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \ | |
351 | $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \ | |
1b00a4c4 | 352 | -DBINDIR="${INSTDIR}/${bindir}" \ |
f53ec699 SW |
353 | $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \ |
354 | -DSRCDIR="$(SRC_PATH)" \ | |
355 | -DOUTFILE="$(INSTALLER)" \ | |
805d8a67 | 356 | -DDISPLAYVERSION="$(VERSION)" \ |
f53ec699 SW |
357 | $(SRC_PATH)/qemu.nsi |
358 | rm -r ${INSTDIR} | |
359 | ifdef SIGNCODE | |
360 | $(SIGNCODE) $(INSTALLER) | |
361 | endif # SIGNCODE | |
362 | endif # CONFIG_WIN | |
363 | ||
cb5fc67d AL |
364 | # Add a dependency on the generated files, so that they are always |
365 | # rebuilt before other object files | |
428952cf | 366 | ifneq ($(wildcard config-host.mak),) |
eaa2ddbb | 367 | ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
3dff199c | 368 | Makefile: $(generated-files-y) |
7748b8cb | 369 | endif |
428952cf | 370 | endif |
cb5fc67d | 371 | |
4fb240a4 | 372 | # Include automatically generated dependency files |
1435ddb8 PB |
373 | # Dependencies in Makefile.objs files come from our recursive subdir rules |
374 | -include $(wildcard *.d tests/*.d) | |
324027c2 FZ |
375 | |
376 | include $(SRC_PATH)/tests/docker/Makefile.include | |
b1fb9a63 | 377 | include $(SRC_PATH)/tests/vm/Makefile.include |
0d8e065f | 378 | |
c355de59 PMD |
379 | print-help-run = printf " %-30s - %s\\n" "$1" "$2" |
380 | print-help = $(quiet-@)$(call print-help-run,$1,$2) | |
381 | ||
0d8e065f MAL |
382 | .PHONY: help |
383 | help: | |
384 | @echo 'Generic targets:' | |
c355de59 | 385 | $(call print-help,all,Build all) |
c355de59 PMD |
386 | $(call print-help,dir/file.o,Build specified target only) |
387 | $(call print-help,install,Install QEMU, documentation and tools) | |
388 | $(call print-help,ctags/TAGS,Generate tags file for editors) | |
389 | $(call print-help,cscope,Generate cscope index) | |
968b4db3 | 390 | $(call print-help,sparse,Run sparse on the QEMU source) |
0d8e065f | 391 | @echo '' |
0d8e065f | 392 | @echo 'Cleaning targets:' |
c355de59 | 393 | $(call print-help,clean,Remove most generated files but keep the config) |
c355de59 PMD |
394 | $(call print-help,distclean,Remove all generated files) |
395 | $(call print-help,dist,Build a distributable tarball) | |
0d8e065f MAL |
396 | @echo '' |
397 | @echo 'Test targets:' | |
c355de59 PMD |
398 | $(call print-help,check,Run all tests (check-help for details)) |
399 | $(call print-help,docker,Help about targets running tests inside containers) | |
400 | $(call print-help,vm-help,Help about targets running tests inside VM) | |
0d8e065f MAL |
401 | @echo '' |
402 | @echo 'Documentation targets:' | |
acfdaac5 | 403 | $(call print-help,html info pdf txt man,Build documentation in specified format) |
0d8e065f MAL |
404 | @echo '' |
405 | ifdef CONFIG_WIN32 | |
406 | @echo 'Windows targets:' | |
c355de59 | 407 | $(call print-help,installer,Build NSIS-based installer for QEMU) |
0d8e065f | 408 | ifdef QEMU_GA_MSI_ENABLED |
c355de59 | 409 | $(call print-help,msi,Build MSI-based installer for qemu-ga) |
0d8e065f MAL |
410 | endif |
411 | @echo '' | |
412 | endif | |
c355de59 PMD |
413 | $(call print-help,$(MAKE) [targets],(quiet build, default)) |
414 | $(call print-help,$(MAKE) V=1 [targets],(verbose build)) |