blob: de7c2aa38aa230fcddfa5b778e2f726d70748d63 [file] [log] [blame]
pbrook0cb3fb12006-05-14 12:07:53 +00001# Makefile for QEMU.
2
aurel3255d7e8f2009-04-15 14:42:57 +00003ifneq ($(wildcard config-host.mak),)
Paul Brook1ad21342009-05-19 16:17:58 +01004# Put the all: rule here so that config-host.mak can contain dependencies.
5all: build-all
pbrookad064842006-04-16 12:41:07 +00006include config-host.mak
aliguori17759182009-01-21 18:12:52 +00007include $(SRC_PATH)/rules.mak
aurel3255d7e8f2009-04-15 14:42:57 +00008else
9config-host.mak:
10 @echo "Please call configure before running make!"
11 @exit 1
12endif
bellard766a4872003-02-18 23:35:48 +000013
aliguori818220f2008-09-24 01:13:40 +000014.PHONY: all clean cscope distclean dvi html info install install-doc \
15 recurse-all speed tar tarbin test
pbrook0cb3fb12006-05-14 12:07:53 +000016
pbrook8c462f82007-11-18 21:12:37 +000017VPATH=$(SRC_PATH):$(SRC_PATH)/hw
18
Juan Quintela3e2e0e62009-08-03 14:47:06 +020019LIBS+=-lz $(LIBS_TOOLS)
Juan Quintela67c0f082009-07-27 16:12:51 +020020
pbrookcc8ae6d2006-04-23 17:57:59 +000021ifdef BUILD_DOCS
bellard7a5ca862008-05-27 21:13:40 +000022DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
pbrookcc8ae6d2006-04-23 17:57:59 +000023else
24DOCS=
25endif
bellard7d132992003-03-06 23:23:54 +000026
Paul Brookc05ac892009-07-31 13:18:32 +010027build-all: $(TOOLS) $(DOCS) recurse-all
pbrookb9dea4f2006-05-13 16:54:03 +000028
aurel3255d7e8f2009-04-15 14:42:57 +000029config-host.mak: configure
30ifneq ($(wildcard config-host.mak),)
31 @echo $@ is out-of-date, running configure
blueswir1052ff922009-04-17 20:01:12 +000032 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
aurel3255d7e8f2009-04-15 14:42:57 +000033endif
34
Paul Brook00873752009-05-07 02:00:31 +010035SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
pbrookcec7d0b2008-05-28 16:44:57 +000036SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
37
aurel3286e840e2008-12-07 15:21:23 +000038subdir-%:
Paul Brook00873752009-05-07 02:00:31 +010039 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
pbrook4aa42532006-05-13 13:55:08 +000040
pbrookcec7d0b2008-05-28 16:44:57 +000041$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
Paul Brookc05ac892009-07-31 13:18:32 +010042
Blue Swirladd16152009-09-27 16:26:02 +000043$(filter %-user,$(SUBDIR_RULES)): libuser.a
44
45libuser.a:
46 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libuser V="$(V)" TARGET_DIR="$*/" all,)
47
Paul Brookc05ac892009-07-31 13:18:32 +010048ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
49romsubdir-%:
50 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
51
52ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
53
54recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
bellard83f64092006-08-01 16:21:11 +000055
pbrookfaf07962007-11-11 02:51:17 +000056#######################################################################
Juan Quintela319f08e2009-06-25 00:08:02 +020057# block-obj-y is code used by both qemu system emulation and qemu-img
pbrookfaf07962007-11-11 02:51:17 +000058
Juan Quintela319f08e2009-06-25 00:08:02 +020059block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
Anthony Liguoria25a0ef2009-08-10 17:14:11 -050060block-obj-y += nbd.o block.o aio.o aes.o osdep.o
Christoph Hellwig4dd75c72009-08-10 23:39:39 +020061block-obj-$(CONFIG_POSIX) += posix-aio-compat.o
Christoph Hellwig5c6c3a62009-08-20 16:58:35 +020062block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
Juan Quintela1a65ba72009-07-16 17:57:03 +020063
Stefan Weil9aebd982009-07-31 21:45:56 +020064block-nested-y += cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
Juan Quintela1a65ba72009-07-16 17:57:03 +020065block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
66block-nested-y += parallels.o nbd.o
Juan Quintelaeeb6d452009-07-27 16:13:08 +020067block-nested-$(CONFIG_WIN32) += raw-win32.o
68block-nested-$(CONFIG_POSIX) += raw-posix.o
Juan Quintela1a65ba72009-07-16 17:57:03 +020069block-nested-$(CONFIG_CURL) += curl.o
70
71block-obj-y += $(addprefix block/, $(block-nested-y))
Alexander Graf769ce762009-05-11 17:41:42 +020072
bellard4fb240a2007-11-07 19:24:02 +000073######################################################################
bellard2e2ea902008-02-01 10:02:52 +000074# libqemu_common.a: Target independent part of system emulation. The
bellard4fb240a2007-11-07 19:24:02 +000075# long term path is to suppress *all* target specific code in case of
76# system emulation, i.e. a single QEMU executable should support all
77# CPUs and machines.
bellard47cea612004-05-17 20:06:42 +000078
Juan Quintela6ef859b2009-06-25 00:08:07 +020079obj-y = $(block-obj-y)
Kirill A. Shutemov34005a02009-09-12 02:17:55 +030080obj-y += readline.o console.o
aliguoricd01b4a2008-08-21 19:25:45 +000081
Blue Swirlc2b023b2009-09-20 19:20:05 +000082obj-y += tcg-runtime.o host-utils.o
Blue Swirlafcea8c2009-09-20 16:05:47 +000083obj-y += irq.o ptimer.o ioport.o
Juan Quintela6ef859b2009-06-25 00:08:07 +020084obj-y += i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
85obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
86obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
87obj-y += scsi-disk.o cdrom.o
Gerd Hoffmannd52affa2009-08-31 14:24:04 +020088obj-y += scsi-generic.o scsi-bus.o
Juan Quintela6ef859b2009-06-25 00:08:07 +020089obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
Gerd Hoffmann806b6022009-08-31 14:23:59 +020090obj-y += usb-serial.o usb-net.o usb-bus.o
Juan Quintela6ef859b2009-06-25 00:08:07 +020091obj-y += sd.o ssi-sd.o
92obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
93obj-y += bt-hci-csr.o
94obj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
Juan Quintela3b476122009-07-16 17:57:06 +020095obj-y += qemu-char.o aio.o net-checksum.o savevm.o
Juan Quintela6ef859b2009-06-25 00:08:07 +020096obj-y += msmouse.o ps2.o
Gerd Hoffmannee6847d2009-07-15 13:43:31 +020097obj-y += qdev.o qdev-properties.o ssi.o
Blue Swirla333cd72009-09-20 08:28:29 +000098obj-y += qint.o qstring.o qdict.o qemu-config.o
pbrook87ecb682007-11-17 17:14:51 +000099
Juan Quintela0e22fd22009-06-25 00:08:09 +0200100obj-$(CONFIG_BRLAPI) += baum.o
Juan Quintelaeeb6d452009-07-27 16:13:08 +0200101obj-$(CONFIG_WIN32) += tap-win32.o
Paolo Bonzini5ac1fad2009-08-18 15:56:25 +0200102obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
bellard4fb240a2007-11-07 19:24:02 +0000103
Juan Quintela98b068a2009-08-03 14:46:57 +0200104audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
Juan Quintela0e22fd22009-06-25 00:08:09 +0200105
106audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
107audio-obj-$(CONFIG_SDL) += sdlaudio.o
108audio-obj-$(CONFIG_OSS) += ossaudio.o
109audio-obj-$(CONFIG_COREAUDIO) += coreaudio.o
110audio-obj-$(CONFIG_ALSA) += alsaaudio.o
111audio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
112audio-obj-$(CONFIG_FMOD) += fmodaudio.o
113audio-obj-$(CONFIG_ESD) += esdaudio.o
114audio-obj-$(CONFIG_PA) += paaudio.o
Juan Quintela67f86e82009-08-03 14:46:59 +0200115audio-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
Juan Quintelaeda959b2009-06-25 00:08:03 +0200116audio-obj-y += wavcapture.o
Juan Quintela6ef859b2009-06-25 00:08:07 +0200117obj-y += $(addprefix audio/, $(audio-obj-y))
bellard4fb240a2007-11-07 19:24:02 +0000118
Juan Quintela6ef859b2009-06-25 00:08:07 +0200119obj-y += keymaps.o
Juan Quintela0e22fd22009-06-25 00:08:09 +0200120obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
121obj-$(CONFIG_CURSES) += curses.o
Juan Quintela6ef859b2009-06-25 00:08:07 +0200122obj-y += vnc.o acl.o d3des.o
Juan Quintela0e22fd22009-06-25 00:08:09 +0200123obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
124obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
125obj-$(CONFIG_COCOA) += cocoa.o
126obj-$(CONFIG_IOTHREAD) += qemu-thread.o
aliguorie5d355d2009-04-24 18:03:15 +0000127
Juan Quintelaf835ed12009-06-25 00:08:04 +0200128slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
129slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
130slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
Juan Quintela0e22fd22009-06-25 00:08:09 +0200131obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
bellard4fb240a2007-11-07 19:24:02 +0000132
Blue Swirl2567f572009-05-21 15:54:48 +0000133# xen backend driver support
Juan Quintela0e22fd22009-06-25 00:08:09 +0200134obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
135obj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
Blue Swirl2567f572009-05-21 15:54:48 +0000136
Juan Quintelaa558ee12009-08-03 14:46:21 +0200137QEMU_CFLAGS+=$(CURL_CFLAGS)
Alexander Graf769ce762009-05-11 17:41:42 +0200138
bellard4fb240a2007-11-07 19:24:02 +0000139cocoa.o: cocoa.m
bellard4fb240a2007-11-07 19:24:02 +0000140
aliguori04837552009-03-06 20:27:10 +0000141keymaps.o: keymaps.c keymaps.h
142
Stefano Stabellinic18a2c32009-06-24 11:58:25 +0100143sdl_zoom.o: sdl_zoom.c sdl_zoom.h sdl_zoom_template.h
144
145sdl.o: sdl.c keymaps.h sdl_keysym.h sdl_zoom.h
aliguori807544e2009-01-21 18:12:44 +0000146
Juan Quintelaa558ee12009-08-03 14:46:21 +0200147sdl.o audio/sdlaudio.o sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000148
aliguori76655d62009-03-06 20:27:37 +0000149acl.o: acl.h acl.c
150
aliguori2f9606b2009-03-06 20:27:28 +0000151vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
aliguori5fb6c7a2009-03-06 20:27:23 +0000152
aliguori76655d62009-03-06 20:27:37 +0000153vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
aliguori807544e2009-01-21 18:12:44 +0000154
Juan Quintelaa558ee12009-08-03 14:46:21 +0200155vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000156
aliguori5fb6c7a2009-03-06 20:27:23 +0000157vnc-tls.o: vnc-tls.c vnc.h
158
159vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
160
aliguori2f9606b2009-03-06 20:27:28 +0000161vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
162
aliguori04837552009-03-06 20:27:10 +0000163curses.o: curses.c keymaps.h curses_keys.h
balrog4d3b6f62008-02-10 16:33:14 +0000164
Juan Quintelaa558ee12009-08-03 14:46:21 +0200165bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000166
Juan Quintela6ef859b2009-06-25 00:08:07 +0200167libqemu_common.a: $(obj-y)
bellard4fb240a2007-11-07 19:24:02 +0000168
169######################################################################
170
Stuart Brady153859b2009-06-07 00:42:17 +0100171qemu-img.o: qemu-img-cmds.h
172
Anthony Liguoria25a0ef2009-08-10 17:14:11 -0500173qemu-img$(EXESUF): qemu-img.o qemu-tool.o $(block-obj-y)
bellard4fb240a2007-11-07 19:24:02 +0000174
Anthony Liguoria25a0ef2009-08-10 17:14:11 -0500175qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o $(block-obj-y)
aliguori3aa892d2009-01-21 18:13:02 +0000176
Anthony Liguoria25a0ef2009-08-10 17:14:11 -0500177qemu-io$(EXESUF): qemu-io.o qemu-tool.o cmd.o $(block-obj-y)
aliguori0a8e1ac2009-04-05 18:41:23 +0000178
Stuart Brady153859b2009-06-07 00:42:17 +0100179qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
180 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@")
181
Luiz Capitulino33837ba2009-08-28 15:27:29 -0300182check-qint: check-qint.o qint.o qemu-malloc.o
Luiz Capitulino5de65a02009-08-28 15:27:30 -0300183check-qstring: check-qstring.o qstring.o qemu-malloc.o
Luiz Capitulino7b8c51a2009-08-28 15:27:32 -0300184check-qdict: check-qdict.o qdict.o qint.o qstring.o qemu-malloc.o
Luiz Capitulino33837ba2009-08-28 15:27:29 -0300185
bellard31e31b82003-02-18 22:55:36 +0000186clean:
bellard2d80ae82003-08-11 23:01:33 +0000187# avoid old build problems by removing potentially incorrect old files
ths5fafdf22007-09-16 21:08:06 +0000188 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
aurel3286e840e2008-12-07 15:21:23 +0000189 rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
Anthony Liguori019d6b82009-05-09 17:14:19 -0500190 rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
Blue Swirl07b44ce2009-06-09 18:45:16 +0000191 rm -f qemu-img-cmds.h
bellard7d3505c2004-05-12 19:32:15 +0000192 $(MAKE) -C tests clean
Blue Swirladd16152009-09-27 16:26:02 +0000193 for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
bellard7d3505c2004-05-12 19:32:15 +0000194 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000195 done
bellard31e31b82003-02-18 22:55:36 +0000196
bellard7d132992003-03-06 23:23:54 +0000197distclean: clean
Juan Quintela4bf6b552009-07-22 22:37:40 +0200198 rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
pbrook0cb3fb12006-05-14 12:07:53 +0000199 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
Blue Swirladd16152009-09-27 16:26:02 +0000200 for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
bellardbc1b0502003-10-28 00:12:52 +0000201 rm -rf $$d || exit 1 ; \
bellard76bc6832003-08-10 23:41:46 +0000202 done
bellard7d132992003-03-06 23:23:54 +0000203
bellardfed4a9a2004-12-12 22:18:34 +0000204KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
205ar de en-us fi fr-be hr it lv nl pl ru th \
206common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
207
ths77755342008-11-27 15:45:16 +0000208ifdef INSTALL_BLOBS
209BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
aurel32e5d01b02009-01-09 11:01:31 +0000210video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
211pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
Alexander Graf253d0942009-06-29 15:37:40 +0200212bamboo.dtb petalogix-s3adsp1800.dtb \
213multiboot.bin
ths77755342008-11-27 15:45:16 +0000214else
215BLOBS=
216endif
217
pbrook38954dc2006-04-30 23:54:18 +0000218install-doc: $(DOCS)
aliguori58f8aea2009-04-18 15:36:02 +0000219 $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
220 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
Juan Quintela96d409e2009-08-03 14:47:00 +0200221ifdef CONFIG_POSIX
aliguori58f8aea2009-04-18 15:36:02 +0000222 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
223 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
224 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
225 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
pbrook38954dc2006-04-30 23:54:18 +0000226endif
227
228install: all $(if $(BUILD_DOCS),install-doc)
aliguori58f8aea2009-04-18 15:36:02 +0000229 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000230ifneq ($(TOOLS),)
aliguori58f8aea2009-04-18 15:36:02 +0000231 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000232endif
ths77755342008-11-27 15:45:16 +0000233ifneq ($(BLOBS),)
aliguori58f8aea2009-04-18 15:36:02 +0000234 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
ths77755342008-11-27 15:45:16 +0000235 set -e; for x in $(BLOBS); do \
aliguori58f8aea2009-04-18 15:36:02 +0000236 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
pbrookad064842006-04-16 12:41:07 +0000237 done
ths77755342008-11-27 15:45:16 +0000238endif
aliguori58f8aea2009-04-18 15:36:02 +0000239 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
blueswir118be8d72008-03-05 18:16:09 +0000240 set -e; for x in $(KEYMAPS); do \
Anthony Liguori79fd42a2009-05-28 03:11:42 -0500241 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
pbrookad064842006-04-16 12:41:07 +0000242 done
bellard626df762003-08-10 21:39:31 +0000243 for d in $(TARGET_DIRS); do \
bellard7d3505c2004-05-12 19:32:15 +0000244 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000245 done
bellard612384d2003-03-22 17:31:19 +0000246
bellard367e86e2003-03-01 17:13:26 +0000247# various test targets
bellard9b0b8202007-11-14 10:34:57 +0000248test speed: all
bellard7d3505c2004-05-12 19:32:15 +0000249 $(MAKE) -C tests $@
bellard31e31b82003-02-18 22:55:36 +0000250
Alexandre Bique21d4e8e2009-08-07 15:43:11 +0100251.PHONY: TAGS
ths5fafdf22007-09-16 21:08:06 +0000252TAGS:
Alexandre Bique21d4e8e2009-08-07 15:43:11 +0100253 find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
bellard31e31b82003-02-18 22:55:36 +0000254
bellard6688bc62005-08-21 09:23:39 +0000255cscope:
256 rm -f ./cscope.*
aurel32ede46082008-10-01 21:46:58 +0000257 find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
bellard6688bc62005-08-21 09:23:39 +0000258 cscope -b
259
bellard3ef693a2003-03-23 20:17:16 +0000260# documentation
bellard1f673132004-04-04 15:21:17 +0000261%.html: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000262 $(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
bellard3ef693a2003-03-23 20:17:16 +0000263
bellardf3548322006-04-30 22:51:54 +0000264%.info: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000265 $(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000266
267%.dvi: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000268 $(call quiet-command,texi2dvi -I . $<," GEN $@")
blueswir15824d652009-03-28 06:44:27 +0000269
270qemu-options.texi: $(SRC_PATH)/qemu-options.hx
aliguori0d00e562009-04-05 17:40:46 +0000271 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000272
Blue Swirl23130862009-06-06 08:22:04 +0000273qemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
274 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
275
Stuart Brady153859b2009-06-07 00:42:17 +0100276qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
277 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
278
Blue Swirl23130862009-06-06 08:22:04 +0000279qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
aliguori0d00e562009-04-05 17:40:46 +0000280 $(call quiet-command, \
281 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
282 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
283 " GEN $@")
bellard5a671352003-10-01 00:13:48 +0000284
Stuart Brady153859b2009-06-07 00:42:17 +0100285qemu-img.1: qemu-img.texi qemu-img-cmds.texi
aliguori0d00e562009-04-05 17:40:46 +0000286 $(call quiet-command, \
287 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
288 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
289 " GEN $@")
bellardacd935e2004-11-15 22:57:26 +0000290
bellard7a5ca862008-05-27 21:13:40 +0000291qemu-nbd.8: qemu-nbd.texi
aliguori0d00e562009-04-05 17:40:46 +0000292 $(call quiet-command, \
293 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
294 pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
295 " GEN $@")
bellard7a5ca862008-05-27 21:13:40 +0000296
pbrook0cb3fb12006-05-14 12:07:53 +0000297info: qemu-doc.info qemu-tech.info
298
299dvi: qemu-doc.dvi qemu-tech.dvi
300
301html: qemu-doc.html qemu-tech.html
302
Stuart Brady153859b2009-06-07 00:42:17 +0100303qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-monitor.texi qemu-img-cmds.texi
aliguori818220f2008-09-24 01:13:40 +0000304
thsdf5cf722007-01-24 22:56:36 +0000305VERSION ?= $(shell cat VERSION)
306FILE = qemu-$(VERSION)
bellard586314f2003-03-03 15:02:29 +0000307
bellard1e43adf2003-09-30 20:54:24 +0000308# tar release (use 'make -k tar' on a checkouted tree)
bellard586314f2003-03-03 15:02:29 +0000309tar:
310 rm -rf /tmp/$(FILE)
bellard1e43adf2003-09-30 20:54:24 +0000311 cp -r . /tmp/$(FILE)
aurel3299c6c082008-04-22 20:45:30 +0000312 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
bellard586314f2003-03-03 15:02:29 +0000313 rm -rf /tmp/$(FILE)
314
bellard76b62fd2003-10-28 00:47:44 +0000315# generate a binary distribution
bellardd691f662003-03-24 21:58:34 +0000316tarbin:
blueswir118be8d72008-03-05 18:16:09 +0000317 cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
bellard43095f32005-04-27 20:49:23 +0000318 $(bindir)/qemu \
bellard43095f32005-04-27 20:49:23 +0000319 $(bindir)/qemu-system-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000320 $(bindir)/qemu-system-arm \
321 $(bindir)/qemu-system-cris \
322 $(bindir)/qemu-system-m68k \
Edgar E. Iglesiasbc6291a2009-10-01 15:18:36 +0200323 $(bindir)/qemu-system-microblaze \
bellard93856aa2005-07-24 18:44:35 +0000324 $(bindir)/qemu-system-mips \
pbrook38260992006-03-11 14:51:13 +0000325 $(bindir)/qemu-system-mipsel \
thsfbe4f652007-04-01 11:16:48 +0000326 $(bindir)/qemu-system-mips64 \
327 $(bindir)/qemu-system-mips64el \
aurel3240e8a532009-01-03 12:35:57 +0000328 $(bindir)/qemu-system-ppc \
329 $(bindir)/qemu-system-ppcemb \
330 $(bindir)/qemu-system-ppc64 \
thsff1aaf62007-09-29 21:18:26 +0000331 $(bindir)/qemu-system-sh4 \
ths85ffbdf2007-12-09 05:10:03 +0000332 $(bindir)/qemu-system-sh4eb \
aurel3240e8a532009-01-03 12:35:57 +0000333 $(bindir)/qemu-system-sparc \
bellard7efa4382004-05-12 18:54:06 +0000334 $(bindir)/qemu-i386 \
bellardf0403c02008-01-06 18:27:12 +0000335 $(bindir)/qemu-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000336 $(bindir)/qemu-alpha \
337 $(bindir)/qemu-arm \
338 $(bindir)/qemu-armeb \
339 $(bindir)/qemu-cris \
340 $(bindir)/qemu-m68k \
Edgar E. Iglesiasbc6291a2009-10-01 15:18:36 +0200341 $(bindir)/qemu-microblaze \
aurel3240e8a532009-01-03 12:35:57 +0000342 $(bindir)/qemu-mips \
343 $(bindir)/qemu-mipsel \
344 $(bindir)/qemu-ppc \
345 $(bindir)/qemu-ppc64 \
346 $(bindir)/qemu-ppc64abi32 \
347 $(bindir)/qemu-sh4 \
348 $(bindir)/qemu-sh4eb \
349 $(bindir)/qemu-sparc \
350 $(bindir)/qemu-sparc64 \
351 $(bindir)/qemu-sparc32plus \
352 $(bindir)/qemu-img \
353 $(bindir)/qemu-nbd \
bellard7efa4382004-05-12 18:54:06 +0000354 $(datadir)/bios.bin \
355 $(datadir)/vgabios.bin \
bellardde9258a2004-06-06 15:50:03 +0000356 $(datadir)/vgabios-cirrus.bin \
bellard637f6cd2004-06-21 19:54:47 +0000357 $(datadir)/ppc_rom.bin \
bellardd5295252005-07-03 14:00:51 +0000358 $(datadir)/video.x \
bellard0986ac32006-06-14 12:36:32 +0000359 $(datadir)/openbios-sparc32 \
blueswir1938255d2008-04-23 19:38:07 +0000360 $(datadir)/openbios-sparc64 \
aurel32e5d01b02009-01-09 11:01:31 +0000361 $(datadir)/openbios-ppc \
aurel3240e8a532009-01-03 12:35:57 +0000362 $(datadir)/pxe-ne2k_pci.bin \
bellard19c80e52007-02-05 21:22:42 +0000363 $(datadir)/pxe-rtl8139.bin \
aurel3240e8a532009-01-03 12:35:57 +0000364 $(datadir)/pxe-pcnet.bin \
aliguori29919902008-07-26 16:53:22 +0000365 $(datadir)/pxe-e1000.bin \
bellard1f50f8d2004-05-08 14:44:43 +0000366 $(docdir)/qemu-doc.html \
367 $(docdir)/qemu-tech.html \
aurel3240e8a532009-01-03 12:35:57 +0000368 $(mandir)/man1/qemu.1 \
369 $(mandir)/man1/qemu-img.1 \
bellard7a5ca862008-05-27 21:13:40 +0000370 $(mandir)/man8/qemu-nbd.8
bellardd691f662003-03-24 21:58:34 +0000371
bellard4fb240a2007-11-07 19:24:02 +0000372# Include automatically generated dependency files
Anthony Liguori019d6b82009-05-09 17:14:19 -0500373-include $(wildcard *.d audio/*.d slirp/*.d block/*.d)