10cb3fb1eSpbrook# Makefile for QEMU. 20cb3fb1eSpbrook 3519e1693SStefan Weil# Always point to the root of the build tree (needs GNU make). 4519e1693SStefan WeilBUILD_DIR=$(CURDIR) 5388d4758SLluís Vilanova 6250b086eSLluís Vilanova# All following code might depend on configuration variables 755d7e8f6Saurel32ifneq ($(wildcard config-host.mak),) 81ad2134fSPaul Brook# Put the all: rule here so that config-host.mak can contain dependencies. 98f67aa82SStefan Weilall: 10ad064840Spbrookinclude config-host.mak 11d1bd2423SPeter Maydell 12d1bd2423SPeter Maydell# Check that we're not trying to do an out-of-tree build from 13d1bd2423SPeter Maydell# a tree that's been used for an in-tree build. 14d1bd2423SPeter Maydellifneq ($(realpath $(SRC_PATH)),$(realpath .)) 15d1bd2423SPeter Maydellifneq ($(wildcard $(SRC_PATH)/config-host.mak),) 16d1bd2423SPeter Maydell$(error This is an out of tree build but your source tree ($(SRC_PATH)) \ 17d1bd2423SPeter Maydellseems to have been used for an in-tree build. You can fix this by running \ 18d1bd2423SPeter Maydell"make distclean && rm -rf *-linux-user *-softmmu" in your source tree) 19d1bd2423SPeter Maydellendif 20d1bd2423SPeter Maydellendif 21d1bd2423SPeter Maydell 2217759187Saliguoriinclude $(SRC_PATH)/rules.mak 2359bc10eeSPaolo Bonziniconfig-host.mak: $(SRC_PATH)/configure 24e5efe7f5SJuan Quintela @echo $@ is out-of-date, running configure 25e5efe7f5SJuan Quintela @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh 2655d7e8f6Saurel32else 2755d7e8f6Saurel32config-host.mak: 287748b8cbSMike Frysingerifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) 2955d7e8f6Saurel32 @echo "Please call configure before running make!" 3055d7e8f6Saurel32 @exit 1 3155d7e8f6Saurel32endif 327748b8cbSMike Frysingerendif 33766a487aSbellard 34250b086eSLluís VilanovaGENERATED_HEADERS = config-host.h trace.h qemu-options.def 35250b086eSLluís Vilanovaifeq ($(TRACE_BACKEND),dtrace) 36250b086eSLluís VilanovaGENERATED_HEADERS += trace-dtrace.h 37250b086eSLluís Vilanovaendif 38250b086eSLluís VilanovaGENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h 3919ac36b5SLluís VilanovaGENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c trace.c 40250b086eSLluís Vilanova 41d9ace8b3SJuan Quintela# Don't try to regenerate Makefile or configure 42d9ace8b3SJuan Quintela# We don't generate any of them 43d9ace8b3SJuan QuintelaMakefile: ; 44d9ace8b3SJuan Quintelaconfigure: ; 45d9ace8b3SJuan Quintela 46818220f5Saliguori.PHONY: all clean cscope distclean dvi html info install install-doc \ 4734bb443eSAnthony Liguori pdf recurse-all speed test dist 480cb3fb1eSpbrook 49fec90ff0SPaolo Bonzini$(call set-vpath, $(SRC_PATH)) 508c462f8fSpbrook 513e2e0e6bSJuan QuintelaLIBS+=-lz $(LIBS_TOOLS) 5267c0f08dSJuan Quintela 537b93fadfSCorey BryantHELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) 547b93fadfSCorey Bryant 55cc8ae6deSpbrookifdef BUILD_DOCS 56b40292e7SJan KiszkaDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt 57983eef5aSMeador Ingeifdef CONFIG_VIRTFS 58a2d8f1beSM. Mohan KumarDOCS+=fsdev/virtfs-proxy-helper.1 59983eef5aSMeador Ingeendif 60cc8ae6deSpbrookelse 61cc8ae6deSpbrookDOCS= 62cc8ae6deSpbrookendif 637d13299dSbellard 64388d4758SLluís VilanovaSUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) 651f3d3c8fSJuan QuintelaSUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) 66bd9141bbSPaul BrookSUBDIR_DEVICES_MAK_DEP=$(patsubst %, %/config-devices.mak.d, $(TARGET_DIRS)) 671f3d3c8fSJuan Quintela 688bdd3d49SStefan Weilifeq ($(SUBDIR_DEVICES_MAK),) 698bdd3d49SStefan Weilconfig-all-devices.mak: 708bdd3d49SStefan Weil $(call quiet-command,echo '# no devices' > $@," GEN $@") 718bdd3d49SStefan Weilelse 721f3d3c8fSJuan Quintelaconfig-all-devices.mak: $(SUBDIR_DEVICES_MAK) 7301d86a85SStefan Weil $(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@," GEN $@") 748bdd3d49SStefan Weilendif 751f3d3c8fSJuan Quintela 76bd9141bbSPaul Brook-include $(SUBDIR_DEVICES_MAK_DEP) 77bd9141bbSPaul Brook 78a992fe3dSPaul Brook%/config-devices.mak: default-configs/%.mak 794c3b5a48SBlue Swirl $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, " GEN $@") 80a992fe3dSPaul Brook @if test -f $@; then \ 81904fe1fbSBlue Swirl if cmp -s $@.old $@; then \ 82012f0879SStefan Weil mv $@.tmp $@; \ 83012f0879SStefan Weil cp -p $@ $@.old; \ 84012f0879SStefan Weil else \ 85012f0879SStefan Weil if test -f $@.old; then \ 86012f0879SStefan Weil echo "WARNING: $@ (user modified) out of date.";\ 87012f0879SStefan Weil else \ 88a992fe3dSPaul Brook echo "WARNING: $@ out of date.";\ 89012f0879SStefan Weil fi; \ 9063e86b2eSStefan Weil echo "Run \"make defconfig\" to regenerate."; \ 91a992fe3dSPaul Brook rm $@.tmp; \ 92012f0879SStefan Weil fi; \ 93a992fe3dSPaul Brook else \ 94a992fe3dSPaul Brook mv $@.tmp $@; \ 95012f0879SStefan Weil cp -p $@ $@.old; \ 96a992fe3dSPaul Brook fi 97a992fe3dSPaul Brook 98a992fe3dSPaul Brookdefconfig: 99a992fe3dSPaul Brook rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) 100a992fe3dSPaul Brook 1011f3d3c8fSJuan Quintela-include config-all-devices.mak 10276cad711SPaolo Bonzini-include config-all-disas.mak 1031215c6e7SJuan Quintela 1048f67aa82SStefan Weilall: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all 105b9dea4fbSpbrook 1061215c6e7SJuan Quintelaconfig-host.h: config-host.h-timestamp 1071215c6e7SJuan Quintelaconfig-host.h-timestamp: config-host.mak 108e14056adSBlue Swirlqemu-options.def: $(SRC_PATH)/qemu-options.hx 1094c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 1101215c6e7SJuan Quintela 111cec7d0b6SpbrookSUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) 112cec7d0b6Spbrook 1134115852bSPaolo Bonzinisubdir-%: 1140087375eSPaul Brook $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) 1154aa42531Spbrook 116b88bc808SStefan Weilifneq ($(wildcard config-host.mak),) 1170e8c9214SAndreas Färberinclude $(SRC_PATH)/Makefile.objs 118b88bc808SStefan Weilendif 1190e8c9214SAndreas Färber 12041a74826SAnthony Liguorisubdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o 1216774e44aSPaolo Bonzini 122e2134eb9SGerd Hoffmannsubdir-pixman: pixman/Makefile 123e2134eb9SGerd Hoffmann $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,) 124e2134eb9SGerd Hoffmann 125e2134eb9SGerd Hoffmannpixman/Makefile: $(SRC_PATH)/pixman/configure 126c28fa5a0SGerd Hoffmann (cd pixman; CFLAGS="$(CFLAGS) -fPIC" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static) 127e2134eb9SGerd Hoffmann 128e2134eb9SGerd Hoffmann$(SRC_PATH)/pixman/configure: 129e2134eb9SGerd Hoffmann (cd $(SRC_PATH)/pixman; autoreconf -v --install) 130e2134eb9SGerd Hoffmann 13116529cedSStefan Weil$(SUBDIR_RULES): libqemustub.a 13216529cedSStefan Weil 13376cad711SPaolo Bonzini$(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) 134c05ac895SPaul Brook 135*8e98e2e8SPaolo Bonzini$(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(user-obj-y) 136add16157SBlue Swirl 137c05ac895SPaul BrookROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) 138c05ac895SPaul Brookromsubdir-%: 139c05ac895SPaul Brook $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",) 140c05ac895SPaul Brook 141c05ac895SPaul BrookALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) 142c05ac895SPaul Brook 143c05ac895SPaul Brookrecurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) 1444aa42531Spbrook 145a558ee17SJuan Quintelabt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) 1464fb240a4Sbellard 1477948a665SBlue Swirlversion.o: $(SRC_PATH)/version.rc config-host.h 1489fe6de94SBlue Swirl $(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@") 1499fe6de94SBlue Swirl 1509fe6de94SBlue Swirlversion-obj-$(CONFIG_WIN32) += version.o 1513bc2f570SPaolo Bonzini 1523bc2f570SPaolo Bonzini###################################################################### 1533bc2f570SPaolo Bonzini# Build library with stubs 1543bc2f570SPaolo Bonzini 1553bc2f570SPaolo Bonzinilibqemustub.a: $(stub-obj-y) 1563bc2f570SPaolo Bonzini 1574fb240a4Sbellard###################################################################### 15844dc0ca3SAlon Levy# Support building shared library libcacard 15944dc0ca3SAlon Levy 16044dc0ca3SAlon Levy.PHONY: libcacard.la install-libcacard 1615f0cef1aSPaolo Bonzinilibcacard.la: $(oslib-obj-y) qemu-timer-common.o $(trace-obj-y) 16244dc0ca3SAlon Levy $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,) 16344dc0ca3SAlon Levy 16444dc0ca3SAlon Levyinstall-libcacard: libcacard.la 16544dc0ca3SAlon Levy $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,) 16600c705fbSPaolo Bonzini 16744dc0ca3SAlon Levy###################################################################### 1684fb240a4Sbellard 1693c089e15SJuan Quintelaqemu-img.o: qemu-img-cmds.h 170153859beSStuart Brady 171cbcfa041SPaolo Bonzinitools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \ 172136594f1SPaolo Bonzini main-loop.o iohandler.o error.o 173cbcfa041SPaolo Bonzinitools-obj-$(CONFIG_POSIX) += compatfd.o 1744fb240a4Sbellard 1753bc2f570SPaolo Bonziniqemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y) libqemustub.a 1763bc2f570SPaolo Bonziniqemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y) $(block-obj-y) libqemustub.a 1773bc2f570SPaolo Bonziniqemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y) libqemustub.a 1780a8e1acdSaliguori 1797b93fadfSCorey Bryantqemu-bridge-helper$(EXESUF): qemu-bridge-helper.o 1807b93fadfSCorey Bryant 1817937e75bSPaolo Bonzinivscclient$(EXESUF): LIBS += $(libcacard_libs) 1823bc2f570SPaolo Bonzinivscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) libcacard/vscclient.o libqemustub.a 1837937e75bSPaolo Bonzini $(call LINK, $^) 184adb696f3SCorey Bryant 185ea75fc4eSM. Mohan Kumarfsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y) 18617bff52bSM. Mohan Kumarfsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap 18717bff52bSM. Mohan Kumar 188153859beSStuart Bradyqemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx 1894c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 190153859beSStuart Brady 191957f1f99SMichael Rothqemu-ga$(EXESUF): LIBS = $(LIBS_QGA) 19254c2e502SDunrong Huangqemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated 193640e5404SMichael Roth 19419bf7c87SAvi Kivitygen-out-type = $(subst .,-,$(suffix $@)) 1958d3bc517SAvi Kivity 196e454e2e2SAndreas Färberifneq ($(wildcard config-host.mak),) 197dbfe06c6SAnthony Liguoriinclude $(SRC_PATH)/tests/Makefile 198e454e2e2SAndreas Färberendif 199640e5404SMichael Roth 2000521d375SStefan Hajnocziqapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py 2010521d375SStefan Hajnoczi 20254c2e502SDunrong Huangqga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\ 2030521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) 20454c2e502SDunrong Huang $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 20554c2e502SDunrong Huangqga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\ 2060521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) 20754c2e502SDunrong Huang $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 20854c2e502SDunrong Huangqga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\ 2090521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) 21054c2e502SDunrong Huang $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 211e3d4d252SMichael Roth 212599825c5SMichael S. Tsirkinqapi-types.c qapi-types.h :\ 2130521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) 2148d3bc517SAvi Kivity $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@") 215599825c5SMichael S. Tsirkinqapi-visit.c qapi-visit.h :\ 2160521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) 2178d3bc517SAvi Kivity $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@") 218599825c5SMichael S. Tsirkinqmp-commands.h qmp-marshal.c :\ 2190521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) 2208d3bc517SAvi Kivity $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@") 221e3193601SAnthony Liguori 22254c2e502SDunrong HuangQGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h) 2234115852bSPaolo Bonzini$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) 224957f1f99SMichael Roth 2253bc2f570SPaolo Bonziniqemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(oslib-obj-y) $(trace-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) libqemustub.a 22648ff7a62SMichael Roth 22731e31b8aSbellardclean: 2282d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files 22925be210fSJuan Quintela rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h 230df2943baSMichael S. Tsirkin rm -f qemu-options.def 231e743ccecSPeter Maydell find . -name '*.[od]' -exec rm -f {} + 232e743ccecSPeter Maydell rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ 23344dc0ca3SAlon Levy rm -Rf .libs 23407b44ce9SBlue Swirl rm -f qemu-img-cmds.h 235b3d08c02SDaniel P. Berrange rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp 23619ac36b5SLluís Vilanova @# May not be present in GENERATED_HEADERS 237b3d08c02SDaniel P. Berrange rm -f trace-dtrace.h trace-dtrace.h-timestamp 23819ac36b5SLluís Vilanova rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) 23919ac36b5SLluís Vilanova rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) 2408f0e5c6bSStefan Weil rm -rf qapi-generated 24154c2e502SDunrong Huang rm -rf qga/qapi-generated 242c09015ddSAnthony Liguori $(MAKE) -C tests/tcg clean 243*8e98e2e8SPaolo Bonzini for d in $(ALL_SUBDIRS) libcacard; do \ 244fc8e320eSMagnus Damm if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ 245df2943baSMichael S. Tsirkin rm -f $$d/qemu-options.def; \ 246626df76aSbellard done 24731e31b8aSbellard 24834bb443eSAnthony LiguoriVERSION ?= $(shell cat VERSION) 24934bb443eSAnthony Liguori 25034bb443eSAnthony Liguoridist: qemu-$(VERSION).tar.bz2 25134bb443eSAnthony Liguori 25234bb443eSAnthony Liguoriqemu-%.tar.bz2: 25334bb443eSAnthony Liguori $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" 25434bb443eSAnthony Liguori 2557d13299dSbellarddistclean: clean 256fc8e320eSMagnus Damm rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi 25776cad711SPaolo Bonzini rm -f config-all-devices.mak config-all-disas.mak 258fc8e320eSMagnus Damm rm -f roms/seabios/config.mak roms/vgabios/config.mak 2597a734b8fSBrad Hards rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi 2607a734b8fSBrad Hards rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys 2617a734b8fSBrad Hards rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp 2627a734b8fSBrad Hards rm -f qemu-doc.vr 263793553acSAlexandre Raymond rm -f config.log 26467ed96f9SPeter Maydell rm -f linux-headers/asm 265e1a068b2SHidetoshi Seto 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 266*8e98e2e8SPaolo Bonzini for d in $(TARGET_DIRS); do \ 267bc1b050dSbellard rm -rf $$d || exit 1 ; \ 26876bc6838Sbellard done 269a85903ffSWenchao Xia if test -f pixman/config.log; then make -C pixman distclean; fi 2707d13299dSbellard 271fed4a9adSbellardKEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ 272fed4a9adSbellardar de en-us fi fr-be hr it lv nl pl ru th \ 273471fbf4aSFrédéric Boiteuxcommon de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ 274471fbf4aSFrédéric Boiteuxbepo 275fed4a9adSbellard 27677755340Sthsifdef INSTALL_BLOBS 2776329866fSPaolo BonziniBLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ 2787943a2faSGerd Hoffmannvgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \ 2793b3d448eSGerd Hoffmannppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \ 2805ee8ad71SAlex Williamsonpxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ 2815ee8ad71SAlex Williamsonpxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ 28294b26294SStefan Weilqemu-icon.bmp \ 28300914b7dSMichal Simekbamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ 2842a2af967SJan Kiszkamultiboot.bin linuxboot.bin kvmvapic.bin \ 28539ac8455SDavid Gibsons390-zipl.rom \ 286753d11f2SRichard Hendersonspapr-rtas.bin slof.bin \ 287753d11f2SRichard Hendersonpalcode-clipper 28877755340Sthselse 28977755340SthsBLOBS= 29077755340Sthsendif 29177755340Sths 29238954dcaSpbrookinstall-doc: $(DOCS) 293d7dd65baSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" 294d7dd65baSEduardo Habkost $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)" 2950cd23fccSBruce Rogers $(INSTALL_DATA) QMP/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" 29696d409ebSJuan Quintelaifdef CONFIG_POSIX 29758f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" 29858f8aeadSaliguori $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" 29958f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" 30058f8aeadSaliguori $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" 30138954dcaSpbrookendif 302a2d8f1beSM. Mohan Kumarifdef CONFIG_VIRTFS 303a2d8f1beSM. Mohan Kumar $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" 304a2d8f1beSM. Mohan Kumar $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1" 305a2d8f1beSM. Mohan Kumarendif 306b5ec5ce0Sjohn cooper 307e2d87bffSEduardo Habkostinstall-datadir: 308e2d87bffSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" 309e2d87bffSEduardo Habkost 310e2d87bffSEduardo Habkostinstall-confdir: 311e2d87bffSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" 312e2d87bffSEduardo Habkost 313e2d87bffSEduardo Habkostinstall-sysconfig: install-datadir install-confdir 314e2d87bffSEduardo Habkost $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" 315e2d87bffSEduardo Habkost 316e2d87bffSEduardo Habkostinstall: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir 31758f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(bindir)" 318932a79dfSthsifneq ($(TOOLS),) 31958f8aeadSaliguori $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" 320932a79dfSthsendif 3217b93fadfSCorey Bryantifneq ($(HELPERS-y),) 3227b93fadfSCorey Bryant $(INSTALL_DIR) "$(DESTDIR)$(libexecdir)" 3237b93fadfSCorey Bryant $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)" 3247b93fadfSCorey Bryantendif 32577755340Sthsifneq ($(BLOBS),) 32677755340Sths set -e; for x in $(BLOBS); do \ 3276aae2a2eSEduardo Habkost $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ 328ad064840Spbrook done 32977755340Sthsendif 3306aae2a2eSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" 33118be8d77Sblueswir1 set -e; for x in $(KEYMAPS); do \ 3326aae2a2eSEduardo Habkost $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ 333ad064840Spbrook done 334626df76aSbellard for d in $(TARGET_DIRS); do \ 3357d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 336626df76aSbellard done 337612384d7Sbellard 338367e86e8Sbellard# various test targets 3399b0b8203Sbellardtest speed: all 340c09015ddSAnthony Liguori $(MAKE) -C tests/tcg $@ 34131e31b8aSbellard 34221d4e8e3SAlexandre Bique.PHONY: TAGS 343367e86e8SbellardTAGS: 34421d4e8e3SAlexandre Bique find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags 34531e31b8aSbellard 3466688bc6dSbellardcscope: 3476688bc6dSbellard rm -f ./cscope.* 34845b75ae4SAlexandre Raymond find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files 3496688bc6dSbellard cscope -b 3506688bc6dSbellard 3513ef693a0Sbellard# documentation 35201668d98SStefan WeilMAKEINFO=makeinfo 35301668d98SStefan WeilMAKEINFOFLAGS=--no-headers --no-split --number-sections 35420cc9997SStefan WeilTEXIFLAG=$(if $(V),,--quiet) 35520cc9997SStefan Weil%.dvi: %.texi 35620cc9997SStefan Weil $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@") 35720cc9997SStefan Weil 3581f673135Sbellard%.html: %.texi 359952ef67cSStefan Weil $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \ 36001668d98SStefan Weil " GEN $@") 3613ef693a0Sbellard 362f3548328Sbellard%.info: %.texi 36301668d98SStefan Weil $(call quiet-command,$(MAKEINFO) $< -o $@," GEN $@") 364f3548328Sbellard 36520cc9997SStefan Weil%.pdf: %.texi 36620cc9997SStefan Weil $(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@") 3675824d651Sblueswir1 3685824d651Sblueswir1qemu-options.texi: $(SRC_PATH)/qemu-options.hx 3694c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 370f3548328Sbellard 371acd0a093SLuiz Capitulinoqemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx 3724c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 3732313086aSBlue Swirl 37482a56f0dSLuiz CapitulinoQMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx 3754c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@") 376b40292e7SJan Kiszka 377153859beSStuart Bradyqemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx 3784c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 379153859beSStuart Brady 3802313086aSBlue Swirlqemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi 3810d00e563Saliguori $(call quiet-command, \ 3824c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ 3833179d694SMichael Tokarev $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \ 3840d00e563Saliguori " GEN $@") 3855a67135aSbellard 386153859beSStuart Bradyqemu-img.1: qemu-img.texi qemu-img-cmds.texi 3870d00e563Saliguori $(call quiet-command, \ 3884c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \ 3893179d694SMichael Tokarev $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \ 3900d00e563Saliguori " GEN $@") 391acd935efSbellard 392a2d8f1beSM. Mohan Kumarfsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi 393a2d8f1beSM. Mohan Kumar $(call quiet-command, \ 394a2d8f1beSM. Mohan Kumar perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \ 3953179d694SMichael Tokarev $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \ 396a2d8f1beSM. Mohan Kumar " GEN $@") 397a2d8f1beSM. Mohan Kumar 3987a5ca864Sbellardqemu-nbd.8: qemu-nbd.texi 3990d00e563Saliguori $(call quiet-command, \ 4004c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \ 4013179d694SMichael Tokarev $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \ 4020d00e563Saliguori " GEN $@") 4037a5ca864Sbellard 4040cb3fb1eSpbrookdvi: qemu-doc.dvi qemu-tech.dvi 4050cb3fb1eSpbrookhtml: qemu-doc.html qemu-tech.html 40620cc9997SStefan Weilinfo: qemu-doc.info qemu-tech.info 40720cc9997SStefan Weilpdf: qemu-doc.pdf qemu-tech.pdf 4080cb3fb1eSpbrook 40920cc9997SStefan Weilqemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ 41020cc9997SStefan Weil qemu-img.texi qemu-nbd.texi qemu-options.texi \ 41120cc9997SStefan Weil qemu-monitor.texi qemu-img-cmds.texi 412818220f5Saliguori 413cb5fc67dSAnthony Liguori# Add a dependency on the generated files, so that they are always 414cb5fc67dSAnthony Liguori# rebuilt before other object files 4157748b8cbSMike Frysingerifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) 416cb5fc67dSAnthony LiguoriMakefile: $(GENERATED_HEADERS) 4177748b8cbSMike Frysingerendif 418cb5fc67dSAnthony Liguori 4194fb240a4Sbellard# Include automatically generated dependency files 4201435ddb8SPaolo Bonzini# Dependencies in Makefile.objs files come from our recursive subdir rules 4211435ddb8SPaolo Bonzini-include $(wildcard *.d tests/*.d) 422