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 6df2943baSMichael S. TsirkinGENERATED_HEADERS = config-host.h trace.h qemu-options.def 7b3d08c02SDaniel P. Berrangeifeq ($(TRACE_BACKEND),dtrace) 8b3d08c02SDaniel P. BerrangeGENERATED_HEADERS += trace-dtrace.h 9b3d08c02SDaniel P. Berrangeendif 10e3193601SAnthony LiguoriGENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h 11f527c579SJuan Quintela 1255d7e8f6Saurel32ifneq ($(wildcard config-host.mak),) 131ad2134fSPaul Brook# Put the all: rule here so that config-host.mak can contain dependencies. 141ad2134fSPaul Brookall: build-all 15ad064840Spbrookinclude config-host.mak 1617759187Saliguoriinclude $(SRC_PATH)/rules.mak 1759bc10eeSPaolo Bonziniconfig-host.mak: $(SRC_PATH)/configure 18e5efe7f5SJuan Quintela @echo $@ is out-of-date, running configure 19e5efe7f5SJuan Quintela @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh 2055d7e8f6Saurel32else 2155d7e8f6Saurel32config-host.mak: 2255d7e8f6Saurel32 @echo "Please call configure before running make!" 2355d7e8f6Saurel32 @exit 1 2455d7e8f6Saurel32endif 25766a487aSbellard 26d9ace8b3SJuan Quintela# Don't try to regenerate Makefile or configure 27d9ace8b3SJuan Quintela# We don't generate any of them 28d9ace8b3SJuan QuintelaMakefile: ; 29d9ace8b3SJuan Quintelaconfigure: ; 30d9ace8b3SJuan Quintela 31818220f5Saliguori.PHONY: all clean cscope distclean dvi html info install install-doc \ 3220cc9997SStefan Weil pdf recurse-all speed tar tarbin test build-all 330cb3fb1eSpbrook 34076d2471SPaolo Bonzini$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw) 358c462f8fSpbrook 363e2e0e6bSJuan QuintelaLIBS+=-lz $(LIBS_TOOLS) 3767c0f08dSJuan Quintela 38cc8ae6deSpbrookifdef BUILD_DOCS 39b40292e7SJan KiszkaDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt 40cc8ae6deSpbrookelse 41cc8ae6deSpbrookDOCS= 42cc8ae6deSpbrookendif 437d13299dSbellard 44388d4758SLluís VilanovaSUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) 451f3d3c8fSJuan QuintelaSUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) 46bd9141bbSPaul BrookSUBDIR_DEVICES_MAK_DEP=$(patsubst %, %/config-devices.mak.d, $(TARGET_DIRS)) 471f3d3c8fSJuan Quintela 481f3d3c8fSJuan Quintelaconfig-all-devices.mak: $(SUBDIR_DEVICES_MAK) 4901d86a85SStefan Weil $(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@," GEN $@") 501f3d3c8fSJuan Quintela 51bd9141bbSPaul Brook-include $(SUBDIR_DEVICES_MAK_DEP) 52bd9141bbSPaul Brook 53a992fe3dSPaul Brook%/config-devices.mak: default-configs/%.mak 544c3b5a48SBlue Swirl $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, " GEN $@") 55a992fe3dSPaul Brook @if test -f $@; then \ 56904fe1fbSBlue Swirl if cmp -s $@.old $@; then \ 57012f0879SStefan Weil mv $@.tmp $@; \ 58012f0879SStefan Weil cp -p $@ $@.old; \ 59012f0879SStefan Weil else \ 60012f0879SStefan Weil if test -f $@.old; then \ 61012f0879SStefan Weil echo "WARNING: $@ (user modified) out of date.";\ 62012f0879SStefan Weil else \ 63a992fe3dSPaul Brook echo "WARNING: $@ out of date.";\ 64012f0879SStefan Weil fi; \ 6563e86b2eSStefan Weil echo "Run \"make defconfig\" to regenerate."; \ 66a992fe3dSPaul Brook rm $@.tmp; \ 67012f0879SStefan Weil fi; \ 68a992fe3dSPaul Brook else \ 69a992fe3dSPaul Brook mv $@.tmp $@; \ 70012f0879SStefan Weil cp -p $@ $@.old; \ 71a992fe3dSPaul Brook fi 72a992fe3dSPaul Brook 73a992fe3dSPaul Brookdefconfig: 74a992fe3dSPaul Brook rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) 75a992fe3dSPaul Brook 761f3d3c8fSJuan Quintela-include config-all-devices.mak 771215c6e7SJuan Quintela 78fffbeb75SGerd Hoffmannbuild-all: $(DOCS) $(TOOLS) $(CHECKS) recurse-all 79b9dea4fbSpbrook 801215c6e7SJuan Quintelaconfig-host.h: config-host.h-timestamp 811215c6e7SJuan Quintelaconfig-host.h-timestamp: config-host.mak 82e14056adSBlue Swirlqemu-options.def: $(SRC_PATH)/qemu-options.hx 834c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 841215c6e7SJuan Quintela 85cec7d0b6SpbrookSUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) 86cec7d0b6Spbrook 87f527c579SJuan Quintelasubdir-%: $(GENERATED_HEADERS) 880087375eSPaul Brook $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) 894aa42531Spbrook 90b88bc808SStefan Weilifneq ($(wildcard config-host.mak),) 910e8c9214SAndreas Färberinclude $(SRC_PATH)/Makefile.objs 92b88bc808SStefan Weilendif 930e8c9214SAndreas Färber 940e8c9214SAndreas Färber$(common-obj-y): $(GENERATED_HEADERS) 9541a74826SAnthony Liguorisubdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o 966774e44aSPaolo Bonzini 9791f16900SAndreas Färber$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis 98c05ac895SPaul Brook 9991f16900SAndreas Färber$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser 100add16157SBlue Swirl 101c05ac895SPaul BrookROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) 102c05ac895SPaul Brookromsubdir-%: 103c05ac895SPaul Brook $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",) 104c05ac895SPaul Brook 105c05ac895SPaul BrookALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) 106c05ac895SPaul Brook 107c05ac895SPaul Brookrecurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) 1084aa42531Spbrook 10998b068a9SJuan Quintelaaudio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS) 1100e22fd2fSJuan Quintela 111a558ee17SJuan QuintelaQEMU_CFLAGS+=$(CURL_CFLAGS) 112769ce76dSAlexander Graf 113e18df141SAnthony LiguoriQEMU_CFLAGS+=$(GLIB_CFLAGS) 114e18df141SAnthony Liguori 1153e230dd2SCorentin Charyui/cocoa.o: ui/cocoa.m 1164fb240a4Sbellard 1173e230dd2SCorentin Charyui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) 1180483755aSaliguori 1193e230dd2SCorentin Charyui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS) 1204d3b6f6eSbalrog 121a558ee17SJuan Quintelabt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) 1224fb240a4Sbellard 1237948a665SBlue Swirlversion.o: $(SRC_PATH)/version.rc config-host.h 1249fe6de94SBlue Swirl $(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@") 1259fe6de94SBlue Swirl 1269fe6de94SBlue Swirlversion-obj-$(CONFIG_WIN32) += version.o 1274fb240a4Sbellard###################################################################### 12844dc0ca3SAlon Levy# Support building shared library libcacard 12944dc0ca3SAlon Levy 13044dc0ca3SAlon Levy.PHONY: libcacard.la install-libcacard 13144dc0ca3SAlon Levyifeq ($(LIBTOOL),) 13244dc0ca3SAlon Levylibcacard.la: 13344dc0ca3SAlon Levy @echo "libtool is missing, please install and rerun configure"; exit 1 13444dc0ca3SAlon Levy 13544dc0ca3SAlon Levyinstall-libcacard: 13644dc0ca3SAlon Levy @echo "libtool is missing, please install and rerun configure"; exit 1 13744dc0ca3SAlon Levyelse 13892f562ecSAnthony Liguorilibcacard.la: $(GENERATED_HEADERS) $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y))) 13944dc0ca3SAlon Levy $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,) 14044dc0ca3SAlon Levy 14144dc0ca3SAlon Levyinstall-libcacard: libcacard.la 14244dc0ca3SAlon Levy $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,) 14344dc0ca3SAlon Levyendif 14444dc0ca3SAlon Levy###################################################################### 1454fb240a4Sbellard 1463c089e15SJuan Quintelaqemu-img.o: qemu-img-cmds.h 14748ff7a62SMichael Rothqemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o qemu-ga.o: $(GENERATED_HEADERS) 148153859beSStuart Brady 1494ab328d6SPaolo Bonzinitools-obj-y = qemu-tool.o $(oslib-obj-y) $(trace-obj-y) \ 1504ab328d6SPaolo Bonzini qemu-timer-common.o cutils.o 1514fb240a4Sbellard 1524ab328d6SPaolo Bonziniqemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y) 1534ab328d6SPaolo Bonziniqemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y) $(block-obj-y) 1544ab328d6SPaolo Bonziniqemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y) 1550a8e1acdSaliguori 156153859beSStuart Bradyqemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx 1574c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") 158153859beSStuart Brady 159aa7ee42eSStefan Hajnoczicheck-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS) 1604091da4bSJan Kiszka 1614ab328d6SPaolo Bonzinicheck-qint: check-qint.o qint.o $(tools-obj-y) 1624ab328d6SPaolo Bonzinicheck-qstring: check-qstring.o qstring.o $(tools-obj-y) 1634ab328d6SPaolo Bonzinicheck-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y) 1644ab328d6SPaolo Bonzinicheck-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y) 1654ab328d6SPaolo Bonzinicheck-qfloat: check-qfloat.o qfloat.o $(tools-obj-y) 1664ab328d6SPaolo Bonzinicheck-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y) 1674ab328d6SPaolo Bonzinitest-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y) 16833837ba6SLuiz Capitulino 169640e5404SMichael Roth$(qapi-obj-y): $(GENERATED_HEADERS) 170640e5404SMichael Rothqapi-dir := qapi-generated 171e3d4d252SMichael Rothtest-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir) 172957f1f99SMichael Rothqemu-ga$(EXESUF): LIBS = $(LIBS_QGA) 173640e5404SMichael Roth 174640e5404SMichael Roth$(qapi-dir)/test-qapi-types.c: $(qapi-dir)/test-qapi-types.h 175640e5404SMichael Roth$(qapi-dir)/test-qapi-types.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py 176c886edfbSBlue Swirl $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-" < $<, " GEN $@") 177640e5404SMichael Roth$(qapi-dir)/test-qapi-visit.c: $(qapi-dir)/test-qapi-visit.h 178640e5404SMichael Roth$(qapi-dir)/test-qapi-visit.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py 179c886edfbSBlue Swirl $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-" < $<, " GEN $@") 18069ed8366SMichael Roth$(qapi-dir)/test-qmp-commands.h: $(qapi-dir)/test-qmp-marshal.c 18169ed8366SMichael Roth$(qapi-dir)/test-qmp-marshal.c: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py 182c886edfbSBlue Swirl $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-" < $<, " GEN $@") 183640e5404SMichael Roth 184e3d4d252SMichael Roth$(qapi-dir)/qga-qapi-types.c: $(qapi-dir)/qga-qapi-types.h 185e3d4d252SMichael Roth$(qapi-dir)/qga-qapi-types.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py 186c886edfbSBlue Swirl $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@") 187e3d4d252SMichael Roth$(qapi-dir)/qga-qapi-visit.c: $(qapi-dir)/qga-qapi-visit.h 188e3d4d252SMichael Roth$(qapi-dir)/qga-qapi-visit.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py 189c886edfbSBlue Swirl $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@") 190e3193601SAnthony Liguori$(qapi-dir)/qga-qmp-commands.h: $(qapi-dir)/qga-qmp-marshal.c 191e3d4d252SMichael Roth$(qapi-dir)/qga-qmp-marshal.c: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py 192c886edfbSBlue Swirl $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@") 193e3d4d252SMichael Roth 194e3193601SAnthony Liguoriqapi-types.c: qapi-types.h 195e3193601SAnthony Liguoriqapi-types.h: $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py 196e3193601SAnthony Liguori $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "." < $<, " GEN $@") 197e3193601SAnthony Liguoriqapi-visit.c: qapi-visit.h 198e3193601SAnthony Liguoriqapi-visit.h: $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py 199e3193601SAnthony Liguori $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "." < $<, " GEN $@") 200e3193601SAnthony Liguoriqmp-commands.h: qmp-marshal.c 201e3193601SAnthony Liguoriqmp-marshal.c: $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py 202e3193601SAnthony Liguori $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -m -o "." < $<, " GEN $@") 203e3193601SAnthony Liguori 204640e5404SMichael Rothtest-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) 2054ab328d6SPaolo Bonzinitest-visitor: test-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o 206640e5404SMichael Roth 20769ed8366SMichael Rothtest-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y) 2084ab328d6SPaolo Bonzinitest-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o 20969ed8366SMichael Roth 210016c77adSMichael RothQGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c) 211016c77adSMichael Roth$(QGALIB_GEN): $(GENERATED_HEADERS) 212957f1f99SMichael Roth$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) 213957f1f99SMichael Roth 2144ab328d6SPaolo Bonziniqemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qobject-obj-y) $(version-obj-y) $(addprefix $(qapi-dir)/, qga-qapi-visit.o qga-qapi-types.o qga-qmp-marshal.o) 21548ff7a62SMichael Roth 216111a38b0SRobert RelyeaQEMULIBS=libhw32 libhw64 libuser libdis libdis-user 217111a38b0SRobert Relyea 21831e31b8aSbellardclean: 2192d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files 22025be210fSJuan 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 221df2943baSMichael S. Tsirkin rm -f qemu-options.def 222fffbeb75SGerd Hoffmann rm -f *.o *.d *.a *.lo $(TOOLS) $(CHECKS) qemu-ga TAGS cscope.* *.pod *~ */*~ 22344dc0ca3SAlon Levy rm -Rf .libs 22413a286d5SMichael Roth rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d 22507b44ce9SBlue Swirl rm -f qemu-img-cmds.h 226edb47ec4SLluís rm -f trace/*.o trace/*.d 227d7489b72SBlue Swirl rm -f trace.c trace.h trace.c-timestamp trace.h-timestamp 228b3d08c02SDaniel P. Berrange rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp 229b3d08c02SDaniel P. Berrange rm -f trace-dtrace.h trace-dtrace.h-timestamp 230640e5404SMichael Roth rm -rf $(qapi-dir) 2317d3505c5Sbellard $(MAKE) -C tests clean 232111a38b0SRobert Relyea for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \ 233fc8e320eSMagnus Damm if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ 234df2943baSMichael S. Tsirkin rm -f $$d/qemu-options.def; \ 235626df76aSbellard done 23631e31b8aSbellard 2377d13299dSbellarddistclean: clean 238fc8e320eSMagnus Damm rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi 239a992fe3dSPaul Brook rm -f config-all-devices.mak 240fc8e320eSMagnus Damm rm -f roms/seabios/config.mak roms/vgabios/config.mak 2417a734b8fSBrad Hards rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi 2427a734b8fSBrad Hards rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys 2437a734b8fSBrad Hards rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp 2447a734b8fSBrad Hards rm -f qemu-doc.vr 245793553acSAlexandre Raymond rm -f config.log 246e1a068b2SHidetoshi 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 247111a38b0SRobert Relyea for d in $(TARGET_DIRS) $(QEMULIBS); do \ 248bc1b050dSbellard rm -rf $$d || exit 1 ; \ 24976bc6838Sbellard done 2507d13299dSbellard 251fed4a9adSbellardKEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ 252fed4a9adSbellardar de en-us fi fr-be hr it lv nl pl ru th \ 253fed4a9adSbellardcommon de-ch es fo fr-ca hu ja mk nl-be pt sl tr 254fed4a9adSbellard 25577755340Sthsifdef INSTALL_BLOBS 256*6329866fSPaolo BonziniBLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ 2577943a2faSGerd Hoffmannvgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \ 2583b3d448eSGerd Hoffmannppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \ 2595ee8ad71SAlex Williamsonpxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ 2605ee8ad71SAlex Williamsonpxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ 26100914b7dSMichal Simekbamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ 262fbd659b7SAlexander Grafmpc8544ds.dtb \ 263fe270d04SAlexander Grafmultiboot.bin linuxboot.bin \ 26439ac8455SDavid Gibsons390-zipl.rom \ 265753d11f2SRichard Hendersonspapr-rtas.bin slof.bin \ 266753d11f2SRichard Hendersonpalcode-clipper 26777755340Sthselse 26877755340SthsBLOBS= 26977755340Sthsendif 27077755340Sths 27138954dcaSpbrookinstall-doc: $(DOCS) 27258f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(docdir)" 27358f8aeadSaliguori $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" 27496d409ebSJuan Quintelaifdef CONFIG_POSIX 27558f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" 27658f8aeadSaliguori $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" 27758f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" 27858f8aeadSaliguori $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" 27938954dcaSpbrookendif 28038954dcaSpbrook 281b5ec5ce0Sjohn cooperinstall-sysconfig: 282990caaf1SAndre Przywara $(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu" 283990caaf1SAndre Przywara $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu" 284b5ec5ce0Sjohn cooper 285b5ec5ce0Sjohn cooperinstall: all $(if $(BUILD_DOCS),install-doc) install-sysconfig 28658f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(bindir)" 287932a79dfSthsifneq ($(TOOLS),) 28858f8aeadSaliguori $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" 289932a79dfSthsendif 29077755340Sthsifneq ($(BLOBS),) 29158f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(datadir)" 29277755340Sths set -e; for x in $(BLOBS); do \ 29358f8aeadSaliguori $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ 294ad064840Spbrook done 29577755340Sthsendif 29658f8aeadSaliguori $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps" 29718be8d77Sblueswir1 set -e; for x in $(KEYMAPS); do \ 29879fd42aaSAnthony Liguori $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ 299ad064840Spbrook done 300626df76aSbellard for d in $(TARGET_DIRS); do \ 3017d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 302626df76aSbellard done 303612384d7Sbellard 304367e86e8Sbellard# various test targets 3059b0b8203Sbellardtest speed: all 3067d3505c5Sbellard $(MAKE) -C tests $@ 30731e31b8aSbellard 308ea7f7804SGerd Hoffmann.PHONY: check 309ea7f7804SGerd Hoffmanncheck: $(patsubst %,run-check-%,$(CHECKS)) 310ea7f7804SGerd Hoffmann 311ea7f7804SGerd Hoffmannrun-check-%: % 312ea7f7804SGerd Hoffmann ./$< 313ea7f7804SGerd Hoffmann 31421d4e8e3SAlexandre Bique.PHONY: TAGS 315367e86e8SbellardTAGS: 31621d4e8e3SAlexandre Bique find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags 31731e31b8aSbellard 3186688bc6dSbellardcscope: 3196688bc6dSbellard rm -f ./cscope.* 32045b75ae4SAlexandre Raymond find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files 3216688bc6dSbellard cscope -b 3226688bc6dSbellard 3233ef693a0Sbellard# documentation 32401668d98SStefan WeilMAKEINFO=makeinfo 32501668d98SStefan WeilMAKEINFOFLAGS=--no-headers --no-split --number-sections 32620cc9997SStefan WeilTEXIFLAG=$(if $(V),,--quiet) 32720cc9997SStefan Weil%.dvi: %.texi 32820cc9997SStefan Weil $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@") 32920cc9997SStefan Weil 3301f673135Sbellard%.html: %.texi 33101668d98SStefan Weil $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \ 33201668d98SStefan Weil " GEN $@") 3333ef693a0Sbellard 334f3548328Sbellard%.info: %.texi 33501668d98SStefan Weil $(call quiet-command,$(MAKEINFO) $< -o $@," GEN $@") 336f3548328Sbellard 33720cc9997SStefan Weil%.pdf: %.texi 33820cc9997SStefan Weil $(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@") 3395824d651Sblueswir1 3405824d651Sblueswir1qemu-options.texi: $(SRC_PATH)/qemu-options.hx 3414c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 342f3548328Sbellard 343acd0a093SLuiz Capitulinoqemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx 3444c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 3452313086aSBlue Swirl 34682a56f0dSLuiz CapitulinoQMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx 3474c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@") 348b40292e7SJan Kiszka 349153859beSStuart Bradyqemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx 3504c3b5a48SBlue Swirl $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") 351153859beSStuart Brady 3522313086aSBlue Swirlqemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi 3530d00e563Saliguori $(call quiet-command, \ 3544c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ 3550d00e563Saliguori pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \ 3560d00e563Saliguori " GEN $@") 3575a67135aSbellard 358153859beSStuart Bradyqemu-img.1: qemu-img.texi qemu-img-cmds.texi 3590d00e563Saliguori $(call quiet-command, \ 3604c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \ 3610d00e563Saliguori pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \ 3620d00e563Saliguori " GEN $@") 363acd935efSbellard 3647a5ca864Sbellardqemu-nbd.8: qemu-nbd.texi 3650d00e563Saliguori $(call quiet-command, \ 3664c3b5a48SBlue Swirl perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \ 3670d00e563Saliguori pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \ 3680d00e563Saliguori " GEN $@") 3697a5ca864Sbellard 3700cb3fb1eSpbrookdvi: qemu-doc.dvi qemu-tech.dvi 3710cb3fb1eSpbrookhtml: qemu-doc.html qemu-tech.html 37220cc9997SStefan Weilinfo: qemu-doc.info qemu-tech.info 37320cc9997SStefan Weilpdf: qemu-doc.pdf qemu-tech.pdf 3740cb3fb1eSpbrook 37520cc9997SStefan Weilqemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ 37620cc9997SStefan Weil qemu-img.texi qemu-nbd.texi qemu-options.texi \ 37720cc9997SStefan Weil qemu-monitor.texi qemu-img-cmds.texi 378818220f5Saliguori 379df5cf721SthsVERSION ?= $(shell cat VERSION) 380df5cf721SthsFILE = qemu-$(VERSION) 381586314f2Sbellard 3821e43adfcSbellard# tar release (use 'make -k tar' on a checkouted tree) 383586314f2Sbellardtar: 384586314f2Sbellard rm -rf /tmp/$(FILE) 3851e43adfcSbellard cp -r . /tmp/$(FILE) 38699c6c082Saurel32 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn 387586314f2Sbellard rm -rf /tmp/$(FILE) 388586314f2Sbellard 3894fb240a4Sbellard# Include automatically generated dependency files 39048ff7a62SMichael Roth-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d) 391