xref: /openbmc/qemu/Makefile (revision 33ad161a)
10cb3fb1eSpbrook# Makefile for QEMU.
20cb3fb1eSpbrook
355d7e8f6Saurel32ifneq ($(wildcard config-host.mak),)
41ad2134fSPaul Brook# Put the all: rule here so that config-host.mak can contain dependencies.
51ad2134fSPaul Brookall: build-all
6ad064840Spbrookinclude config-host.mak
717759187Saliguoriinclude $(SRC_PATH)/rules.mak
8e5efe7f5SJuan Quintelaconfig-host.mak: configure
9e5efe7f5SJuan Quintela	@echo $@ is out-of-date, running configure
10e5efe7f5SJuan Quintela	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
1155d7e8f6Saurel32else
1255d7e8f6Saurel32config-host.mak:
1355d7e8f6Saurel32	@echo "Please call configure before running make!"
1455d7e8f6Saurel32	@exit 1
1555d7e8f6Saurel32endif
16766a487aSbellard
17d9ace8b3SJuan Quintela# Don't try to regenerate Makefile or configure
18d9ace8b3SJuan Quintela# We don't generate any of them
19d9ace8b3SJuan QuintelaMakefile: ;
20d9ace8b3SJuan Quintelaconfigure: ;
21d9ace8b3SJuan Quintela
22818220f5Saliguori.PHONY: all clean cscope distclean dvi html info install install-doc \
239c927650SJuan Quintela	recurse-all speed tar tarbin test build-all
240cb3fb1eSpbrook
258c462f8fSpbrookVPATH=$(SRC_PATH):$(SRC_PATH)/hw
268c462f8fSpbrook
273e2e0e6bSJuan QuintelaLIBS+=-lz $(LIBS_TOOLS)
2867c0f08dSJuan Quintela
29cc8ae6deSpbrookifdef BUILD_DOCS
307a5ca864SbellardDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
31cc8ae6deSpbrookelse
32cc8ae6deSpbrookDOCS=
33cc8ae6deSpbrookendif
347d13299dSbellard
351215c6e7SJuan QuintelaSUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
361f3d3c8fSJuan QuintelaSUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
371f3d3c8fSJuan Quintela
381f3d3c8fSJuan Quintelaconfig-all-devices.mak: $(SUBDIR_DEVICES_MAK)
391f3d3c8fSJuan Quintela	$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep "=y$$" | sort -u > $@,"  GEN  $@")
401f3d3c8fSJuan Quintela
411f3d3c8fSJuan Quintela-include config-all-devices.mak
421215c6e7SJuan Quintela
43581d45f0SStefan Weilbuild-all: config-host.h config-all-devices.h $(DOCS) $(TOOLS)
44581d45f0SStefan Weil	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) recurse-all,)
45b9dea4fbSpbrook
461215c6e7SJuan Quintelaconfig-host.h: config-host.h-timestamp
471215c6e7SJuan Quintelaconfig-host.h-timestamp: config-host.mak
481215c6e7SJuan Quintela
49fe0d4d3fSJuan Quintelaconfig-all-devices.h: config-all-devices.h-timestamp
50fe0d4d3fSJuan Quintelaconfig-all-devices.h-timestamp: config-all-devices.mak
51fe0d4d3fSJuan Quintela
52cec7d0b6SpbrookSUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
53cec7d0b6Spbrook
54fe0d4d3fSJuan Quintelasubdir-%: config-host.h config-all-devices.h
550087375eSPaul Brook	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
564aa42531Spbrook
57cec7d0b6Spbrook$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
58c05ac895SPaul Brook
59add16157SBlue Swirl$(filter %-user,$(SUBDIR_RULES)): libuser.a
60add16157SBlue Swirl
61add16157SBlue Swirllibuser.a:
626a8a2803SBlue Swirl	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libuser V="$(V)" TARGET_DIR="libuser/" all,)
63add16157SBlue Swirl
64c05ac895SPaul BrookROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
65c05ac895SPaul Brookromsubdir-%:
66c05ac895SPaul Brook	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
67c05ac895SPaul Brook
68c05ac895SPaul BrookALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
69c05ac895SPaul Brook
70c05ac895SPaul Brookrecurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
714aa42531Spbrook
72faf07963Spbrook#######################################################################
73319f08eaSJuan Quintela# block-obj-y is code used by both qemu system emulation and qemu-img
74faf07963Spbrook
75319f08eaSJuan Quintelablock-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
76a25a0ef5SAnthony Liguoriblock-obj-y += nbd.o block.o aio.o aes.o osdep.o
774dd75c70SChristoph Hellwigblock-obj-$(CONFIG_POSIX) += posix-aio-compat.o
785c6c3a6cSChristoph Hellwigblock-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
791a65ba76SJuan Quintela
809aebd98aSStefan Weilblock-nested-y += cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
811a65ba76SJuan Quintelablock-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
821a65ba76SJuan Quintelablock-nested-y += parallels.o nbd.o
83eeb6d45bSJuan Quintelablock-nested-$(CONFIG_WIN32) += raw-win32.o
84eeb6d45bSJuan Quintelablock-nested-$(CONFIG_POSIX) += raw-posix.o
851a65ba76SJuan Quintelablock-nested-$(CONFIG_CURL) += curl.o
861a65ba76SJuan Quintela
871a65ba76SJuan Quintelablock-obj-y +=  $(addprefix block/, $(block-nested-y))
88769ce76dSAlexander Graf
89e1144d00SMark McLoughlinnet-obj-y = net.o
907200ac3cSMark McLoughlinnet-nested-y = queue.o checksum.o
91*33ad161aSMark McLoughlinnet-nested-$(CONFIG_WIN32) += tap-win32.o
92e1144d00SMark McLoughlinnet-obj-y += $(addprefix net/, $(net-nested-y))
93e1144d00SMark McLoughlin
944fb240a4Sbellard######################################################################
952e2ea909Sbellard# libqemu_common.a: Target independent part of system emulation. The
964fb240a4Sbellard# long term path is to suppress *all* target specific code in case of
974fb240a4Sbellard# system emulation, i.e. a single QEMU executable should support all
984fb240a4Sbellard# CPUs and machines.
9947cea614Sbellard
1006ef859b3SJuan Quintelaobj-y = $(block-obj-y)
101e1144d00SMark McLoughlinobj-y += $(net-obj-y)
10234005a00SKirill A. Shutemovobj-y += readline.o console.o
103cd01b4a3Saliguori
104c2b023b6SBlue Swirlobj-y += tcg-runtime.o host-utils.o
1055f74377cSJuan Quintelaobj-y += irq.o ioport.o
1065f74377cSJuan Quintelaobj-$(CONFIG_PTIMER) += ptimer.o
107ae573db3SJuan Quintelaobj-$(CONFIG_MAX7310) += max7310.o
108976ca9abSJuan Quintelaobj-$(CONFIG_WM8750) += wm8750.o
10992eb6b4eSJuan Quintelaobj-$(CONFIG_TWL92230) += twl92230.o
1103c848e2aSJuan Quintelaobj-$(CONFIG_TSC2005) += tsc2005.o
11103aba0e3SJuan Quintelaobj-$(CONFIG_LM832X) += lm832x.o
112d9b44620SJuan Quintelaobj-$(CONFIG_TMP105) += tmp105.o
1134aa5b83fSJuan Quintelaobj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
1146a559be5SJuan Quintelaobj-$(CONFIG_SSD0303) += ssd0303.o
11554bcf074SJuan Quintelaobj-$(CONFIG_SSD0323) += ssd0323.o
11620a4afc4SJuan Quintelaobj-$(CONFIG_ADS7846) += ads7846.o
117ee99ca01SJuan Quintelaobj-$(CONFIG_MAX111X) += max111x.o
118ee99ca01SJuan Quintelaobj-y += i2c.o smbus.o smbus_eeprom.o
119d9b44620SJuan Quintelaobj-y += eeprom93xx.o
1206ef859b3SJuan Quintelaobj-y += scsi-disk.o cdrom.o
121d52affa7SGerd Hoffmannobj-y += scsi-generic.o scsi-bus.o
1226ef859b3SJuan Quintelaobj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
123806b6024SGerd Hoffmannobj-y += usb-serial.o usb-net.o usb-bus.o
124c62c4551SJuan Quintelaobj-$(CONFIG_SSI) += ssi.o
12593a60400SJuan Quintelaobj-$(CONFIG_SSI_SD) += ssi-sd.o
126b21fd8e6SJuan Quintelaobj-$(CONFIG_SD) += sd.o
1276ef859b3SJuan Quintelaobj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
1286ef859b3SJuan Quintelaobj-y += bt-hci-csr.o
129f7105843SMark McLoughlinobj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o
1307200ac3cSMark McLoughlinobj-y += qemu-char.o aio.o savevm.o
1316ef859b3SJuan Quintelaobj-y += msmouse.o ps2.o
132c62c4551SJuan Quintelaobj-y += qdev.o qdev-properties.o
133a6fd08ebSLuiz Capitulinoobj-y += qint.o qstring.o qdict.o qlist.o qemu-config.o
13487ecb68bSpbrook
1350e22fd2fSJuan Quintelaobj-$(CONFIG_BRLAPI) += baum.o
1365ac1fad3SPaolo Bonziniobj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
1374fb240a4Sbellard
13898b068a9SJuan Quintelaaudio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
1390e22fd2fSJuan Quintela
1400e22fd2fSJuan Quintelaaudio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
1410e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_SDL) += sdlaudio.o
1420e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_OSS) += ossaudio.o
1430e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_COREAUDIO) += coreaudio.o
1440e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_ALSA) += alsaaudio.o
1450e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
1460e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_FMOD) += fmodaudio.o
1470e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_ESD) += esdaudio.o
1480e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_PA) += paaudio.o
149d5631638Smalcaudio-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
15067f86e8eSJuan Quintelaaudio-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
151d5631638Smalcaudio-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
152eda959bdSJuan Quintelaaudio-obj-y += wavcapture.o
1536ef859b3SJuan Quintelaobj-y += $(addprefix audio/, $(audio-obj-y))
1544fb240a4Sbellard
1556ef859b3SJuan Quintelaobj-y += keymaps.o
1560e22fd2fSJuan Quintelaobj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
1570e22fd2fSJuan Quintelaobj-$(CONFIG_CURSES) += curses.o
1586ef859b3SJuan Quintelaobj-y += vnc.o acl.o d3des.o
1590e22fd2fSJuan Quintelaobj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
1600e22fd2fSJuan Quintelaobj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
1610e22fd2fSJuan Quintelaobj-$(CONFIG_COCOA) += cocoa.o
1620e22fd2fSJuan Quintelaobj-$(CONFIG_IOTHREAD) += qemu-thread.o
163e5d355d1Saliguori
164f835ed1cSJuan Quintelaslirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
165f835ed1cSJuan Quintelaslirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
166f835ed1cSJuan Quintelaslirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
1670e22fd2fSJuan Quintelaobj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
1684fb240a4Sbellard
1692567f579SBlue Swirl# xen backend driver support
1700e22fd2fSJuan Quintelaobj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
1710e22fd2fSJuan Quintelaobj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
1722567f579SBlue Swirl
173a558ee17SJuan QuintelaQEMU_CFLAGS+=$(CURL_CFLAGS)
174769ce76dSAlexander Graf
1754fb240a4Sbellardcocoa.o: cocoa.m
1764fb240a4Sbellard
1770483755aSaliguorikeymaps.o: keymaps.c keymaps.h
1780483755aSaliguori
179c18a2c36SStefano Stabellinisdl_zoom.o: sdl_zoom.c sdl_zoom.h sdl_zoom_template.h
180c18a2c36SStefano Stabellini
181c18a2c36SStefano Stabellinisdl.o: sdl.c keymaps.h sdl_keysym.h sdl_zoom.h
182807544e2Saliguori
183a558ee17SJuan Quintelasdl.o audio/sdlaudio.o sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
1844fb240a4Sbellard
18576655d6dSaliguoriacl.o: acl.h acl.c
18676655d6dSaliguori
1872f9606b3Saliguorivnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
1885fb6c7a8Saliguori
18976655d6dSaliguorivnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
190807544e2Saliguori
191a558ee17SJuan Quintelavnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
1924fb240a4Sbellard
1935fb6c7a8Saliguorivnc-tls.o: vnc-tls.c vnc.h
1945fb6c7a8Saliguori
1955fb6c7a8Saliguorivnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
1965fb6c7a8Saliguori
1972f9606b3Saliguorivnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
1982f9606b3Saliguori
1990483755aSaliguoricurses.o: curses.c keymaps.h curses_keys.h
2004d3b6f6eSbalrog
201a558ee17SJuan Quintelabt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
2024fb240a4Sbellard
2036ef859b3SJuan Quintelalibqemu_common.a: $(obj-y)
2044fb240a4Sbellard
2054fb240a4Sbellard######################################################################
2064fb240a4Sbellard
207153859beSStuart Bradyqemu-img.o: qemu-img-cmds.h
208153859beSStuart Brady
209a25a0ef5SAnthony Liguoriqemu-img$(EXESUF): qemu-img.o qemu-tool.o $(block-obj-y)
2104fb240a4Sbellard
211a25a0ef5SAnthony Liguoriqemu-nbd$(EXESUF):  qemu-nbd.o qemu-tool.o $(block-obj-y)
2123aa892d7Saliguori
213a25a0ef5SAnthony Liguoriqemu-io$(EXESUF):  qemu-io.o qemu-tool.o cmd.o $(block-obj-y)
2140a8e1acdSaliguori
215153859beSStuart Bradyqemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
216153859beSStuart Brady	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
217153859beSStuart Brady
21833837ba6SLuiz Capitulinocheck-qint: check-qint.o qint.o qemu-malloc.o
2195de65a07SLuiz Capitulinocheck-qstring: check-qstring.o qstring.o qemu-malloc.o
2207b8c51adSLuiz Capitulinocheck-qdict: check-qdict.o qdict.o qint.o qstring.o qemu-malloc.o
2213aa3dcffSLuiz Capitulinocheck-qlist: check-qlist.o qlist.o qint.o qemu-malloc.o
22233837ba6SLuiz Capitulino
22331e31b8aSbellardclean:
2242d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files
22525be210fSJuan 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
22686e840eeSaurel32	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
227e1144d00SMark McLoughlin	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d
22807b44ce9SBlue Swirl	rm -f qemu-img-cmds.h
2297d3505c5Sbellard	$(MAKE) -C tests clean
230add16157SBlue Swirl	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
2317d3505c5Sbellard	$(MAKE) -C $$d $@ || exit 1 ; \
232626df76aSbellard        done
23331e31b8aSbellard
2347d13299dSbellarddistclean: clean
2351215c6e7SJuan Quintela	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
2361f3d3c8fSJuan Quintela	rm -f config-all-devices.mak config-all-devices.h*
2370cb3fb1eSpbrook	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
238add16157SBlue Swirl	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
239bc1b050dSbellard	rm -rf $$d || exit 1 ; \
24076bc6838Sbellard        done
2417d13299dSbellard
242fed4a9adSbellardKEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
243fed4a9adSbellardar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
244fed4a9adSbellardcommon  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
245fed4a9adSbellard
24677755340Sthsifdef INSTALL_BLOBS
24777755340SthsBLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
248e5d01b06Saurel32video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
249e5d01b06Saurel32pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
250253d0942SAlexander Grafbamboo.dtb petalogix-s3adsp1800.dtb \
251253d0942SAlexander Grafmultiboot.bin
25277755340Sthselse
25377755340SthsBLOBS=
25477755340Sthsendif
25577755340Sths
25638954dcaSpbrookinstall-doc: $(DOCS)
25758f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
25858f8aeadSaliguori	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
25996d409ebSJuan Quintelaifdef CONFIG_POSIX
26058f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
26158f8aeadSaliguori	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
26258f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
26358f8aeadSaliguori	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
26438954dcaSpbrookendif
26538954dcaSpbrook
26638954dcaSpbrookinstall: all $(if $(BUILD_DOCS),install-doc)
26758f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
268932a79dfSthsifneq ($(TOOLS),)
26958f8aeadSaliguori	$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
270932a79dfSthsendif
27177755340Sthsifneq ($(BLOBS),)
27258f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
27377755340Sths	set -e; for x in $(BLOBS); do \
27458f8aeadSaliguori		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
275ad064840Spbrook	done
27677755340Sthsendif
27758f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
27818be8d77Sblueswir1	set -e; for x in $(KEYMAPS); do \
27979fd42aaSAnthony Liguori		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
280ad064840Spbrook	done
281626df76aSbellard	for d in $(TARGET_DIRS); do \
2827d3505c5Sbellard	$(MAKE) -C $$d $@ || exit 1 ; \
283626df76aSbellard        done
284612384d7Sbellard
285367e86e8Sbellard# various test targets
2869b0b8203Sbellardtest speed: all
2877d3505c5Sbellard	$(MAKE) -C tests $@
28831e31b8aSbellard
28921d4e8e3SAlexandre Bique.PHONY: TAGS
290367e86e8SbellardTAGS:
29121d4e8e3SAlexandre Bique	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
29231e31b8aSbellard
2936688bc6dSbellardcscope:
2946688bc6dSbellard	rm -f ./cscope.*
295ede46085Saurel32	find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
2966688bc6dSbellard	cscope -b
2976688bc6dSbellard
2983ef693a0Sbellard# documentation
2991f673135Sbellard%.html: %.texi
3000d00e563Saliguori	$(call quiet-command,texi2html -I=. -monolithic -number $<,"  GEN   $@")
3013ef693a0Sbellard
302f3548328Sbellard%.info: %.texi
3030d00e563Saliguori	$(call quiet-command,makeinfo -I . $< -o $@,"  GEN   $@")
304f3548328Sbellard
305f3548328Sbellard%.dvi: %.texi
3060d00e563Saliguori	$(call quiet-command,texi2dvi -I . $<,"  GEN   $@")
3075824d651Sblueswir1
3085824d651Sblueswir1qemu-options.texi: $(SRC_PATH)/qemu-options.hx
3090d00e563Saliguori	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
310f3548328Sbellard
3112313086aSBlue Swirlqemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
3122313086aSBlue Swirl	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
3132313086aSBlue Swirl
314153859beSStuart Bradyqemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
315153859beSStuart Brady	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
316153859beSStuart Brady
3172313086aSBlue Swirlqemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
3180d00e563Saliguori	$(call quiet-command, \
3190d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
3200d00e563Saliguori	  pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
3210d00e563Saliguori	  "  GEN   $@")
3225a67135aSbellard
323153859beSStuart Bradyqemu-img.1: qemu-img.texi qemu-img-cmds.texi
3240d00e563Saliguori	$(call quiet-command, \
3250d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
3260d00e563Saliguori	  pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
3270d00e563Saliguori	  "  GEN   $@")
328acd935efSbellard
3297a5ca864Sbellardqemu-nbd.8: qemu-nbd.texi
3300d00e563Saliguori	$(call quiet-command, \
3310d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
3320d00e563Saliguori	  pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
3330d00e563Saliguori	  "  GEN   $@")
3347a5ca864Sbellard
3350cb3fb1eSpbrookinfo: qemu-doc.info qemu-tech.info
3360cb3fb1eSpbrook
3370cb3fb1eSpbrookdvi: qemu-doc.dvi qemu-tech.dvi
3380cb3fb1eSpbrook
3390cb3fb1eSpbrookhtml: qemu-doc.html qemu-tech.html
3400cb3fb1eSpbrook
341153859beSStuart Bradyqemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-monitor.texi qemu-img-cmds.texi
342818220f5Saliguori
343df5cf721SthsVERSION ?= $(shell cat VERSION)
344df5cf721SthsFILE = qemu-$(VERSION)
345586314f2Sbellard
3461e43adfcSbellard# tar release (use 'make -k tar' on a checkouted tree)
347586314f2Sbellardtar:
348586314f2Sbellard	rm -rf /tmp/$(FILE)
3491e43adfcSbellard	cp -r . /tmp/$(FILE)
35099c6c082Saurel32	cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
351586314f2Sbellard	rm -rf /tmp/$(FILE)
352586314f2Sbellard
35376b62fd0Sbellard# generate a binary distribution
354d691f669Sbellardtarbin:
35518be8d77Sblueswir1	cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
35643095f31Sbellard	$(bindir)/qemu \
35743095f31Sbellard	$(bindir)/qemu-system-x86_64 \
35840e8a53bSaurel32	$(bindir)/qemu-system-arm \
35940e8a53bSaurel32	$(bindir)/qemu-system-cris \
36040e8a53bSaurel32	$(bindir)/qemu-system-m68k \
361bc6291a1SEdgar E. Iglesias	$(bindir)/qemu-system-microblaze \
36293856aacSbellard	$(bindir)/qemu-system-mips \
36338260998Spbrook	$(bindir)/qemu-system-mipsel \
364fbe4f65bSths	$(bindir)/qemu-system-mips64 \
365fbe4f65bSths	$(bindir)/qemu-system-mips64el \
36640e8a53bSaurel32	$(bindir)/qemu-system-ppc \
36740e8a53bSaurel32	$(bindir)/qemu-system-ppcemb \
36840e8a53bSaurel32	$(bindir)/qemu-system-ppc64 \
369ff1aaf65Sths	$(bindir)/qemu-system-sh4 \
37085ffbdfcSths	$(bindir)/qemu-system-sh4eb \
37140e8a53bSaurel32	$(bindir)/qemu-system-sparc \
3727efa4387Sbellard	$(bindir)/qemu-i386 \
373f0403c03Sbellard	$(bindir)/qemu-x86_64 \
37440e8a53bSaurel32	$(bindir)/qemu-alpha \
3757efa4387Sbellard	$(bindir)/qemu-arm \
376ea31eb5bSbellard	$(bindir)/qemu-armeb \
37740e8a53bSaurel32	$(bindir)/qemu-cris \
37840e8a53bSaurel32	$(bindir)/qemu-m68k \
379bc6291a1SEdgar E. Iglesias	$(bindir)/qemu-microblaze \
38040e8a53bSaurel32	$(bindir)/qemu-mips \
38140e8a53bSaurel32	$(bindir)/qemu-mipsel \
3827efa4387Sbellard	$(bindir)/qemu-ppc \
383d4082e95Sj_mayer	$(bindir)/qemu-ppc64 \
384f0403c03Sbellard	$(bindir)/qemu-ppc64abi32 \
385ff1aaf65Sths	$(bindir)/qemu-sh4 \
38685ffbdfcSths	$(bindir)/qemu-sh4eb \
38740e8a53bSaurel32	$(bindir)/qemu-sparc \
38840e8a53bSaurel32	$(bindir)/qemu-sparc64 \
38940e8a53bSaurel32	$(bindir)/qemu-sparc32plus \
390b932cabaSbellard	$(bindir)/qemu-img \
3917a5ca864Sbellard	$(bindir)/qemu-nbd \
3927efa4387Sbellard	$(datadir)/bios.bin \
3937efa4387Sbellard	$(datadir)/vgabios.bin \
394de9258a8Sbellard	$(datadir)/vgabios-cirrus.bin \
395637f6cd7Sbellard	$(datadir)/ppc_rom.bin \
396d5295253Sbellard	$(datadir)/video.x \
3970986ac3bSbellard	$(datadir)/openbios-sparc32 \
398938255d2Sblueswir1	$(datadir)/openbios-sparc64 \
399e5d01b06Saurel32	$(datadir)/openbios-ppc \
40019c80e50Sbellard	$(datadir)/pxe-ne2k_pci.bin \
40119c80e50Sbellard	$(datadir)/pxe-rtl8139.bin \
40219c80e50Sbellard	$(datadir)/pxe-pcnet.bin \
4032991990bSaliguori	$(datadir)/pxe-e1000.bin \
4041f50f8d1Sbellard	$(docdir)/qemu-doc.html \
4051f50f8d1Sbellard	$(docdir)/qemu-tech.html \
40640e8a53bSaurel32	$(mandir)/man1/qemu.1 \
40740e8a53bSaurel32	$(mandir)/man1/qemu-img.1 \
4087a5ca864Sbellard	$(mandir)/man8/qemu-nbd.8
409d691f669Sbellard
4104fb240a4Sbellard# Include automatically generated dependency files
411e1144d00SMark McLoughlin-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d)
412