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 1117759187Saliguoriinclude $(SRC_PATH)/rules.mak 1259bc10eeSPaolo Bonziniconfig-host.mak: $(SRC_PATH)/configure 13e5efe7f5SJuan Quintela @echo $@ is out-of-date, running configure 14e5efe7f5SJuan Quintela @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh 1555d7e8f6Saurel32else 1655d7e8f6Saurel32config-host.mak: 17*7748b8cbSMike Frysingerifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) 1855d7e8f6Saurel32 @echo "Please call configure before running make!" 1955d7e8f6Saurel32 @exit 1 2055d7e8f6Saurel32endif 21*7748b8cbSMike Frysingerendif 22766a487aSbellard 23250b086eSLluís VilanovaGENERATED_HEADERS = config-host.h trace.h qemu-options.def 24250b086eSLluís Vilanovaifeq ($(TRACE_BACKEND),dtrace) 25250b086eSLluís VilanovaGENERATED_HEADERS += trace-dtrace.h 26250b086eSLluís Vilanovaendif 27250b086eSLluís VilanovaGENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h 2819ac36b5SLluís VilanovaGENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c trace.c 29250b086eSLluís Vilanova 30d9ace8b3SJuan Quintela# Don't try to regenerate Makefile or configure 31d9ace8b3SJuan Quintela# We don't generate any of them 32d9ace8b3SJuan QuintelaMakefile: ; 33d9ace8b3SJuan Quintelaconfigure: ; 34d9ace8b3SJuan Quintela 35818220f5Saliguori.PHONY: all clean cscope distclean dvi html info install install-doc \ 3634bb443eSAnthony Liguori pdf recurse-all speed test dist 370cb3fb1eSpbrook 38fec90ff0SPaolo Bonzini$(call set-vpath, $(SRC_PATH)) 398c462f8fSpbrook 403e2e0e6bSJuan QuintelaLIBS+=-lz $(LIBS_TOOLS) 4167c0f08dSJuan Quintela 427b93fadfSCorey BryantHELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) 437b93fadfSCorey Bryant 44cc8ae6deSpbrookifdef BUILD_DOCS 45b40292e7SJan KiszkaDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt 46983eef5aSMeador Ingeifdef CONFIG_VIRTFS 47a2d8f1beSM. Mohan KumarDOCS+=fsdev/virtfs-proxy-helper.1 48983eef5aSMeador Ingeendif 49cc8ae6deSpbrookelse 50cc8ae6deSpbrookDOCS= 51cc8ae6deSpbrookendif 527d13299dSbellard 53388d4758SLluís VilanovaSUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) 541f3d3c8fSJuan QuintelaSUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) 55bd9141bbSPaul BrookSUBDIR_DEVICES_MAK_DEP=$(patsubst %, %/config-devices.mak.d, $(TARGET_DIRS)) 561f3d3c8fSJuan Quintela 578bdd3d49SStefan Weilifeq ($(SUBDIR_DEVICES_MAK),) 588bdd3d49SStefan Weilconfig-all-devices.mak: 598bdd3d49SStefan Weil $(call quiet-command,echo '# no devices' > $@," GEN $@") 608bdd3d49SStefan Weilelse 611f3d3c8fSJuan Quintelaconfig-all-devices.mak: $(SUBDIR_DEVICES_MAK) 6201d86a85SStefan Weil $(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@," GEN $@") 638bdd3d49SStefan Weilendif 641f3d3c8fSJuan Quintela 65bd9141bbSPaul Brook-include $(SUBDIR_DEVICES_MAK_DEP) 66bd9141bbSPaul Brook 67a992fe3dSPaul Brook%/config-devices.mak: default-configs/%.mak 684c3b5a48SBlue Swirl $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, " GEN $@") 69a992fe3dSPaul Brook @if test -f $@; then \ 70904fe1fbSBlue Swirl if cmp -s $@.old $@; then \ 71012f0879SStefan Weil mv $@.tmp $@; \ 72012f0879SStefan Weil cp -p $@ $@.old; \ 73012f0879SStefan Weil else \ 74012f0879SStefan Weil if test -f $@.old; then \ 75012f0879SStefan Weil echo "WARNING: $@ (user modified) out of date.";\ 76012f0879SStefan Weil else \ 77a992fe3dSPaul Brook echo "WARNING: $@ out of date.";\ 78012f0879SStefan Weil fi; \ 7963e86b2eSStefan Weil echo "Run \"make defconfig\" to regenerate."; \ 80a992fe3dSPaul Brook rm $@.tmp; \ 81012f0879SStefan Weil fi; \ 82a992fe3dSPaul Brook else \ 83a992fe3dSPaul Brook mv $@.tmp $@; \ 84012f0879SStefan Weil cp -p $@ $@.old; \ 85a992fe3dSPaul Brook fi 86a992fe3dSPaul Brook 87a992fe3dSPaul Brookdefconfig: 88a992fe3dSPaul Brook rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) 89a992fe3dSPaul Brook 901f3d3c8fSJuan Quintela-include config-all-devices.mak 911215c6e7SJuan Quintela 928f67aa82SStefan Weilall: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all 93b9dea4fbSpbrook 941215c6e7SJuan Quintelaconfig-host.h: config-host.h-timestamp 951215c6e7SJuan Quintelaconfig-host.h-timestamp: config-host.mak 96e14056adSBlue Swirlqemu-options.def: $(SRC_PATH)/qemu-options.hx 974c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 981215c6e7SJuan Quintela 99cec7d0b6SpbrookSUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) 100cec7d0b6Spbrook 1014115852bSPaolo Bonzinisubdir-%: 1020087375eSPaul Brook $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) 1034aa42531Spbrook 104b88bc808SStefan Weilifneq ($(wildcard config-host.mak),) 1050e8c9214SAndreas Färberinclude $(SRC_PATH)/Makefile.objs 106b88bc808SStefan Weilendif 1070e8c9214SAndreas Färber 10841a74826SAnthony Liguorisubdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o 1096774e44aSPaolo Bonzini 110ee20477dSPaolo Bonzini$(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis 111c05ac895SPaul Brook 1124115852bSPaolo Bonzini$(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser 113add16157SBlue Swirl 114c05ac895SPaul BrookROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) 115c05ac895SPaul Brookromsubdir-%: 116c05ac895SPaul Brook $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",) 117c05ac895SPaul Brook 118c05ac895SPaul BrookALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) 119c05ac895SPaul Brook 120c05ac895SPaul Brookrecurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) 1214aa42531Spbrook 12298b068a9SJuan Quintelaaudio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS) 1230e22fd2fSJuan Quintela 124a558ee17SJuan QuintelaQEMU_CFLAGS+=$(CURL_CFLAGS) 125769ce76dSAlexander Graf 1262f28d2ffSAnthony LiguoriQEMU_CFLAGS += -I$(SRC_PATH)/include 1272f28d2ffSAnthony Liguori 1283e230dd2SCorentin Charyui/cocoa.o: ui/cocoa.m 1294fb240a4Sbellard 1303d5a3f9aSPaolo Bonziniui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o hw/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) 1310483755aSaliguori 1323e230dd2SCorentin Charyui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS) 1334d3b6f6eSbalrog 134a558ee17SJuan Quintelabt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) 1354fb240a4Sbellard 1367948a665SBlue Swirlversion.o: $(SRC_PATH)/version.rc config-host.h 1379fe6de94SBlue Swirl $(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@") 1389fe6de94SBlue Swirl 1399fe6de94SBlue Swirlversion-obj-$(CONFIG_WIN32) += version.o 1404fb240a4Sbellard###################################################################### 14144dc0ca3SAlon Levy# Support building shared library libcacard 14244dc0ca3SAlon Levy 14344dc0ca3SAlon Levy.PHONY: libcacard.la install-libcacard 14444dc0ca3SAlon Levyifeq ($(LIBTOOL),) 14544dc0ca3SAlon Levylibcacard.la: 14644dc0ca3SAlon Levy @echo "libtool is missing, please install and rerun configure"; exit 1 14744dc0ca3SAlon Levy 14844dc0ca3SAlon Levyinstall-libcacard: 14944dc0ca3SAlon Levy @echo "libtool is missing, please install and rerun configure"; exit 1 15044dc0ca3SAlon Levyelse 1514115852bSPaolo Bonzinilibcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y))) 15244dc0ca3SAlon Levy $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,) 15344dc0ca3SAlon Levy 15444dc0ca3SAlon Levyinstall-libcacard: libcacard.la 15544dc0ca3SAlon Levy $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,) 15644dc0ca3SAlon Levyendif 15700c705fbSPaolo Bonzini 15844dc0ca3SAlon Levy###################################################################### 1594fb240a4Sbellard 1603c089e15SJuan Quintelaqemu-img.o: qemu-img-cmds.h 161153859beSStuart Brady 162cbcfa041SPaolo Bonzinitools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \ 1633d9b4925SMichael Tokarev qemu-timer-common.o main-loop.o notify.o \ 1643d9b4925SMichael Tokarev iohandler.o cutils.o iov.o async.o 165cbcfa041SPaolo Bonzinitools-obj-$(CONFIG_POSIX) += compatfd.o 1664fb240a4Sbellard 167c054b3fdSBenoît Canetqemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y) $(qapi-obj-y) \ 168c054b3fdSBenoît Canet qapi-visit.o qapi-types.o 1694ab328d6SPaolo Bonziniqemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y) $(block-obj-y) 1704ab328d6SPaolo Bonziniqemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y) 1710a8e1acdSaliguori 1727b93fadfSCorey Bryantqemu-bridge-helper$(EXESUF): qemu-bridge-helper.o 1737b93fadfSCorey Bryant 174adb696f3SCorey Bryantvscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) $(tools-obj-y) qemu-timer-common.o libcacard/vscclient.o 175adb696f3SCorey Bryant $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@") 176adb696f3SCorey Bryant 177ea75fc4eSM. Mohan Kumarfsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y) 17817bff52bSM. Mohan Kumarfsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap 17917bff52bSM. Mohan Kumar 180153859beSStuart Bradyqemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx 1814c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 182153859beSStuart Brady 183957f1f99SMichael Rothqemu-ga$(EXESUF): LIBS = $(LIBS_QGA) 18454c2e502SDunrong Huangqemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated 185640e5404SMichael Roth 18619bf7c87SAvi Kivitygen-out-type = $(subst .,-,$(suffix $@)) 1878d3bc517SAvi Kivity 188e454e2e2SAndreas Färberifneq ($(wildcard config-host.mak),) 189dbfe06c6SAnthony Liguoriinclude $(SRC_PATH)/tests/Makefile 190e454e2e2SAndreas Färberendif 191640e5404SMichael Roth 1920521d375SStefan Hajnocziqapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py 1930521d375SStefan Hajnoczi 19454c2e502SDunrong Huangqga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\ 1950521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) 19654c2e502SDunrong Huang $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 19754c2e502SDunrong Huangqga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\ 1980521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) 19954c2e502SDunrong Huang $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 20054c2e502SDunrong Huangqga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\ 2010521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) 20254c2e502SDunrong Huang $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") 203e3d4d252SMichael Roth 204599825c5SMichael S. Tsirkinqapi-types.c qapi-types.h :\ 2050521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) 2068d3bc517SAvi Kivity $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@") 207599825c5SMichael S. Tsirkinqapi-visit.c qapi-visit.h :\ 2080521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) 2098d3bc517SAvi Kivity $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@") 210599825c5SMichael S. Tsirkinqmp-commands.h qmp-marshal.c :\ 2110521d375SStefan Hajnoczi$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) 2128d3bc517SAvi Kivity $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@") 213e3193601SAnthony Liguori 21454c2e502SDunrong HuangQGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h) 2154115852bSPaolo Bonzini$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) 216957f1f99SMichael Roth 217cdc976b0SPaolo Bonziniqemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) 21848ff7a62SMichael Roth 219c9159fe9SStefan WeilQEMULIBS=libuser libdis libdis-user 220111a38b0SRobert Relyea 22131e31b8aSbellardclean: 2222d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files 22325be210fSJuan 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 224df2943baSMichael S. Tsirkin rm -f qemu-options.def 225e743ccecSPeter Maydell find . -name '*.[od]' -exec rm -f {} + 226e743ccecSPeter Maydell rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ 22744dc0ca3SAlon Levy rm -Rf .libs 22807b44ce9SBlue Swirl rm -f qemu-img-cmds.h 229b3d08c02SDaniel P. Berrange rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp 23019ac36b5SLluís Vilanova @# May not be present in GENERATED_HEADERS 231b3d08c02SDaniel P. Berrange rm -f trace-dtrace.h trace-dtrace.h-timestamp 23219ac36b5SLluís Vilanova rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) 23319ac36b5SLluís Vilanova rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) 2348f0e5c6bSStefan Weil rm -rf qapi-generated 23554c2e502SDunrong Huang rm -rf qga/qapi-generated 236c09015ddSAnthony Liguori $(MAKE) -C tests/tcg clean 237111a38b0SRobert Relyea for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \ 238fc8e320eSMagnus Damm if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ 239df2943baSMichael S. Tsirkin rm -f $$d/qemu-options.def; \ 240626df76aSbellard done 24131e31b8aSbellard 24234bb443eSAnthony LiguoriVERSION ?= $(shell cat VERSION) 24334bb443eSAnthony Liguori 24434bb443eSAnthony Liguoridist: qemu-$(VERSION).tar.bz2 24534bb443eSAnthony Liguori 24634bb443eSAnthony Liguoriqemu-%.tar.bz2: 24734bb443eSAnthony Liguori $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" 24834bb443eSAnthony Liguori 2497d13299dSbellarddistclean: clean 250fc8e320eSMagnus Damm rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi 251a992fe3dSPaul Brook rm -f config-all-devices.mak 252fc8e320eSMagnus Damm rm -f roms/seabios/config.mak roms/vgabios/config.mak 2537a734b8fSBrad Hards rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi 2547a734b8fSBrad Hards rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys 2557a734b8fSBrad Hards rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp 2567a734b8fSBrad Hards rm -f qemu-doc.vr 257793553acSAlexandre Raymond rm -f config.log 25867ed96f9SPeter Maydell rm -f linux-headers/asm 259e1a068b2SHidetoshi 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 260111a38b0SRobert Relyea for d in $(TARGET_DIRS) $(QEMULIBS); do \ 261bc1b050dSbellard rm -rf $$d || exit 1 ; \ 26276bc6838Sbellard done 2637d13299dSbellard 264fed4a9adSbellardKEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ 265fed4a9adSbellardar de en-us fi fr-be hr it lv nl pl ru th \ 266471fbf4aSFrédéric Boiteuxcommon de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ 267471fbf4aSFrédéric Boiteuxbepo 268fed4a9adSbellard 26977755340Sthsifdef INSTALL_BLOBS 2706329866fSPaolo BonziniBLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ 2717943a2faSGerd Hoffmannvgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \ 2723b3d448eSGerd Hoffmannppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \ 2735ee8ad71SAlex Williamsonpxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ 2745ee8ad71SAlex Williamsonpxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ 27594b26294SStefan Weilqemu-icon.bmp \ 27600914b7dSMichal Simekbamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ 2772a2af967SJan Kiszkamultiboot.bin linuxboot.bin kvmvapic.bin \ 27839ac8455SDavid Gibsons390-zipl.rom \ 279753d11f2SRichard Hendersonspapr-rtas.bin slof.bin \ 280753d11f2SRichard Hendersonpalcode-clipper 28177755340Sthselse 28277755340SthsBLOBS= 28377755340Sthsendif 28477755340Sths 28538954dcaSpbrookinstall-doc: $(DOCS) 286d7dd65baSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" 287d7dd65baSEduardo Habkost $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)" 2880cd23fccSBruce Rogers $(INSTALL_DATA) QMP/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" 28996d409ebSJuan Quintelaifdef CONFIG_POSIX 29058f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" 29158f8aeadSaliguori $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" 29258f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" 29358f8aeadSaliguori $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" 29438954dcaSpbrookendif 295a2d8f1beSM. Mohan Kumarifdef CONFIG_VIRTFS 296a2d8f1beSM. Mohan Kumar $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" 297a2d8f1beSM. Mohan Kumar $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1" 298a2d8f1beSM. Mohan Kumarendif 299b5ec5ce0Sjohn cooper 300e2d87bffSEduardo Habkostinstall-datadir: 301e2d87bffSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" 302e2d87bffSEduardo Habkost 303e2d87bffSEduardo Habkostinstall-confdir: 304e2d87bffSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" 305e2d87bffSEduardo Habkost 306e2d87bffSEduardo Habkostinstall-sysconfig: install-datadir install-confdir 307e2d87bffSEduardo Habkost $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" 308e2d87bffSEduardo Habkost 309e2d87bffSEduardo Habkostinstall: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir 31058f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(bindir)" 311932a79dfSthsifneq ($(TOOLS),) 31258f8aeadSaliguori $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" 313932a79dfSthsendif 3147b93fadfSCorey Bryantifneq ($(HELPERS-y),) 3157b93fadfSCorey Bryant $(INSTALL_DIR) "$(DESTDIR)$(libexecdir)" 3167b93fadfSCorey Bryant $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)" 3177b93fadfSCorey Bryantendif 31877755340Sthsifneq ($(BLOBS),) 31977755340Sths set -e; for x in $(BLOBS); do \ 3206aae2a2eSEduardo Habkost $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ 321ad064840Spbrook done 32277755340Sthsendif 3236aae2a2eSEduardo Habkost $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" 32418be8d77Sblueswir1 set -e; for x in $(KEYMAPS); do \ 3256aae2a2eSEduardo Habkost $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ 326ad064840Spbrook done 327626df76aSbellard for d in $(TARGET_DIRS); do \ 3287d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 329626df76aSbellard done 330612384d7Sbellard 331367e86e8Sbellard# various test targets 3329b0b8203Sbellardtest speed: all 333c09015ddSAnthony Liguori $(MAKE) -C tests/tcg $@ 33431e31b8aSbellard 33521d4e8e3SAlexandre Bique.PHONY: TAGS 336367e86e8SbellardTAGS: 33721d4e8e3SAlexandre Bique find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags 33831e31b8aSbellard 3396688bc6dSbellardcscope: 3406688bc6dSbellard rm -f ./cscope.* 34145b75ae4SAlexandre Raymond find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files 3426688bc6dSbellard cscope -b 3436688bc6dSbellard 3443ef693a0Sbellard# documentation 34501668d98SStefan WeilMAKEINFO=makeinfo 34601668d98SStefan WeilMAKEINFOFLAGS=--no-headers --no-split --number-sections 34720cc9997SStefan WeilTEXIFLAG=$(if $(V),,--quiet) 34820cc9997SStefan Weil%.dvi: %.texi 34920cc9997SStefan Weil $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@") 35020cc9997SStefan Weil 3511f673135Sbellard%.html: %.texi 352952ef67cSStefan Weil $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \ 35301668d98SStefan Weil " GEN $@") 3543ef693a0Sbellard 355f3548328Sbellard%.info: %.texi 35601668d98SStefan Weil $(call quiet-command,$(MAKEINFO) $< -o $@," GEN $@") 357f3548328Sbellard 35820cc9997SStefan Weil%.pdf: %.texi 35920cc9997SStefan Weil $(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@") 3605824d651Sblueswir1 3615824d651Sblueswir1qemu-options.texi: $(SRC_PATH)/qemu-options.hx 3624c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 363f3548328Sbellard 364acd0a093SLuiz Capitulinoqemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx 3654c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 3662313086aSBlue Swirl 36782a56f0dSLuiz CapitulinoQMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx 3684c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@") 369b40292e7SJan Kiszka 370153859beSStuart Bradyqemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx 3714c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 372153859beSStuart Brady 3732313086aSBlue Swirlqemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi 3740d00e563Saliguori $(call quiet-command, \ 3754c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ 3763179d694SMichael Tokarev $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \ 3770d00e563Saliguori " GEN $@") 3785a67135aSbellard 379153859beSStuart Bradyqemu-img.1: qemu-img.texi qemu-img-cmds.texi 3800d00e563Saliguori $(call quiet-command, \ 3814c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \ 3823179d694SMichael Tokarev $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \ 3830d00e563Saliguori " GEN $@") 384acd935efSbellard 385a2d8f1beSM. Mohan Kumarfsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi 386a2d8f1beSM. Mohan Kumar $(call quiet-command, \ 387a2d8f1beSM. Mohan Kumar perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \ 3883179d694SMichael Tokarev $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \ 389a2d8f1beSM. Mohan Kumar " GEN $@") 390a2d8f1beSM. Mohan Kumar 3917a5ca864Sbellardqemu-nbd.8: qemu-nbd.texi 3920d00e563Saliguori $(call quiet-command, \ 3934c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \ 3943179d694SMichael Tokarev $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \ 3950d00e563Saliguori " GEN $@") 3967a5ca864Sbellard 3970cb3fb1eSpbrookdvi: qemu-doc.dvi qemu-tech.dvi 3980cb3fb1eSpbrookhtml: qemu-doc.html qemu-tech.html 39920cc9997SStefan Weilinfo: qemu-doc.info qemu-tech.info 40020cc9997SStefan Weilpdf: qemu-doc.pdf qemu-tech.pdf 4010cb3fb1eSpbrook 40220cc9997SStefan Weilqemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ 40320cc9997SStefan Weil qemu-img.texi qemu-nbd.texi qemu-options.texi \ 40420cc9997SStefan Weil qemu-monitor.texi qemu-img-cmds.texi 405818220f5Saliguori 406cb5fc67dSAnthony Liguori# Add a dependency on the generated files, so that they are always 407cb5fc67dSAnthony Liguori# rebuilt before other object files 408*7748b8cbSMike Frysingerifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) 409cb5fc67dSAnthony LiguoriMakefile: $(GENERATED_HEADERS) 410*7748b8cbSMike Frysingerendif 411cb5fc67dSAnthony Liguori 4124fb240a4Sbellard# Include automatically generated dependency files 4131435ddb8SPaolo Bonzini# Dependencies in Makefile.objs files come from our recursive subdir rules 4141435ddb8SPaolo Bonzini-include $(wildcard *.d tests/*.d) 415