blob: 0e045bb57ca37aab3cd2d464c72b4672e290254e [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
aliguori17759182009-01-21 18:12:52 +000019
bellard40293e52008-01-31 11:32:10 +000020CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
21LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
blueswir131422552007-04-16 18:27:06 +000022
malc96935aa2008-07-02 21:16:22 +000023CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
bellard4fb240a2007-11-07 19:24:02 +000024CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
bellard766a4872003-02-18 23:35:48 +000025LIBS=
bellard1f50f8d2004-05-08 14:44:43 +000026ifdef CONFIG_STATIC
bellard40293e52008-01-31 11:32:10 +000027LDFLAGS += -static
bellard1f50f8d2004-05-08 14:44:43 +000028endif
pbrookcc8ae6d2006-04-23 17:57:59 +000029ifdef BUILD_DOCS
bellard7a5ca862008-05-27 21:13:40 +000030DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
pbrookcc8ae6d2006-04-23 17:57:59 +000031else
32DOCS=
33endif
bellard7d132992003-03-06 23:23:54 +000034
aliguorie5d355d2009-04-24 18:03:15 +000035LIBS+=$(PTHREADLIBS)
36LIBS+=$(CLOCKLIBS)
bellard83f64092006-08-01 16:21:11 +000037
aliguori7e00eb92008-08-02 01:57:02 +000038ifdef CONFIG_SOLARIS
39LIBS+=-lsocket -lnsl -lresolv
40endif
41
aliguori03ff3ca2008-09-15 15:51:35 +000042ifdef CONFIG_WIN32
43LIBS+=-lwinmm -lws2_32 -liphlpapi
44endif
45
Paul Brook1ad21342009-05-19 16:17:58 +010046build-all: $(TOOLS) $(DOCS) recurse-all
pbrookb9dea4f2006-05-13 16:54:03 +000047
aurel3255d7e8f2009-04-15 14:42:57 +000048config-host.mak: configure
49ifneq ($(wildcard config-host.mak),)
50 @echo $@ is out-of-date, running configure
blueswir1052ff922009-04-17 20:01:12 +000051 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
aurel3255d7e8f2009-04-15 14:42:57 +000052endif
53
Paul Brook00873752009-05-07 02:00:31 +010054SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
pbrookcec7d0b2008-05-28 16:44:57 +000055SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
56
aurel3286e840e2008-12-07 15:21:23 +000057subdir-%:
Paul Brook00873752009-05-07 02:00:31 +010058 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
pbrook4aa42532006-05-13 13:55:08 +000059
pbrookcec7d0b2008-05-28 16:44:57 +000060$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
61$(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
62
63recurse-all: $(SUBDIR_RULES)
bellard83f64092006-08-01 16:21:11 +000064
pbrookfaf07962007-11-11 02:51:17 +000065#######################################################################
66# BLOCK_OBJS is code used by both qemu system emulation and qemu-img
67
Kevin Wolfd3f24362009-05-18 16:42:09 +020068BLOCK_OBJS=cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
Anthony Liguori019d6b82009-05-09 17:14:19 -050069BLOCK_OBJS+=block/cow.o block/qcow.o aes.o block/vmdk.o block/cloop.o
70BLOCK_OBJS+=block/dmg.o block/bochs.o block/vpc.o block/vvfat.o
71BLOCK_OBJS+=block/qcow2.o block/parallels.o block/nbd.o
aliguoria76bab42008-09-22 19:17:18 +000072BLOCK_OBJS+=nbd.o block.o aio.o
aliguori03ff3ca2008-09-15 15:51:35 +000073
74ifdef CONFIG_WIN32
Anthony Liguori019d6b82009-05-09 17:14:19 -050075BLOCK_OBJS += block/raw-win32.o
aliguori03ff3ca2008-09-15 15:51:35 +000076else
aliguori3c529d92008-12-12 16:41:40 +000077ifdef CONFIG_AIO
78BLOCK_OBJS += posix-aio-compat.o
79endif
Anthony Liguori019d6b82009-05-09 17:14:19 -050080BLOCK_OBJS += block/raw-posix.o
aliguori03ff3ca2008-09-15 15:51:35 +000081endif
82
Alexander Graf769ce762009-05-11 17:41:42 +020083ifdef CONFIG_CURL
84BLOCK_OBJS += block/curl.o
85endif
86
bellard4fb240a2007-11-07 19:24:02 +000087######################################################################
bellard2e2ea902008-02-01 10:02:52 +000088# libqemu_common.a: Target independent part of system emulation. The
bellard4fb240a2007-11-07 19:24:02 +000089# long term path is to suppress *all* target specific code in case of
90# system emulation, i.e. a single QEMU executable should support all
91# CPUs and machines.
bellard47cea612004-05-17 20:06:42 +000092
aliguoricd01b4a2008-08-21 19:25:45 +000093OBJS=$(BLOCK_OBJS)
pbrook87ecb682007-11-17 17:14:51 +000094OBJS+=readline.o console.o
aliguoricd01b4a2008-08-21 19:25:45 +000095
blueswir1e9c28332009-04-11 09:04:44 +000096OBJS+=irq.o ptimer.o
pbrook87ecb682007-11-17 17:14:51 +000097OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
balrog7e7c5e42008-04-14 21:57:44 +000098OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
blueswir1e9c28332009-04-11 09:04:44 +000099OBJS+=tmp105.o lm832x.o eeprom93xx.o tsc2005.o
pbrook87ecb682007-11-17 17:14:51 +0000100OBJS+=scsi-disk.o cdrom.o
ths985a03b2007-12-24 16:10:43 +0000101OBJS+=scsi-generic.o
blueswir168063642008-11-22 21:03:55 +0000102OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
balrog6c9f8862008-07-17 20:47:13 +0000103OBJS+=usb-serial.o usb-net.o
pbrook775616c2007-11-24 23:35:08 +0000104OBJS+=sd.o ssi-sd.o
balroge6a6d5a2008-09-29 00:40:44 +0000105OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
blueswir1e9c28332009-04-11 09:04:44 +0000106OBJS+=bt-hci-csr.o
aliguori559b90f2008-11-11 21:20:14 +0000107OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
malc902b3d52008-12-10 19:18:40 +0000108OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o
blueswir1e9c28332009-04-11 09:04:44 +0000109OBJS+=msmouse.o ps2.o
Paul Brook90d37232009-05-14 22:35:09 +0100110OBJS+=qdev.o ssi.o
pbrook87ecb682007-11-17 17:14:51 +0000111
aurel322e4d9fb2008-04-08 06:01:02 +0000112ifdef CONFIG_BRLAPI
113OBJS+= baum.o
114LIBS+=-lbrlapi
115endif
116
bellard4fb240a2007-11-07 19:24:02 +0000117ifdef CONFIG_WIN32
118OBJS+=tap-win32.o
aliguori559b90f2008-11-11 21:20:14 +0000119else
120OBJS+=migration-exec.o
bellard4fb240a2007-11-07 19:24:02 +0000121endif
122
123AUDIO_OBJS = audio.o noaudio.o wavaudio.o mixeng.o
124ifdef CONFIG_SDL
125AUDIO_OBJS += sdlaudio.o
126endif
127ifdef CONFIG_OSS
128AUDIO_OBJS += ossaudio.o
129endif
130ifdef CONFIG_COREAUDIO
131AUDIO_OBJS += coreaudio.o
balrogca9cc282008-01-14 04:24:29 +0000132AUDIO_PT = yes
bellard4fb240a2007-11-07 19:24:02 +0000133endif
134ifdef CONFIG_ALSA
135AUDIO_OBJS += alsaaudio.o
136endif
137ifdef CONFIG_DSOUND
138AUDIO_OBJS += dsoundaudio.o
139endif
140ifdef CONFIG_FMOD
141AUDIO_OBJS += fmodaudio.o
142audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS)
143endif
balrogca9cc282008-01-14 04:24:29 +0000144ifdef CONFIG_ESD
145AUDIO_PT = yes
146AUDIO_PT_INT = yes
147AUDIO_OBJS += esdaudio.o
148endif
malcb8e59f12008-07-02 21:03:08 +0000149ifdef CONFIG_PA
150AUDIO_PT = yes
151AUDIO_PT_INT = yes
152AUDIO_OBJS += paaudio.o
153endif
balrogca9cc282008-01-14 04:24:29 +0000154ifdef AUDIO_PT
155LDFLAGS += -pthread
156endif
157ifdef AUDIO_PT_INT
158AUDIO_OBJS += audio_pt_int.o
159endif
bellard4fb240a2007-11-07 19:24:02 +0000160AUDIO_OBJS+= wavcapture.o
161OBJS+=$(addprefix audio/, $(AUDIO_OBJS))
162
aliguori04837552009-03-06 20:27:10 +0000163OBJS+=keymaps.o
bellard4fb240a2007-11-07 19:24:02 +0000164ifdef CONFIG_SDL
165OBJS+=sdl.o x_keymap.o
166endif
balrog4d3b6f62008-02-10 16:33:14 +0000167ifdef CONFIG_CURSES
168OBJS+=curses.o
169endif
aliguori76655d62009-03-06 20:27:37 +0000170OBJS+=vnc.o acl.o d3des.o
aliguori5fb6c7a2009-03-06 20:27:23 +0000171ifdef CONFIG_VNC_TLS
172OBJS+=vnc-tls.o vnc-auth-vencrypt.o
173endif
aliguori2f9606b2009-03-06 20:27:28 +0000174ifdef CONFIG_VNC_SASL
175OBJS+=vnc-auth-sasl.o
176endif
bellard4fb240a2007-11-07 19:24:02 +0000177
178ifdef CONFIG_COCOA
179OBJS+=cocoa.o
180endif
181
aliguorie5d355d2009-04-24 18:03:15 +0000182ifdef CONFIG_IOTHREAD
183OBJS+=qemu-thread.o
184endif
185
bellard4fb240a2007-11-07 19:24:02 +0000186ifdef CONFIG_SLIRP
187CPPFLAGS+=-I$(SRC_PATH)/slirp
188SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \
189slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \
190tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o
191OBJS+=$(addprefix slirp/, $(SLIRP_OBJS))
192endif
193
ths8a16d272008-07-19 09:56:24 +0000194LIBS+=$(VDE_LIBS)
195
Blue Swirl2567f572009-05-21 15:54:48 +0000196# xen backend driver support
197XEN_OBJS := xen_backend.o xen_devconfig.o
198XEN_OBJS += xen_console.o xenfb.o xen_disk.o xen_nic.o
199ifdef CONFIG_XEN
200 OBJS += $(XEN_OBJS)
201endif
202
Alexander Graf769ce762009-05-11 17:41:42 +0200203LIBS+=$(CURL_LIBS)
204
bellard4fb240a2007-11-07 19:24:02 +0000205cocoa.o: cocoa.m
bellard4fb240a2007-11-07 19:24:02 +0000206
aliguori04837552009-03-06 20:27:10 +0000207keymaps.o: keymaps.c keymaps.h
208
209sdl.o: sdl.c keymaps.h sdl_keysym.h
aliguori807544e2009-01-21 18:12:44 +0000210
211sdl.o audio/sdlaudio.o: CFLAGS += $(SDL_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000212
aliguori76655d62009-03-06 20:27:37 +0000213acl.o: acl.h acl.c
214
aliguori2f9606b2009-03-06 20:27:28 +0000215vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
aliguori5fb6c7a2009-03-06 20:27:23 +0000216
aliguori76655d62009-03-06 20:27:37 +0000217vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
aliguori807544e2009-01-21 18:12:44 +0000218
219vnc.o: CFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000220
aliguori5fb6c7a2009-03-06 20:27:23 +0000221vnc-tls.o: vnc-tls.c vnc.h
222
223vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
224
aliguori2f9606b2009-03-06 20:27:28 +0000225vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
226
aliguori04837552009-03-06 20:27:10 +0000227curses.o: curses.c keymaps.h curses_keys.h
balrog4d3b6f62008-02-10 16:33:14 +0000228
aliguori807544e2009-01-21 18:12:44 +0000229bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000230
231libqemu_common.a: $(OBJS)
bellard4fb240a2007-11-07 19:24:02 +0000232
pbrookcec7d0b2008-05-28 16:44:57 +0000233#######################################################################
234# USER_OBJS is code used by qemu userspace emulation
malc902b3d52008-12-10 19:18:40 +0000235USER_OBJS=cutils.o cache-utils.o
pbrookcec7d0b2008-05-28 16:44:57 +0000236
237libqemu_user.a: $(USER_OBJS)
pbrookcec7d0b2008-05-28 16:44:57 +0000238
bellard4fb240a2007-11-07 19:24:02 +0000239######################################################################
240
Paul Brook88ca2a52009-05-13 22:21:47 +0100241qemu-img$(EXESUF): qemu-img.o qemu-tool.o tool-osdep.o $(BLOCK_OBJS)
bellard4fb240a2007-11-07 19:24:02 +0000242
Paul Brook88ca2a52009-05-13 22:21:47 +0100243qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o tool-osdep.o $(BLOCK_OBJS)
aliguori3aa892d2009-01-21 18:13:02 +0000244
Paul Brook88ca2a52009-05-13 22:21:47 +0100245qemu-io$(EXESUF): qemu-io.o qemu-tool.o tool-osdep.o cmd.o $(BLOCK_OBJS)
aliguori0a8e1ac2009-04-05 18:41:23 +0000246
247qemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz
bellard7a5ca862008-05-27 21:13:40 +0000248
bellard31e31b82003-02-18 22:55:36 +0000249clean:
bellard2d80ae82003-08-11 23:01:33 +0000250# avoid old build problems by removing potentially incorrect old files
ths5fafdf22007-09-16 21:08:06 +0000251 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 +0000252 rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
Anthony Liguori019d6b82009-05-09 17:14:19 -0500253 rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
bellard7d3505c2004-05-12 19:32:15 +0000254 $(MAKE) -C tests clean
Paul Brook1ad21342009-05-19 16:17:58 +0100255 for d in $(TARGET_DIRS) libhw32 libhw64; do \
bellard7d3505c2004-05-12 19:32:15 +0000256 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000257 done
bellard31e31b82003-02-18 22:55:36 +0000258
bellard7d132992003-03-06 23:23:54 +0000259distclean: clean
aliguori016c62c2009-04-05 17:40:50 +0000260 rm -f config-host.mak config-host.h $(DOCS) qemu-options.texi
pbrook0cb3fb12006-05-14 12:07:53 +0000261 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
Paul Brook1ad21342009-05-19 16:17:58 +0100262 for d in $(TARGET_DIRS) libhw32 libhw64; do \
bellardbc1b0502003-10-28 00:12:52 +0000263 rm -rf $$d || exit 1 ; \
bellard76bc6832003-08-10 23:41:46 +0000264 done
bellard7d132992003-03-06 23:23:54 +0000265
bellardfed4a9a2004-12-12 22:18:34 +0000266KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
267ar de en-us fi fr-be hr it lv nl pl ru th \
268common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
269
ths77755342008-11-27 15:45:16 +0000270ifdef INSTALL_BLOBS
271BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
aurel32e5d01b02009-01-09 11:01:31 +0000272video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
273pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
Edgar E. Iglesias4b0c7aa2009-06-03 21:54:31 +0200274bamboo.dtb petalogix-s3adsp1800.dtb
ths77755342008-11-27 15:45:16 +0000275else
276BLOBS=
277endif
278
pbrook38954dc2006-04-30 23:54:18 +0000279install-doc: $(DOCS)
aliguori58f8aea2009-04-18 15:36:02 +0000280 $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
281 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
pbrook38954dc2006-04-30 23:54:18 +0000282ifndef CONFIG_WIN32
aliguori58f8aea2009-04-18 15:36:02 +0000283 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
284 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
285 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
286 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
pbrook38954dc2006-04-30 23:54:18 +0000287endif
288
289install: all $(if $(BUILD_DOCS),install-doc)
aliguori58f8aea2009-04-18 15:36:02 +0000290 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000291ifneq ($(TOOLS),)
aliguori58f8aea2009-04-18 15:36:02 +0000292 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000293endif
ths77755342008-11-27 15:45:16 +0000294ifneq ($(BLOBS),)
aliguori58f8aea2009-04-18 15:36:02 +0000295 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
ths77755342008-11-27 15:45:16 +0000296 set -e; for x in $(BLOBS); do \
aliguori58f8aea2009-04-18 15:36:02 +0000297 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
pbrookad064842006-04-16 12:41:07 +0000298 done
ths77755342008-11-27 15:45:16 +0000299endif
bellard11d9f692004-04-02 20:55:59 +0000300ifndef CONFIG_WIN32
aliguori58f8aea2009-04-18 15:36:02 +0000301 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
blueswir118be8d72008-03-05 18:16:09 +0000302 set -e; for x in $(KEYMAPS); do \
Anthony Liguori79fd42a2009-05-28 03:11:42 -0500303 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
pbrookad064842006-04-16 12:41:07 +0000304 done
bellard11d9f692004-04-02 20:55:59 +0000305endif
bellard626df762003-08-10 21:39:31 +0000306 for d in $(TARGET_DIRS); do \
bellard7d3505c2004-05-12 19:32:15 +0000307 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000308 done
bellard612384d2003-03-22 17:31:19 +0000309
bellard367e86e2003-03-01 17:13:26 +0000310# various test targets
bellard9b0b8202007-11-14 10:34:57 +0000311test speed: all
bellard7d3505c2004-05-12 19:32:15 +0000312 $(MAKE) -C tests $@
bellard31e31b82003-02-18 22:55:36 +0000313
ths5fafdf22007-09-16 21:08:06 +0000314TAGS:
bellardb9adb4a2003-04-29 20:41:16 +0000315 etags *.[ch] tests/*.[ch]
bellard31e31b82003-02-18 22:55:36 +0000316
bellard6688bc62005-08-21 09:23:39 +0000317cscope:
318 rm -f ./cscope.*
aurel32ede46082008-10-01 21:46:58 +0000319 find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
bellard6688bc62005-08-21 09:23:39 +0000320 cscope -b
321
bellard3ef693a2003-03-23 20:17:16 +0000322# documentation
bellard1f673132004-04-04 15:21:17 +0000323%.html: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000324 $(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
bellard3ef693a2003-03-23 20:17:16 +0000325
bellardf3548322006-04-30 22:51:54 +0000326%.info: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000327 $(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000328
329%.dvi: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000330 $(call quiet-command,texi2dvi -I . $<," GEN $@")
blueswir15824d652009-03-28 06:44:27 +0000331
332qemu-options.texi: $(SRC_PATH)/qemu-options.hx
aliguori0d00e562009-04-05 17:40:46 +0000333 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000334
Blue Swirl23130862009-06-06 08:22:04 +0000335qemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
336 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
337
338qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
aliguori0d00e562009-04-05 17:40:46 +0000339 $(call quiet-command, \
340 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
341 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
342 " GEN $@")
bellard5a671352003-10-01 00:13:48 +0000343
bellardacd935e2004-11-15 22:57:26 +0000344qemu-img.1: qemu-img.texi
aliguori0d00e562009-04-05 17:40:46 +0000345 $(call quiet-command, \
346 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
347 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
348 " GEN $@")
bellardacd935e2004-11-15 22:57:26 +0000349
bellard7a5ca862008-05-27 21:13:40 +0000350qemu-nbd.8: qemu-nbd.texi
aliguori0d00e562009-04-05 17:40:46 +0000351 $(call quiet-command, \
352 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
353 pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
354 " GEN $@")
bellard7a5ca862008-05-27 21:13:40 +0000355
pbrook0cb3fb12006-05-14 12:07:53 +0000356info: qemu-doc.info qemu-tech.info
357
358dvi: qemu-doc.dvi qemu-tech.dvi
359
360html: qemu-doc.html qemu-tech.html
361
Blue Swirl23130862009-06-06 08:22:04 +0000362qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-monitor.texi
aliguori818220f2008-09-24 01:13:40 +0000363
thsdf5cf722007-01-24 22:56:36 +0000364VERSION ?= $(shell cat VERSION)
365FILE = qemu-$(VERSION)
bellard586314f2003-03-03 15:02:29 +0000366
bellard1e43adf2003-09-30 20:54:24 +0000367# tar release (use 'make -k tar' on a checkouted tree)
bellard586314f2003-03-03 15:02:29 +0000368tar:
369 rm -rf /tmp/$(FILE)
bellard1e43adf2003-09-30 20:54:24 +0000370 cp -r . /tmp/$(FILE)
aurel3299c6c082008-04-22 20:45:30 +0000371 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
bellard586314f2003-03-03 15:02:29 +0000372 rm -rf /tmp/$(FILE)
373
bellard76b62fd2003-10-28 00:47:44 +0000374# generate a binary distribution
bellardd691f662003-03-24 21:58:34 +0000375tarbin:
blueswir118be8d72008-03-05 18:16:09 +0000376 cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
bellard43095f32005-04-27 20:49:23 +0000377 $(bindir)/qemu \
bellard43095f32005-04-27 20:49:23 +0000378 $(bindir)/qemu-system-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000379 $(bindir)/qemu-system-arm \
380 $(bindir)/qemu-system-cris \
381 $(bindir)/qemu-system-m68k \
bellard93856aa2005-07-24 18:44:35 +0000382 $(bindir)/qemu-system-mips \
pbrook38260992006-03-11 14:51:13 +0000383 $(bindir)/qemu-system-mipsel \
thsfbe4f652007-04-01 11:16:48 +0000384 $(bindir)/qemu-system-mips64 \
385 $(bindir)/qemu-system-mips64el \
aurel3240e8a532009-01-03 12:35:57 +0000386 $(bindir)/qemu-system-ppc \
387 $(bindir)/qemu-system-ppcemb \
388 $(bindir)/qemu-system-ppc64 \
thsff1aaf62007-09-29 21:18:26 +0000389 $(bindir)/qemu-system-sh4 \
ths85ffbdf2007-12-09 05:10:03 +0000390 $(bindir)/qemu-system-sh4eb \
aurel3240e8a532009-01-03 12:35:57 +0000391 $(bindir)/qemu-system-sparc \
bellard7efa4382004-05-12 18:54:06 +0000392 $(bindir)/qemu-i386 \
bellardf0403c02008-01-06 18:27:12 +0000393 $(bindir)/qemu-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000394 $(bindir)/qemu-alpha \
395 $(bindir)/qemu-arm \
396 $(bindir)/qemu-armeb \
397 $(bindir)/qemu-cris \
398 $(bindir)/qemu-m68k \
399 $(bindir)/qemu-mips \
400 $(bindir)/qemu-mipsel \
401 $(bindir)/qemu-ppc \
402 $(bindir)/qemu-ppc64 \
403 $(bindir)/qemu-ppc64abi32 \
404 $(bindir)/qemu-sh4 \
405 $(bindir)/qemu-sh4eb \
406 $(bindir)/qemu-sparc \
407 $(bindir)/qemu-sparc64 \
408 $(bindir)/qemu-sparc32plus \
409 $(bindir)/qemu-img \
410 $(bindir)/qemu-nbd \
bellard7efa4382004-05-12 18:54:06 +0000411 $(datadir)/bios.bin \
412 $(datadir)/vgabios.bin \
bellardde9258a2004-06-06 15:50:03 +0000413 $(datadir)/vgabios-cirrus.bin \
bellard637f6cd2004-06-21 19:54:47 +0000414 $(datadir)/ppc_rom.bin \
bellardd5295252005-07-03 14:00:51 +0000415 $(datadir)/video.x \
bellard0986ac32006-06-14 12:36:32 +0000416 $(datadir)/openbios-sparc32 \
blueswir1938255d2008-04-23 19:38:07 +0000417 $(datadir)/openbios-sparc64 \
aurel32e5d01b02009-01-09 11:01:31 +0000418 $(datadir)/openbios-ppc \
aurel3240e8a532009-01-03 12:35:57 +0000419 $(datadir)/pxe-ne2k_pci.bin \
bellard19c80e52007-02-05 21:22:42 +0000420 $(datadir)/pxe-rtl8139.bin \
aurel3240e8a532009-01-03 12:35:57 +0000421 $(datadir)/pxe-pcnet.bin \
aliguori29919902008-07-26 16:53:22 +0000422 $(datadir)/pxe-e1000.bin \
bellard1f50f8d2004-05-08 14:44:43 +0000423 $(docdir)/qemu-doc.html \
424 $(docdir)/qemu-tech.html \
aurel3240e8a532009-01-03 12:35:57 +0000425 $(mandir)/man1/qemu.1 \
426 $(mandir)/man1/qemu-img.1 \
bellard7a5ca862008-05-27 21:13:40 +0000427 $(mandir)/man8/qemu-nbd.8
bellardd691f662003-03-24 21:58:34 +0000428
bellard4fb240a2007-11-07 19:24:02 +0000429# Include automatically generated dependency files
Anthony Liguori019d6b82009-05-09 17:14:19 -0500430-include $(wildcard *.d audio/*.d slirp/*.d block/*.d)