xref: /openbmc/qemu/Makefile (revision 9aebd98a)
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
855d7e8f6Saurel32else
955d7e8f6Saurel32config-host.mak:
1055d7e8f6Saurel32	@echo "Please call configure before running make!"
1155d7e8f6Saurel32	@exit 1
1255d7e8f6Saurel32endif
13766a487aSbellard
14818220f5Saliguori.PHONY: all clean cscope distclean dvi html info install install-doc \
15818220f5Saliguori	recurse-all speed tar tarbin test
160cb3fb1eSpbrook
178c462f8fSpbrookVPATH=$(SRC_PATH):$(SRC_PATH)/hw
188c462f8fSpbrook
1996935aa4SmalcCPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
204fb240a4SbellardCPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
214a244704SAnthony LiguoriCPPFLAGS += -U_FORTIFY_SOURCE
22766a487aSbellardLIBS=
2367c0f08dSJuan Quintela
24cc8ae6deSpbrookifdef BUILD_DOCS
257a5ca864SbellardDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
26cc8ae6deSpbrookelse
27cc8ae6deSpbrookDOCS=
28cc8ae6deSpbrookendif
297d13299dSbellard
30e5d355d1SaliguoriLIBS+=$(PTHREADLIBS)
31e5d355d1SaliguoriLIBS+=$(CLOCKLIBS)
3283f64091Sbellard
337e00eb9bSaliguoriifdef CONFIG_SOLARIS
347e00eb9bSaliguoriLIBS+=-lsocket -lnsl -lresolv
357e00eb9bSaliguoriendif
367e00eb9bSaliguori
3703ff3ca3Saliguoriifdef CONFIG_WIN32
3803ff3ca3SaliguoriLIBS+=-lwinmm -lws2_32 -liphlpapi
3903ff3ca3Saliguoriendif
4003ff3ca3Saliguori
41c05ac895SPaul Brookbuild-all: $(TOOLS) $(DOCS) recurse-all
42b9dea4fbSpbrook
4355d7e8f6Saurel32config-host.mak: configure
4455d7e8f6Saurel32ifneq ($(wildcard config-host.mak),)
4555d7e8f6Saurel32	@echo $@ is out-of-date, running configure
46052ff921Sblueswir1	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
4755d7e8f6Saurel32endif
4855d7e8f6Saurel32
490087375eSPaul BrookSUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
50cec7d0b6SpbrookSUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
51cec7d0b6Spbrook
5286e840eeSaurel32subdir-%:
530087375eSPaul Brook	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
544aa42531Spbrook
55cec7d0b6Spbrook$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
56cec7d0b6Spbrook$(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
57cec7d0b6Spbrook
58c05ac895SPaul Brook
59c05ac895SPaul BrookROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
60c05ac895SPaul Brookromsubdir-%:
61c05ac895SPaul Brook	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
62c05ac895SPaul Brook
63c05ac895SPaul BrookALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
64c05ac895SPaul Brook
65c05ac895SPaul Brookrecurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
664aa42531Spbrook
67faf07963Spbrook#######################################################################
68319f08eaSJuan Quintela# block-obj-y is code used by both qemu system emulation and qemu-img
69faf07963Spbrook
70319f08eaSJuan Quintelablock-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
711a65ba76SJuan Quintelablock-obj-y += nbd.o block.o aio.o aes.o
72eeb6d45bSJuan Quintelablock-obj-$(CONFIG_AIO) += posix-aio-compat.o
731a65ba76SJuan Quintela
74*9aebd98aSStefan Weilblock-nested-y += cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
751a65ba76SJuan Quintelablock-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
761a65ba76SJuan Quintelablock-nested-y += parallels.o nbd.o
77eeb6d45bSJuan Quintelablock-nested-$(CONFIG_WIN32) += raw-win32.o
78eeb6d45bSJuan Quintelablock-nested-$(CONFIG_POSIX) += raw-posix.o
791a65ba76SJuan Quintelablock-nested-$(CONFIG_CURL) += curl.o
801a65ba76SJuan Quintela
811a65ba76SJuan Quintelablock-obj-y +=  $(addprefix block/, $(block-nested-y))
82769ce76dSAlexander Graf
834fb240a4Sbellard######################################################################
842e2ea909Sbellard# libqemu_common.a: Target independent part of system emulation. The
854fb240a4Sbellard# long term path is to suppress *all* target specific code in case of
864fb240a4Sbellard# system emulation, i.e. a single QEMU executable should support all
874fb240a4Sbellard# CPUs and machines.
8847cea614Sbellard
896ef859b3SJuan Quintelaobj-y = $(block-obj-y)
906ef859b3SJuan Quintelaobj-y += readline.o console.o
91cd01b4a3Saliguori
926ef859b3SJuan Quintelaobj-y += irq.o ptimer.o
936ef859b3SJuan Quintelaobj-y += i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
946ef859b3SJuan Quintelaobj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
956ef859b3SJuan Quintelaobj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
966ef859b3SJuan Quintelaobj-y += scsi-disk.o cdrom.o
976ef859b3SJuan Quintelaobj-y += scsi-generic.o
986ef859b3SJuan Quintelaobj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
996ef859b3SJuan Quintelaobj-y += usb-serial.o usb-net.o
1006ef859b3SJuan Quintelaobj-y += sd.o ssi-sd.o
1016ef859b3SJuan 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
1026ef859b3SJuan Quintelaobj-y += bt-hci-csr.o
1036ef859b3SJuan Quintelaobj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
1043b47612bSJuan Quintelaobj-y += qemu-char.o aio.o net-checksum.o savevm.o
1056ef859b3SJuan Quintelaobj-y += msmouse.o ps2.o
106ee6847d1SGerd Hoffmannobj-y += qdev.o qdev-properties.o ssi.o
10787ecb68bSpbrook
1080e22fd2fSJuan Quintelaobj-$(CONFIG_BRLAPI) += baum.o
1090e22fd2fSJuan Quintela
110eb82284fSJuan QuintelaLIBS+=$(BRLAPI_LIBS)
1112e4d9fb1Saurel32
112eeb6d45bSJuan Quintelaobj-$(CONFIG_WIN32) += tap-win32.o
113eeb6d45bSJuan Quintelaobj-$(CONFIG_POSIX) += migration-exec.o
1144fb240a4Sbellard
1154fb240a4Sbellardifdef CONFIG_COREAUDIO
116c6a5a71aSAnthony LiguoriAUDIO_PT = y
1174fb240a4Sbellardendif
1184fb240a4Sbellardifdef CONFIG_FMOD
1197aac6cb1SJuan Quintelaaudio/audio.o audio/fmodaudio.o: CPPFLAGS := $(FMOD_CFLAGS) $(CPPFLAGS)
1204fb240a4Sbellardendif
121ca9cc28cSbalrogifdef CONFIG_ESD
122c6a5a71aSAnthony LiguoriAUDIO_PT = y
123c6a5a71aSAnthony LiguoriAUDIO_PT_INT = y
124ca9cc28cSbalrogendif
125b8e59f18Smalcifdef CONFIG_PA
126c6a5a71aSAnthony LiguoriAUDIO_PT = y
127c6a5a71aSAnthony LiguoriAUDIO_PT_INT = y
128b8e59f18Smalcendif
129ca9cc28cSbalrogifdef AUDIO_PT
130ca9cc28cSbalrogLDFLAGS += -pthread
131ca9cc28cSbalrogendif
1320e22fd2fSJuan Quintela
1330e22fd2fSJuan Quintelaaudio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
1340e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_SDL) += sdlaudio.o
1350e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_OSS) += ossaudio.o
1360e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_COREAUDIO) += coreaudio.o
1370e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_ALSA) += alsaaudio.o
1380e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
1390e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_FMOD) += fmodaudio.o
1400e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_ESD) += esdaudio.o
1410e22fd2fSJuan Quintelaaudio-obj-$(CONFIG_PA) += paaudio.o
1420e22fd2fSJuan Quintelaaudio-obj-$(AUDIO_PT_INT) += audio_pt_int.o
143eda959bdSJuan Quintelaaudio-obj-y += wavcapture.o
1446ef859b3SJuan Quintelaobj-y += $(addprefix audio/, $(audio-obj-y))
1454fb240a4Sbellard
1466ef859b3SJuan Quintelaobj-y += keymaps.o
1470e22fd2fSJuan Quintelaobj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
1480e22fd2fSJuan Quintelaobj-$(CONFIG_CURSES) += curses.o
1496ef859b3SJuan Quintelaobj-y += vnc.o acl.o d3des.o
1500e22fd2fSJuan Quintelaobj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
1510e22fd2fSJuan Quintelaobj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
1520e22fd2fSJuan Quintelaobj-$(CONFIG_COCOA) += cocoa.o
1530e22fd2fSJuan Quintelaobj-$(CONFIG_IOTHREAD) += qemu-thread.o
154e5d355d1Saliguori
1554fb240a4Sbellardifdef CONFIG_SLIRP
1564fb240a4SbellardCPPFLAGS+=-I$(SRC_PATH)/slirp
1570e22fd2fSJuan Quintelaendif
1580e22fd2fSJuan Quintela
159f835ed1cSJuan Quintelaslirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
160f835ed1cSJuan Quintelaslirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
161f835ed1cSJuan Quintelaslirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
1620e22fd2fSJuan Quintelaobj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
1634fb240a4Sbellard
1648a16d273SthsLIBS+=$(VDE_LIBS)
1658a16d273Sths
1662567f579SBlue Swirl# xen backend driver support
1670e22fd2fSJuan Quintelaobj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
1680e22fd2fSJuan Quintelaobj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
1692567f579SBlue Swirl
170769ce76dSAlexander GrafLIBS+=$(CURL_LIBS)
171769ce76dSAlexander Graf
1724fb240a4Sbellardcocoa.o: cocoa.m
1734fb240a4Sbellard
1740483755aSaliguorikeymaps.o: keymaps.c keymaps.h
1750483755aSaliguori
176c18a2c36SStefano Stabellinisdl_zoom.o: sdl_zoom.c sdl_zoom.h sdl_zoom_template.h
177c18a2c36SStefano Stabellini
178c18a2c36SStefano Stabellinisdl.o: sdl.c keymaps.h sdl_keysym.h sdl_zoom.h
179807544e2Saliguori
18022d091b3SBlue Swirlsdl.o audio/sdlaudio.o sdl_zoom.o baum.o: CFLAGS += $(SDL_CFLAGS)
1814fb240a4Sbellard
18276655d6dSaliguoriacl.o: acl.h acl.c
18376655d6dSaliguori
1842f9606b3Saliguorivnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
1855fb6c7a8Saliguori
18676655d6dSaliguorivnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
187807544e2Saliguori
188525061bfSJuan Quintelavnc.o: CFLAGS += $(VNC_TLS_CFLAGS)
1894fb240a4Sbellard
1905fb6c7a8Saliguorivnc-tls.o: vnc-tls.c vnc.h
1915fb6c7a8Saliguori
1925fb6c7a8Saliguorivnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
1935fb6c7a8Saliguori
1942f9606b3Saliguorivnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
1952f9606b3Saliguori
1960483755aSaliguoricurses.o: curses.c keymaps.h curses_keys.h
1974d3b6f6eSbalrog
198ef7635ecSJuan Quintelabt-host.o: CFLAGS += $(BLUEZ_CFLAGS)
1994fb240a4Sbellard
2006ef859b3SJuan Quintelalibqemu_common.a: $(obj-y)
2014fb240a4Sbellard
202cec7d0b6Spbrook#######################################################################
203e11b1dceSJuan Quintela# user-obj-y is code used by qemu userspace emulation
204e11b1dceSJuan Quintelauser-obj-y = cutils.o cache-utils.o
205cec7d0b6Spbrook
206e11b1dceSJuan Quintelalibqemu_user.a: $(user-obj-y)
207cec7d0b6Spbrook
2084fb240a4Sbellard######################################################################
2094fb240a4Sbellard
210153859beSStuart Bradyqemu-img.o: qemu-img-cmds.h
211153859beSStuart Brady
212319f08eaSJuan Quintelaqemu-img$(EXESUF): qemu-img.o qemu-tool.o tool-osdep.o $(block-obj-y)
2134fb240a4Sbellard
214319f08eaSJuan Quintelaqemu-nbd$(EXESUF):  qemu-nbd.o qemu-tool.o tool-osdep.o $(block-obj-y)
2153aa892d7Saliguori
216319f08eaSJuan Quintelaqemu-io$(EXESUF):  qemu-io.o qemu-tool.o tool-osdep.o cmd.o $(block-obj-y)
2170a8e1acdSaliguori
2180a8e1acdSaliguoriqemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz
2197a5ca864Sbellard
220153859beSStuart Bradyqemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
221153859beSStuart Brady	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
222153859beSStuart Brady
22331e31b8aSbellardclean:
2242d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files
2252d80ae89Sbellard	rm -f config.mak config.h 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 *~ */*~
227019d6b8fSAnthony Liguori	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
22807b44ce9SBlue Swirl	rm -f qemu-img-cmds.h
2297d3505c5Sbellard	$(MAKE) -C tests clean
230c05ac895SPaul Brook	for d in $(ALL_SUBDIRS) libhw32 libhw64; do \
2317d3505c5Sbellard	$(MAKE) -C $$d $@ || exit 1 ; \
232626df76aSbellard        done
23331e31b8aSbellard
2347d13299dSbellarddistclean: clean
2354bf6b55bSJuan Quintela	rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
2360cb3fb1eSpbrook	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
2371ad2134fSPaul Brook	for d in $(TARGET_DIRS) libhw32 libhw64; do \
238bc1b050dSbellard	rm -rf $$d || exit 1 ; \
23976bc6838Sbellard        done
2407d13299dSbellard
241fed4a9adSbellardKEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
242fed4a9adSbellardar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
243fed4a9adSbellardcommon  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
244fed4a9adSbellard
24577755340Sthsifdef INSTALL_BLOBS
24677755340SthsBLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
247e5d01b06Saurel32video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
248e5d01b06Saurel32pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
249253d0942SAlexander Grafbamboo.dtb petalogix-s3adsp1800.dtb \
250253d0942SAlexander Grafmultiboot.bin
25177755340Sthselse
25277755340SthsBLOBS=
25377755340Sthsendif
25477755340Sths
25538954dcaSpbrookinstall-doc: $(DOCS)
25658f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
25758f8aeadSaliguori	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
25838954dcaSpbrookifndef CONFIG_WIN32
25958f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
26058f8aeadSaliguori	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
26158f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
26258f8aeadSaliguori	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
26338954dcaSpbrookendif
26438954dcaSpbrook
26538954dcaSpbrookinstall: all $(if $(BUILD_DOCS),install-doc)
26658f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
267932a79dfSthsifneq ($(TOOLS),)
26858f8aeadSaliguori	$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
269932a79dfSthsendif
27077755340Sthsifneq ($(BLOBS),)
27158f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
27277755340Sths	set -e; for x in $(BLOBS); do \
27358f8aeadSaliguori		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
274ad064840Spbrook	done
27577755340Sthsendif
27658f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
27718be8d77Sblueswir1	set -e; for x in $(KEYMAPS); do \
27879fd42aaSAnthony Liguori		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
279ad064840Spbrook	done
280626df76aSbellard	for d in $(TARGET_DIRS); do \
2817d3505c5Sbellard	$(MAKE) -C $$d $@ || exit 1 ; \
282626df76aSbellard        done
283612384d7Sbellard
284367e86e8Sbellard# various test targets
2859b0b8203Sbellardtest speed: all
2867d3505c5Sbellard	$(MAKE) -C tests $@
28731e31b8aSbellard
288367e86e8SbellardTAGS:
289ae95ade0SJuan Quintela	etags *.[ch] tests/*.[ch] block/*.[ch] hw/*.[ch]
29031e31b8aSbellard
2916688bc6dSbellardcscope:
2926688bc6dSbellard	rm -f ./cscope.*
293ede46085Saurel32	find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
2946688bc6dSbellard	cscope -b
2956688bc6dSbellard
2963ef693a0Sbellard# documentation
2971f673135Sbellard%.html: %.texi
2980d00e563Saliguori	$(call quiet-command,texi2html -I=. -monolithic -number $<,"  GEN   $@")
2993ef693a0Sbellard
300f3548328Sbellard%.info: %.texi
3010d00e563Saliguori	$(call quiet-command,makeinfo -I . $< -o $@,"  GEN   $@")
302f3548328Sbellard
303f3548328Sbellard%.dvi: %.texi
3040d00e563Saliguori	$(call quiet-command,texi2dvi -I . $<,"  GEN   $@")
3055824d651Sblueswir1
3065824d651Sblueswir1qemu-options.texi: $(SRC_PATH)/qemu-options.hx
3070d00e563Saliguori	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
308f3548328Sbellard
3092313086aSBlue Swirlqemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
3102313086aSBlue Swirl	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
3112313086aSBlue Swirl
312153859beSStuart Bradyqemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
313153859beSStuart Brady	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
314153859beSStuart Brady
3152313086aSBlue Swirlqemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
3160d00e563Saliguori	$(call quiet-command, \
3170d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
3180d00e563Saliguori	  pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
3190d00e563Saliguori	  "  GEN   $@")
3205a67135aSbellard
321153859beSStuart Bradyqemu-img.1: qemu-img.texi qemu-img-cmds.texi
3220d00e563Saliguori	$(call quiet-command, \
3230d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
3240d00e563Saliguori	  pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
3250d00e563Saliguori	  "  GEN   $@")
326acd935efSbellard
3277a5ca864Sbellardqemu-nbd.8: qemu-nbd.texi
3280d00e563Saliguori	$(call quiet-command, \
3290d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
3300d00e563Saliguori	  pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
3310d00e563Saliguori	  "  GEN   $@")
3327a5ca864Sbellard
3330cb3fb1eSpbrookinfo: qemu-doc.info qemu-tech.info
3340cb3fb1eSpbrook
3350cb3fb1eSpbrookdvi: qemu-doc.dvi qemu-tech.dvi
3360cb3fb1eSpbrook
3370cb3fb1eSpbrookhtml: qemu-doc.html qemu-tech.html
3380cb3fb1eSpbrook
339153859beSStuart 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
340818220f5Saliguori
341df5cf721SthsVERSION ?= $(shell cat VERSION)
342df5cf721SthsFILE = qemu-$(VERSION)
343586314f2Sbellard
3441e43adfcSbellard# tar release (use 'make -k tar' on a checkouted tree)
345586314f2Sbellardtar:
346586314f2Sbellard	rm -rf /tmp/$(FILE)
3471e43adfcSbellard	cp -r . /tmp/$(FILE)
34899c6c082Saurel32	cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
349586314f2Sbellard	rm -rf /tmp/$(FILE)
350586314f2Sbellard
35176b62fd0Sbellard# generate a binary distribution
352d691f669Sbellardtarbin:
35318be8d77Sblueswir1	cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
35443095f31Sbellard	$(bindir)/qemu \
35543095f31Sbellard	$(bindir)/qemu-system-x86_64 \
35640e8a53bSaurel32	$(bindir)/qemu-system-arm \
35740e8a53bSaurel32	$(bindir)/qemu-system-cris \
35840e8a53bSaurel32	$(bindir)/qemu-system-m68k \
35993856aacSbellard	$(bindir)/qemu-system-mips \
36038260998Spbrook	$(bindir)/qemu-system-mipsel \
361fbe4f65bSths	$(bindir)/qemu-system-mips64 \
362fbe4f65bSths	$(bindir)/qemu-system-mips64el \
36340e8a53bSaurel32	$(bindir)/qemu-system-ppc \
36440e8a53bSaurel32	$(bindir)/qemu-system-ppcemb \
36540e8a53bSaurel32	$(bindir)/qemu-system-ppc64 \
366ff1aaf65Sths	$(bindir)/qemu-system-sh4 \
36785ffbdfcSths	$(bindir)/qemu-system-sh4eb \
36840e8a53bSaurel32	$(bindir)/qemu-system-sparc \
3697efa4387Sbellard	$(bindir)/qemu-i386 \
370f0403c03Sbellard	$(bindir)/qemu-x86_64 \
37140e8a53bSaurel32	$(bindir)/qemu-alpha \
3727efa4387Sbellard	$(bindir)/qemu-arm \
373ea31eb5bSbellard	$(bindir)/qemu-armeb \
37440e8a53bSaurel32	$(bindir)/qemu-cris \
37540e8a53bSaurel32	$(bindir)/qemu-m68k \
37640e8a53bSaurel32	$(bindir)/qemu-mips \
37740e8a53bSaurel32	$(bindir)/qemu-mipsel \
3787efa4387Sbellard	$(bindir)/qemu-ppc \
379d4082e95Sj_mayer	$(bindir)/qemu-ppc64 \
380f0403c03Sbellard	$(bindir)/qemu-ppc64abi32 \
381ff1aaf65Sths	$(bindir)/qemu-sh4 \
38285ffbdfcSths	$(bindir)/qemu-sh4eb \
38340e8a53bSaurel32	$(bindir)/qemu-sparc \
38440e8a53bSaurel32	$(bindir)/qemu-sparc64 \
38540e8a53bSaurel32	$(bindir)/qemu-sparc32plus \
386b932cabaSbellard	$(bindir)/qemu-img \
3877a5ca864Sbellard	$(bindir)/qemu-nbd \
3887efa4387Sbellard	$(datadir)/bios.bin \
3897efa4387Sbellard	$(datadir)/vgabios.bin \
390de9258a8Sbellard	$(datadir)/vgabios-cirrus.bin \
391637f6cd7Sbellard	$(datadir)/ppc_rom.bin \
392d5295253Sbellard	$(datadir)/video.x \
3930986ac3bSbellard	$(datadir)/openbios-sparc32 \
394938255d2Sblueswir1	$(datadir)/openbios-sparc64 \
395e5d01b06Saurel32	$(datadir)/openbios-ppc \
39619c80e50Sbellard	$(datadir)/pxe-ne2k_pci.bin \
39719c80e50Sbellard	$(datadir)/pxe-rtl8139.bin \
39819c80e50Sbellard	$(datadir)/pxe-pcnet.bin \
3992991990bSaliguori	$(datadir)/pxe-e1000.bin \
4001f50f8d1Sbellard	$(docdir)/qemu-doc.html \
4011f50f8d1Sbellard	$(docdir)/qemu-tech.html \
40240e8a53bSaurel32	$(mandir)/man1/qemu.1 \
40340e8a53bSaurel32	$(mandir)/man1/qemu-img.1 \
4047a5ca864Sbellard	$(mandir)/man8/qemu-nbd.8
405d691f669Sbellard
4064fb240a4Sbellard# Include automatically generated dependency files
407019d6b8fSAnthony Liguori-include $(wildcard *.d audio/*.d slirp/*.d block/*.d)
408