1# Makefile for QEMU. 2 3# Always point to the root of the build tree (needs GNU make). 4BUILD_DIR=$(CURDIR) 5 6# All following code might depend on configuration variables 7ifneq ($(wildcard config-host.mak),) 8# Put the all: rule here so that config-host.mak can contain dependencies. 9all: 10include config-host.mak 11 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. 14ifneq ($(realpath $(SRC_PATH)),$(realpath .)) 15ifneq ($(wildcard $(SRC_PATH)/config-host.mak),) 16$(error This is an out of tree build but your source tree ($(SRC_PATH)) \ 17seems 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) 19endif 20endif 21 22CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y) 23CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y) 24CONFIG_ALL=y 25-include config-all-devices.mak 26-include config-all-disas.mak 27 28include $(SRC_PATH)/rules.mak 29config-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 \ 35 ./config.status; \ 36 else \ 37 sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \ 38 fi 39else 40config-host.mak: 41ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) 42 @echo "Please call configure before running make!" 43 @exit 1 44endif 45endif 46 47GENERATED_HEADERS = config-host.h qemu-options.def 48GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h 49GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c 50 51GENERATED_HEADERS += trace/generated-events.h 52GENERATED_SOURCES += trace/generated-events.c 53 54GENERATED_HEADERS += trace/generated-tracers.h 55ifeq ($(TRACE_BACKEND),dtrace) 56GENERATED_HEADERS += trace/generated-tracers-dtrace.h 57endif 58GENERATED_SOURCES += trace/generated-tracers.c 59 60ifeq ($(TRACE_BACKEND),ust) 61GENERATED_HEADERS += trace/generated-ust-provider.h 62GENERATED_SOURCES += trace/generated-ust.c 63endif 64 65# Don't try to regenerate Makefile or configure 66# We don't generate any of them 67Makefile: ; 68configure: ; 69 70.PHONY: all clean cscope distclean dvi html info install install-doc \ 71 pdf recurse-all speed test dist 72 73$(call set-vpath, $(SRC_PATH)) 74 75LIBS+=-lz $(LIBS_TOOLS) 76 77HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) 78 79ifdef BUILD_DOCS 80DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qmp-commands.txt 81ifdef CONFIG_VIRTFS 82DOCS+=fsdev/virtfs-proxy-helper.1 83endif 84else 85DOCS= 86endif 87 88SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) 89SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) 90SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS)) 91 92ifeq ($(SUBDIR_DEVICES_MAK),) 93config-all-devices.mak: 94 $(call quiet-command,echo '# no devices' > $@," GEN $@") 95else 96config-all-devices.mak: $(SUBDIR_DEVICES_MAK) 97 $(call quiet-command, sed -n \ 98 's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \ 99 $(SUBDIR_DEVICES_MAK) | sort -u > $@, \ 100 " GEN $@") 101endif 102 103-include $(SUBDIR_DEVICES_MAK_DEP) 104 105%/config-devices.mak: default-configs/%.mak 106 $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, " GEN $@") 107 @if test -f $@; then \ 108 if cmp -s $@.old $@; then \ 109 mv $@.tmp $@; \ 110 cp -p $@ $@.old; \ 111 else \ 112 if test -f $@.old; then \ 113 echo "WARNING: $@ (user modified) out of date.";\ 114 else \ 115 echo "WARNING: $@ out of date.";\ 116 fi; \ 117 echo "Run \"make defconfig\" to regenerate."; \ 118 rm $@.tmp; \ 119 fi; \ 120 else \ 121 mv $@.tmp $@; \ 122 cp -p $@ $@.old; \ 123 fi 124 125defconfig: 126 rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) 127 128ifneq ($(wildcard config-host.mak),) 129include $(SRC_PATH)/Makefile.objs 130endif 131 132dummy := $(call unnest-vars,, \ 133 stub-obj-y \ 134 util-obj-y \ 135 qga-obj-y \ 136 block-obj-y \ 137 block-obj-m \ 138 common-obj-y \ 139 common-obj-m) 140 141ifneq ($(wildcard config-host.mak),) 142include $(SRC_PATH)/tests/Makefile 143endif 144ifeq ($(CONFIG_SMARTCARD_NSS),y) 145include $(SRC_PATH)/libcacard/Makefile 146endif 147 148all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules 149 150vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) 151 152vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS) 153 154config-host.h: config-host.h-timestamp 155config-host.h-timestamp: config-host.mak 156qemu-options.def: $(SRC_PATH)/qemu-options.hx 157 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 158 159SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) 160SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES)) 161 162$(SOFTMMU_SUBDIR_RULES): config-all-devices.mak 163 164subdir-%: 165 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) 166 167subdir-pixman: pixman/Makefile 168 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,) 169 170pixman/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) 172 173$(SRC_PATH)/pixman/configure: 174 (cd $(SRC_PATH)/pixman; autoreconf -v --install) 175 176DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt 177DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) 178DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt 179 180subdir-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,) 182 183dtc/%: 184 mkdir -p $@ 185 186$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) 187 188ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) 189romsubdir-%: 190 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",) 191 192ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) 193 194recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) 195 196bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) 197 198$(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h | $(BUILD_DIR)/version.lo 199 $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<," RC version.o") 200$(BUILD_DIR)/version.lo: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h 201 $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<," RC version.lo") 202 203Makefile: $(version-obj-y) $(version-lobj-y) 204 205###################################################################### 206# Build libraries 207 208libqemustub.a: $(stub-obj-y) 209libqemuutil.a: $(util-obj-y) qapi-types.o qapi-visit.o 210 211block-modules = $(foreach o,$(block-obj-m),"$(basename $(subst /,-,$o))",) NULL 212util/module.o-cflags = -D'CONFIG_BLOCK_MODULES=$(block-modules)' 213 214###################################################################### 215 216qemu-img.o: qemu-img-cmds.h 217 218qemu-img$(EXESUF): qemu-img.o $(block-obj-y) libqemuutil.a libqemustub.a 219qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) libqemuutil.a libqemustub.a 220qemu-io$(EXESUF): qemu-io.o $(block-obj-y) libqemuutil.a libqemustub.a 221 222qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o 223 224fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o libqemuutil.a libqemustub.a 225fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap 226 227qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx 228 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 229 230qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) 231qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated 232 233gen-out-type = $(subst .,-,$(suffix $@)) 234 235qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py 236 237qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\ 238$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) 239 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 240qga/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 $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 243qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\ 244$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) 245 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 246 247qapi-types.c qapi-types.h :\ 248$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) 249 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." -b < $<, " GEN $@") 250qapi-visit.c qapi-visit.h :\ 251$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) 252 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." -b < $<, " GEN $@") 253qmp-commands.h qmp-marshal.c :\ 254$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) 255 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@") 256 257QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h) 258$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) 259 260qemu-ga$(EXESUF): $(qga-obj-y) libqemuutil.a libqemustub.a 261 $(call LINK, $^) 262 263clean: 264# avoid old build problems by removing potentially incorrect old files 265 rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h 266 rm -f qemu-options.def 267 find . -name '*.[oda]' -type f -exec rm -f {} + 268 find . -name '*.l[oa]' -type f -exec rm -f {} + 269 find . -name '*$(DSOSUF)' -type f -exec rm -f {} + 270 find . -name '*.mo' -type f -exec rm -f {} + 271 rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ 272 rm -f fsdev/*.pod 273 rm -rf .libs */.libs 274 rm -f qemu-img-cmds.h 275 @# May not be present in GENERATED_HEADERS 276 rm -f trace/generated-tracers-dtrace.dtrace* 277 rm -f trace/generated-tracers-dtrace.h* 278 rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) 279 rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) 280 rm -rf qapi-generated 281 rm -rf qga/qapi-generated 282 for d in $(ALL_SUBDIRS); do \ 283 if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ 284 rm -f $$d/qemu-options.def; \ 285 done 286 287VERSION ?= $(shell cat VERSION) 288 289dist: qemu-$(VERSION).tar.bz2 290 291qemu-%.tar.bz2: 292 $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" 293 294distclean: clean 295 rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi 296 rm -f config-all-devices.mak config-all-disas.mak 297 rm -f po/*.mo 298 rm -f roms/seabios/config.mak roms/vgabios/config.mak 299 rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi 300 rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys 301 rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp 302 rm -f qemu-doc.vr 303 rm -f config.log 304 rm -f linux-headers/asm 305 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 306 for d in $(TARGET_DIRS); do \ 307 rm -rf $$d || exit 1 ; \ 308 done 309 rm -Rf .sdk 310 if test -f pixman/config.log; then make -C pixman distclean; fi 311 if test -f dtc/version_gen.h; then make $(DTC_MAKE_ARGS) clean; fi 312 313KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ 314ar de en-us fi fr-be hr it lv nl pl ru th \ 315common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ 316bepo cz 317 318ifdef INSTALL_BLOBS 319BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ 320vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \ 321acpi-dsdt.aml q35-acpi-dsdt.aml \ 322ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin \ 323pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ 324pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ 325efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \ 326efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \ 327qemu-icon.bmp qemu_logo_no_text.svg \ 328bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ 329multiboot.bin linuxboot.bin kvmvapic.bin \ 330s390-zipl.rom \ 331s390-ccw.img \ 332spapr-rtas.bin slof.bin \ 333palcode-clipper 334else 335BLOBS= 336endif 337 338install-doc: $(DOCS) 339 $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" 340 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)" 341 $(INSTALL_DATA) qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" 342ifdef CONFIG_POSIX 343 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" 344 $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1" 345ifneq ($(TOOLS),) 346 $(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1" 347 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" 348 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" 349endif 350endif 351ifdef CONFIG_VIRTFS 352 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" 353 $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1" 354endif 355 356install-datadir: 357 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" 358 359install-localstatedir: 360ifdef CONFIG_POSIX 361ifneq (,$(findstring qemu-ga,$(TOOLS))) 362 $(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run 363endif 364endif 365 366install-confdir: 367 $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" 368 369install-sysconfig: install-datadir install-confdir 370 $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" 371 372install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ 373install-datadir install-localstatedir 374 $(INSTALL_DIR) "$(DESTDIR)$(bindir)" 375ifneq ($(TOOLS),) 376 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" 377endif 378ifneq ($(CONFIG_MODULES),) 379 $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)" 380 for s in $(patsubst %.mo,%$(DSOSUF),$(modules-m)); do \ 381 $(INSTALL_PROG) $(STRIP_OPT) $$s "$(DESTDIR)$(qemu_moddir)/$${s//\//-}"; \ 382 done 383endif 384ifneq ($(HELPERS-y),) 385 $(INSTALL_DIR) "$(DESTDIR)$(libexecdir)" 386 $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)" 387endif 388ifneq ($(BLOBS),) 389 set -e; for x in $(BLOBS); do \ 390 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ 391 done 392endif 393ifeq ($(CONFIG_GTK),y) 394 $(MAKE) -C po $@ 395endif 396 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" 397 set -e; for x in $(KEYMAPS); do \ 398 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ 399 done 400 for d in $(TARGET_DIRS); do \ 401 $(MAKE) -C $$d $@ || exit 1 ; \ 402 done 403 404# various test targets 405test speed: all 406 $(MAKE) -C tests/tcg $@ 407 408.PHONY: TAGS 409TAGS: 410 rm -f $@ 411 find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} + 412 413cscope: 414 rm -f ./cscope.* 415 find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files 416 cscope -b 417 418# documentation 419MAKEINFO=makeinfo 420MAKEINFOFLAGS=--no-headers --no-split --number-sections 421TEXIFLAG=$(if $(V),,--quiet) 422%.dvi: %.texi 423 $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@") 424 425%.html: %.texi 426 $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \ 427 " GEN $@") 428 429%.info: %.texi 430 $(call quiet-command,$(MAKEINFO) $< -o $@," GEN $@") 431 432%.pdf: %.texi 433 $(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@") 434 435qemu-options.texi: $(SRC_PATH)/qemu-options.hx 436 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 437 438qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx 439 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 440 441qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx 442 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@") 443 444qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx 445 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 446 447qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi 448 $(call quiet-command, \ 449 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ 450 $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \ 451 " GEN $@") 452 453qemu-img.1: qemu-img.texi qemu-img-cmds.texi 454 $(call quiet-command, \ 455 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \ 456 $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \ 457 " GEN $@") 458 459fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi 460 $(call quiet-command, \ 461 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \ 462 $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \ 463 " GEN $@") 464 465qemu-nbd.8: qemu-nbd.texi 466 $(call quiet-command, \ 467 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \ 468 $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \ 469 " GEN $@") 470 471dvi: qemu-doc.dvi qemu-tech.dvi 472html: qemu-doc.html qemu-tech.html 473info: qemu-doc.info qemu-tech.info 474pdf: qemu-doc.pdf qemu-tech.pdf 475 476qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ 477 qemu-img.texi qemu-nbd.texi qemu-options.texi \ 478 qemu-monitor.texi qemu-img-cmds.texi 479 480ifdef CONFIG_WIN32 481 482INSTALLER = qemu-setup-$(VERSION)$(EXESUF) 483 484nsisflags = -V2 -NOCD 485 486ifneq ($(wildcard $(SRC_PATH)/dll),) 487ifeq ($(ARCH),x86_64) 488# 64 bit executables 489DLL_PATH = $(SRC_PATH)/dll/w64 490nsisflags += -DW64 491else 492# 32 bit executables 493DLL_PATH = $(SRC_PATH)/dll/w32 494endif 495endif 496 497.PHONY: installer 498installer: $(INSTALLER) 499 500INSTDIR=/tmp/qemu-nsis 501 502$(INSTALLER): $(SRC_PATH)/qemu.nsi 503 make install prefix=${INSTDIR} 504ifdef SIGNCODE 505 (cd ${INSTDIR}; \ 506 for i in *.exe; do \ 507 $(SIGNCODE) $${i}; \ 508 done \ 509 ) 510endif # SIGNCODE 511 (cd ${INSTDIR}; \ 512 for i in qemu-system-*.exe; do \ 513 arch=$${i%.exe}; \ 514 arch=$${arch#qemu-system-}; \ 515 echo Section \"$$arch\" Section_$$arch; \ 516 echo SetOutPath \"\$$INSTDIR\"; \ 517 echo File \"\$${BINDIR}\\$$i\"; \ 518 echo SectionEnd; \ 519 done \ 520 ) >${INSTDIR}/system-emulations.nsh 521 makensis $(nsisflags) \ 522 $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \ 523 $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \ 524 -DBINDIR="${INSTDIR}" \ 525 $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \ 526 -DSRCDIR="$(SRC_PATH)" \ 527 -DOUTFILE="$(INSTALLER)" \ 528 $(SRC_PATH)/qemu.nsi 529 rm -r ${INSTDIR} 530ifdef SIGNCODE 531 $(SIGNCODE) $(INSTALLER) 532endif # SIGNCODE 533endif # CONFIG_WIN 534 535# Add a dependency on the generated files, so that they are always 536# rebuilt before other object files 537ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) 538Makefile: $(GENERATED_HEADERS) 539endif 540 541# Include automatically generated dependency files 542# Dependencies in Makefile.objs files come from our recursive subdir rules 543-include $(wildcard *.d tests/*.d) 544