3 # Always point to the root of the build tree (needs GNU make).
6 # All following code might depend on configuration variables
7 ifneq ($(wildcard config-host.mak),)
8 # Put the all: rule here so that config-host.mak can contain dependencies.
10 include config-host.mak
12 # Check that we're not trying to do an out-of-tree build from
13 # a tree that's been used for an in-tree build.
14 ifneq ($(realpath $(SRC_PATH)),$(realpath .))
15 ifneq ($(wildcard $(SRC_PATH)/config-host.mak),)
16 $(error This is an out of tree build but your source tree ($(SRC_PATH)) \
17 seems to have been used for an in-tree build. You can fix this by running \
18 "make distclean && rm -rf *-linux-user *-softmmu" in your source tree)
22 CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y)
23 CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y)
25 -include config-all-devices.mak
26 -include config-all-disas.mak
28 include $(SRC_PATH)/rules.mak
29 config-host.mak: $(SRC_PATH)/configure
30 @echo $@ is out-of-date, running configure
31 @# TODO: The next lines include code which supports a smooth
32 @# transition from old configurations without config.status.
33 @# This code can be removed after QEMU 1.7.
34 @if test -x config.status; then \
37 sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \
41 ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
42 @echo "Please call configure before running make!"
47 GENERATED_HEADERS = config-host.h qemu-options.def
48 GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h
49 GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c
51 GENERATED_HEADERS += trace/generated-events.h
52 GENERATED_SOURCES += trace/generated-events.c
54 GENERATED_HEADERS += trace/generated-tracers.h
55 ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace)
56 GENERATED_HEADERS += trace/generated-tracers-dtrace.h
58 GENERATED_SOURCES += trace/generated-tracers.c
60 GENERATED_HEADERS += trace/generated-helpers.h
62 ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
63 GENERATED_HEADERS += trace/generated-ust-provider.h
64 GENERATED_SOURCES += trace/generated-ust.c
67 # Don't try to regenerate Makefile or configure
68 # We don't generate any of them
72 .PHONY: all clean cscope distclean dvi html info install install-doc \
73 pdf recurse-all speed test dist
75 $(call set-vpath, $(SRC_PATH))
77 LIBS+=-lz $(LIBS_TOOLS)
79 HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
82 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qmp-commands.txt
84 DOCS+=fsdev/virtfs-proxy-helper.1
90 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR)
91 SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
92 SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS))
94 ifeq ($(SUBDIR_DEVICES_MAK),)
95 config-all-devices.mak:
96 $(call quiet-command,echo '# no devices' > $@," GEN $@")
98 config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
99 $(call quiet-command, sed -n \
100 's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \
101 $(SUBDIR_DEVICES_MAK) | sort -u > $@, \
105 -include $(SUBDIR_DEVICES_MAK_DEP)
107 %/config-devices.mak: default-configs/%.mak
108 $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, " GEN $@")
109 @if test -f $@; then \
110 if cmp -s $@.old $@; then \
114 if test -f $@.old; then \
115 echo "WARNING: $@ (user modified) out of date.";\
117 echo "WARNING: $@ out of date.";\
119 echo "Run \"make defconfig\" to regenerate."; \
128 rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
130 ifneq ($(wildcard config-host.mak),)
131 include $(SRC_PATH)/Makefile.objs
134 dummy := $(call unnest-vars,, \
144 ifneq ($(wildcard config-host.mak),)
145 include $(SRC_PATH)/tests/Makefile
147 ifeq ($(CONFIG_SMARTCARD_NSS),y)
148 include $(SRC_PATH)/libcacard/Makefile
151 all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules
153 config-host.h: config-host.h-timestamp
154 config-host.h-timestamp: config-host.mak
155 qemu-options.def: $(SRC_PATH)/qemu-options.hx
156 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
158 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
159 SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
161 $(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
162 $(SOFTMMU_SUBDIR_RULES): config-all-devices.mak
165 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
167 subdir-pixman: pixman/Makefile
168 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,)
170 pixman/Makefile: $(SRC_PATH)/pixman/configure
171 (cd pixman; CFLAGS="$(CFLAGS) -fPIC $(extra_cflags) $(extra_ldflags)" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static)
173 $(SRC_PATH)/pixman/configure:
174 (cd $(SRC_PATH)/pixman; autoreconf -v --install)
176 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
177 DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
178 DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
180 subdir-dtc:dtc/libfdt dtc/tests
181 $(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,)
186 $(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y)
188 ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
190 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
192 ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
194 recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
196 $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h | $(BUILD_DIR)/version.lo
197 $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<," RC version.o")
198 $(BUILD_DIR)/version.lo: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h
199 $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<," RC version.lo")
201 Makefile: $(version-obj-y) $(version-lobj-y)
203 ######################################################################
206 libqemustub.a: $(stub-obj-y)
207 libqemuutil.a: $(util-obj-y) qapi-types.o qapi-visit.o qapi-event.o
209 block-modules = $(foreach o,$(block-obj-m),"$(basename $(subst /,-,$o))",) NULL
210 util/module.o-cflags = -D'CONFIG_BLOCK_MODULES=$(block-modules)'
212 ######################################################################
214 qemu-img.o: qemu-img-cmds.h
216 qemu-img$(EXESUF): qemu-img.o $(block-obj-y) libqemuutil.a libqemustub.a
217 qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) libqemuutil.a libqemustub.a
218 qemu-io$(EXESUF): qemu-io.o $(block-obj-y) libqemuutil.a libqemustub.a
220 qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
222 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o libqemuutil.a libqemustub.a
223 fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
225 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
226 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
228 qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
229 qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
231 gen-out-type = $(subst .,-,$(suffix $@))
233 qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
235 qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
236 $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
237 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
238 $(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \
240 qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
241 $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
242 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
243 $(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \
245 qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
246 $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
247 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
248 $(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \
251 qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
252 $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
253 $(SRC_PATH)/qapi/event.json
255 qapi-types.c qapi-types.h :\
256 $(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
257 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
258 $(gen-out-type) -o "." -b -i $<, \
260 qapi-visit.c qapi-visit.h :\
261 $(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
262 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
263 $(gen-out-type) -o "." -b -i $<, \
265 qapi-event.c qapi-event.h :\
266 $(qapi-modules) $(SRC_PATH)/scripts/qapi-event.py $(qapi-py)
267 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-event.py \
268 $(gen-out-type) -o "." -b -i $<, \
270 qmp-commands.h qmp-marshal.c :\
271 $(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
272 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
273 $(gen-out-type) -o "." -m -i $<, \
276 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
277 $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
279 qemu-ga$(EXESUF): $(qga-obj-y) libqemuutil.a libqemustub.a
283 # avoid old build problems by removing potentially incorrect old files
284 rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
285 rm -f qemu-options.def
286 find . \( -name '*.l[oa]' -o -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
287 rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
290 rm -f qemu-img-cmds.h
291 @# May not be present in GENERATED_HEADERS
292 rm -f trace/generated-tracers-dtrace.dtrace*
293 rm -f trace/generated-tracers-dtrace.h*
294 rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp)
295 rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp)
296 rm -rf qapi-generated
297 rm -rf qga/qapi-generated
298 for d in $(ALL_SUBDIRS); do \
299 if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
300 rm -f $$d/qemu-options.def; \
303 VERSION ?= $(shell cat VERSION)
305 dist: qemu-$(VERSION).tar.bz2
308 $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
311 rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
312 rm -f config-all-devices.mak config-all-disas.mak
314 rm -f roms/seabios/config.mak roms/vgabios/config.mak
315 rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi
316 rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
317 rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp
320 rm -f linux-headers/asm
321 rm -f qemu-tech.info qemu-tech.aux qemu-tech.cp qemu-tech.dvi qemu-tech.fn qemu-tech.info qemu-tech.ky qemu-tech.log qemu-tech.pdf qemu-tech.pg qemu-tech.toc qemu-tech.tp qemu-tech.vr
322 for d in $(TARGET_DIRS); do \
323 rm -rf $$d || exit 1 ; \
326 if test -f pixman/config.log; then make -C pixman distclean; fi
327 if test -f dtc/version_gen.h; then make $(DTC_MAKE_ARGS) clean; fi
329 KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
330 ar de en-us fi fr-be hr it lv nl pl ru th \
331 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \
335 BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
336 vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \
337 acpi-dsdt.aml q35-acpi-dsdt.aml \
338 ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \
339 pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
340 pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
341 efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \
342 efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
343 qemu-icon.bmp qemu_logo_no_text.svg \
344 bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
345 multiboot.bin linuxboot.bin kvmvapic.bin \
348 spapr-rtas.bin slof.bin \
356 $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
357 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)"
358 $(INSTALL_DATA) qmp-commands.txt "$(DESTDIR)$(qemu_docdir)"
360 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
361 $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
363 $(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1"
364 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
365 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
369 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
370 $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
374 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
376 install-localstatedir:
378 ifneq (,$(findstring qemu-ga,$(TOOLS)))
379 $(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run
384 $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
386 install-sysconfig: install-datadir install-confdir
387 $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
389 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
390 install-datadir install-localstatedir
392 $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
394 ifneq ($(CONFIG_MODULES),)
395 $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
396 for s in $(modules-m:.mo=$(DSOSUF)); do \
397 t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \
398 $(INSTALL_LIB) $$s "$$t"; \
399 test -z "$(STRIP)" || $(STRIP) "$$t"; \
402 ifneq ($(HELPERS-y),)
403 $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
406 set -e; for x in $(BLOBS); do \
407 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
410 ifeq ($(CONFIG_GTK),y)
413 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
414 set -e; for x in $(KEYMAPS); do \
415 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
417 for d in $(TARGET_DIRS); do \
418 $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
421 # various test targets
423 $(MAKE) -C tests/tcg $@
428 find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
432 find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files
437 MAKEINFOFLAGS=--no-headers --no-split --number-sections
438 TEXIFLAG=$(if $(V),,--quiet)
440 $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@")
443 $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \
447 $(call quiet-command,$(MAKEINFO) $< -o $@," GEN $@")
450 $(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@")
452 qemu-options.texi: $(SRC_PATH)/qemu-options.hx
453 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@")
455 qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx
456 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@")
458 qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx
459 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@")
461 qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
462 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@")
464 qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
465 $(call quiet-command, \
466 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \
467 $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \
470 qemu-img.1: qemu-img.texi qemu-img-cmds.texi
471 $(call quiet-command, \
472 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \
473 $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \
476 fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
477 $(call quiet-command, \
478 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \
479 $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
482 qemu-nbd.8: qemu-nbd.texi
483 $(call quiet-command, \
484 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \
485 $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
488 dvi: qemu-doc.dvi qemu-tech.dvi
489 html: qemu-doc.html qemu-tech.html
490 info: qemu-doc.info qemu-tech.info
491 pdf: qemu-doc.pdf qemu-tech.pdf
493 qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \
494 qemu-img.texi qemu-nbd.texi qemu-options.texi \
495 qemu-monitor.texi qemu-img-cmds.texi
499 INSTALLER = qemu-setup-$(VERSION)$(EXESUF)
501 nsisflags = -V2 -NOCD
503 ifneq ($(wildcard $(SRC_PATH)/dll),)
504 ifeq ($(ARCH),x86_64)
506 DLL_PATH = $(SRC_PATH)/dll/w64
510 DLL_PATH = $(SRC_PATH)/dll/w32
515 installer: $(INSTALLER)
517 INSTDIR=/tmp/qemu-nsis
519 $(INSTALLER): $(SRC_PATH)/qemu.nsi
520 make install prefix=${INSTDIR}
529 for i in qemu-system-*.exe; do \
531 arch=$${arch#qemu-system-}; \
532 echo Section \"$$arch\" Section_$$arch; \
533 echo SetOutPath \"\$$INSTDIR\"; \
534 echo File \"\$${BINDIR}\\$$i\"; \
537 ) >${INSTDIR}/system-emulations.nsh
538 makensis $(nsisflags) \
539 $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \
540 $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \
541 -DBINDIR="${INSTDIR}" \
542 $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \
543 -DSRCDIR="$(SRC_PATH)" \
544 -DOUTFILE="$(INSTALLER)" \
548 $(SIGNCODE) $(INSTALLER)
552 # Add a dependency on the generated files, so that they are always
553 # rebuilt before other object files
554 ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
555 Makefile: $(GENERATED_HEADERS)
558 # Include automatically generated dependency files
559 # Dependencies in Makefile.objs files come from our recursive subdir rules
560 -include $(wildcard *.d tests/*.d)