blob: 86499382de13bb29cfcaa0eabfe6c896fd52dbd4 [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),)
pbrookad064842006-04-16 12:41:07 +00004include config-host.mak
aliguori17759182009-01-21 18:12:52 +00005include $(SRC_PATH)/rules.mak
aurel3255d7e8f2009-04-15 14:42:57 +00006else
7config-host.mak:
8 @echo "Please call configure before running make!"
9 @exit 1
10endif
bellard766a4872003-02-18 23:35:48 +000011
aliguori818220f2008-09-24 01:13:40 +000012.PHONY: all clean cscope distclean dvi html info install install-doc \
13 recurse-all speed tar tarbin test
pbrook0cb3fb12006-05-14 12:07:53 +000014
pbrook8c462f82007-11-18 21:12:37 +000015VPATH=$(SRC_PATH):$(SRC_PATH)/hw
16
aliguori17759182009-01-21 18:12:52 +000017
bellard40293e52008-01-31 11:32:10 +000018CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
19LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
blueswir131422552007-04-16 18:27:06 +000020
malc96935aa2008-07-02 21:16:22 +000021CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
bellard4fb240a2007-11-07 19:24:02 +000022CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
bellard766a4872003-02-18 23:35:48 +000023LIBS=
bellard1f50f8d2004-05-08 14:44:43 +000024ifdef CONFIG_STATIC
bellard40293e52008-01-31 11:32:10 +000025LDFLAGS += -static
bellard1f50f8d2004-05-08 14:44:43 +000026endif
pbrookcc8ae6d2006-04-23 17:57:59 +000027ifdef BUILD_DOCS
bellard7a5ca862008-05-27 21:13:40 +000028DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
pbrookcc8ae6d2006-04-23 17:57:59 +000029else
30DOCS=
31endif
bellard7d132992003-03-06 23:23:54 +000032
aliguorie5d355d2009-04-24 18:03:15 +000033LIBS+=$(PTHREADLIBS)
34LIBS+=$(CLOCKLIBS)
bellard83f64092006-08-01 16:21:11 +000035
aliguori7e00eb92008-08-02 01:57:02 +000036ifdef CONFIG_SOLARIS
37LIBS+=-lsocket -lnsl -lresolv
38endif
39
aliguori03ff3ca2008-09-15 15:51:35 +000040ifdef CONFIG_WIN32
41LIBS+=-lwinmm -lws2_32 -liphlpapi
42endif
43
aliguori818220f2008-09-24 01:13:40 +000044all: $(TOOLS) $(DOCS) recurse-all
pbrookb9dea4f2006-05-13 16:54:03 +000045
aurel3255d7e8f2009-04-15 14:42:57 +000046config-host.mak: configure
47ifneq ($(wildcard config-host.mak),)
48 @echo $@ is out-of-date, running configure
blueswir1052ff922009-04-17 20:01:12 +000049 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
aurel3255d7e8f2009-04-15 14:42:57 +000050endif
51
Paul Brook00873752009-05-07 02:00:31 +010052SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
pbrookcec7d0b2008-05-28 16:44:57 +000053SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
54
aurel3286e840e2008-12-07 15:21:23 +000055subdir-%:
Paul Brook00873752009-05-07 02:00:31 +010056 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
pbrook4aa42532006-05-13 13:55:08 +000057
pbrookcec7d0b2008-05-28 16:44:57 +000058$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
59$(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
60
61recurse-all: $(SUBDIR_RULES)
bellard83f64092006-08-01 16:21:11 +000062
pbrookfaf07962007-11-11 02:51:17 +000063#######################################################################
64# BLOCK_OBJS is code used by both qemu system emulation and qemu-img
65
Mark McLoughlin451c4ab2009-04-27 18:38:42 +010066BLOCK_OBJS=cutils.o cache-utils.o qemu-malloc.o
pbrookfaf07962007-11-11 02:51:17 +000067BLOCK_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o
68BLOCK_OBJS+=block-dmg.o block-bochs.o block-vpc.o block-vvfat.o
aliguori03ff3ca2008-09-15 15:51:35 +000069BLOCK_OBJS+=block-qcow2.o block-parallels.o block-nbd.o
aliguoria76bab42008-09-22 19:17:18 +000070BLOCK_OBJS+=nbd.o block.o aio.o
aliguori03ff3ca2008-09-15 15:51:35 +000071
72ifdef CONFIG_WIN32
73BLOCK_OBJS += block-raw-win32.o
74else
aliguori3c529d92008-12-12 16:41:40 +000075ifdef CONFIG_AIO
76BLOCK_OBJS += posix-aio-compat.o
77endif
aliguori03ff3ca2008-09-15 15:51:35 +000078BLOCK_OBJS += block-raw-posix.o
79endif
80
bellard4fb240a2007-11-07 19:24:02 +000081######################################################################
bellard2e2ea902008-02-01 10:02:52 +000082# libqemu_common.a: Target independent part of system emulation. The
bellard4fb240a2007-11-07 19:24:02 +000083# long term path is to suppress *all* target specific code in case of
84# system emulation, i.e. a single QEMU executable should support all
85# CPUs and machines.
bellard47cea612004-05-17 20:06:42 +000086
aliguoricd01b4a2008-08-21 19:25:45 +000087OBJS=$(BLOCK_OBJS)
pbrook87ecb682007-11-17 17:14:51 +000088OBJS+=readline.o console.o
aliguoricd01b4a2008-08-21 19:25:45 +000089
blueswir1e9c28332009-04-11 09:04:44 +000090OBJS+=irq.o ptimer.o
pbrook87ecb682007-11-17 17:14:51 +000091OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
balrog7e7c5e42008-04-14 21:57:44 +000092OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
blueswir1e9c28332009-04-11 09:04:44 +000093OBJS+=tmp105.o lm832x.o eeprom93xx.o tsc2005.o
pbrook87ecb682007-11-17 17:14:51 +000094OBJS+=scsi-disk.o cdrom.o
ths985a03b2007-12-24 16:10:43 +000095OBJS+=scsi-generic.o
blueswir168063642008-11-22 21:03:55 +000096OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
balrog6c9f8862008-07-17 20:47:13 +000097OBJS+=usb-serial.o usb-net.o
pbrook775616c2007-11-24 23:35:08 +000098OBJS+=sd.o ssi-sd.o
balroge6a6d5a2008-09-29 00:40:44 +000099OBJS+=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 +0000100OBJS+=bt-hci-csr.o
aliguori559b90f2008-11-11 21:20:14 +0000101OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
malc902b3d52008-12-10 19:18:40 +0000102OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o
blueswir1e9c28332009-04-11 09:04:44 +0000103OBJS+=msmouse.o ps2.o
pbrook87ecb682007-11-17 17:14:51 +0000104
aurel322e4d9fb2008-04-08 06:01:02 +0000105ifdef CONFIG_BRLAPI
106OBJS+= baum.o
107LIBS+=-lbrlapi
108endif
109
bellard4fb240a2007-11-07 19:24:02 +0000110ifdef CONFIG_WIN32
111OBJS+=tap-win32.o
aliguori559b90f2008-11-11 21:20:14 +0000112else
113OBJS+=migration-exec.o
bellard4fb240a2007-11-07 19:24:02 +0000114endif
115
116AUDIO_OBJS = audio.o noaudio.o wavaudio.o mixeng.o
117ifdef CONFIG_SDL
118AUDIO_OBJS += sdlaudio.o
119endif
120ifdef CONFIG_OSS
121AUDIO_OBJS += ossaudio.o
122endif
123ifdef CONFIG_COREAUDIO
124AUDIO_OBJS += coreaudio.o
balrogca9cc282008-01-14 04:24:29 +0000125AUDIO_PT = yes
bellard4fb240a2007-11-07 19:24:02 +0000126endif
127ifdef CONFIG_ALSA
128AUDIO_OBJS += alsaaudio.o
129endif
130ifdef CONFIG_DSOUND
131AUDIO_OBJS += dsoundaudio.o
132endif
133ifdef CONFIG_FMOD
134AUDIO_OBJS += fmodaudio.o
135audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS)
136endif
balrogca9cc282008-01-14 04:24:29 +0000137ifdef CONFIG_ESD
138AUDIO_PT = yes
139AUDIO_PT_INT = yes
140AUDIO_OBJS += esdaudio.o
141endif
malcb8e59f12008-07-02 21:03:08 +0000142ifdef CONFIG_PA
143AUDIO_PT = yes
144AUDIO_PT_INT = yes
145AUDIO_OBJS += paaudio.o
146endif
balrogca9cc282008-01-14 04:24:29 +0000147ifdef AUDIO_PT
148LDFLAGS += -pthread
149endif
150ifdef AUDIO_PT_INT
151AUDIO_OBJS += audio_pt_int.o
152endif
bellard4fb240a2007-11-07 19:24:02 +0000153AUDIO_OBJS+= wavcapture.o
154OBJS+=$(addprefix audio/, $(AUDIO_OBJS))
155
aliguori04837552009-03-06 20:27:10 +0000156OBJS+=keymaps.o
bellard4fb240a2007-11-07 19:24:02 +0000157ifdef CONFIG_SDL
158OBJS+=sdl.o x_keymap.o
159endif
balrog4d3b6f62008-02-10 16:33:14 +0000160ifdef CONFIG_CURSES
161OBJS+=curses.o
162endif
aliguori76655d62009-03-06 20:27:37 +0000163OBJS+=vnc.o acl.o d3des.o
aliguori5fb6c7a2009-03-06 20:27:23 +0000164ifdef CONFIG_VNC_TLS
165OBJS+=vnc-tls.o vnc-auth-vencrypt.o
166endif
aliguori2f9606b2009-03-06 20:27:28 +0000167ifdef CONFIG_VNC_SASL
168OBJS+=vnc-auth-sasl.o
169endif
bellard4fb240a2007-11-07 19:24:02 +0000170
171ifdef CONFIG_COCOA
172OBJS+=cocoa.o
173endif
174
aliguorie5d355d2009-04-24 18:03:15 +0000175ifdef CONFIG_IOTHREAD
176OBJS+=qemu-thread.o
177endif
178
bellard4fb240a2007-11-07 19:24:02 +0000179ifdef CONFIG_SLIRP
180CPPFLAGS+=-I$(SRC_PATH)/slirp
181SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \
182slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \
183tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o
184OBJS+=$(addprefix slirp/, $(SLIRP_OBJS))
185endif
186
ths8a16d272008-07-19 09:56:24 +0000187LIBS+=$(VDE_LIBS)
188
bellard4fb240a2007-11-07 19:24:02 +0000189cocoa.o: cocoa.m
bellard4fb240a2007-11-07 19:24:02 +0000190
aliguori04837552009-03-06 20:27:10 +0000191keymaps.o: keymaps.c keymaps.h
192
193sdl.o: sdl.c keymaps.h sdl_keysym.h
aliguori807544e2009-01-21 18:12:44 +0000194
195sdl.o audio/sdlaudio.o: CFLAGS += $(SDL_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000196
aliguori76655d62009-03-06 20:27:37 +0000197acl.o: acl.h acl.c
198
aliguori2f9606b2009-03-06 20:27:28 +0000199vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
aliguori5fb6c7a2009-03-06 20:27:23 +0000200
aliguori76655d62009-03-06 20:27:37 +0000201vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
aliguori807544e2009-01-21 18:12:44 +0000202
203vnc.o: CFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000204
aliguori5fb6c7a2009-03-06 20:27:23 +0000205vnc-tls.o: vnc-tls.c vnc.h
206
207vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
208
aliguori2f9606b2009-03-06 20:27:28 +0000209vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
210
aliguori04837552009-03-06 20:27:10 +0000211curses.o: curses.c keymaps.h curses_keys.h
balrog4d3b6f62008-02-10 16:33:14 +0000212
aliguori807544e2009-01-21 18:12:44 +0000213bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000214
215libqemu_common.a: $(OBJS)
bellard4fb240a2007-11-07 19:24:02 +0000216
pbrookcec7d0b2008-05-28 16:44:57 +0000217#######################################################################
218# USER_OBJS is code used by qemu userspace emulation
malc902b3d52008-12-10 19:18:40 +0000219USER_OBJS=cutils.o cache-utils.o
pbrookcec7d0b2008-05-28 16:44:57 +0000220
221libqemu_user.a: $(USER_OBJS)
pbrookcec7d0b2008-05-28 16:44:57 +0000222
bellard4fb240a2007-11-07 19:24:02 +0000223######################################################################
224
aliguori03ff3ca2008-09-15 15:51:35 +0000225qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS)
bellard4fb240a2007-11-07 19:24:02 +0000226
aliguori03ff3ca2008-09-15 15:51:35 +0000227qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o osdep.o $(BLOCK_OBJS)
aliguori3aa892d2009-01-21 18:13:02 +0000228
aliguori0a8e1ac2009-04-05 18:41:23 +0000229qemu-io$(EXESUF): qemu-io.o qemu-tool.o osdep.o cmd.o $(BLOCK_OBJS)
230
231qemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz
bellard7a5ca862008-05-27 21:13:40 +0000232
bellard31e31b82003-02-18 22:55:36 +0000233clean:
bellard2d80ae82003-08-11 23:01:33 +0000234# avoid old build problems by removing potentially incorrect old files
ths5fafdf22007-09-16 21:08:06 +0000235 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 +0000236 rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
bellard4fb240a2007-11-07 19:24:02 +0000237 rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d
bellard7d3505c2004-05-12 19:32:15 +0000238 $(MAKE) -C tests clean
bellard626df762003-08-10 21:39:31 +0000239 for d in $(TARGET_DIRS); do \
bellard7d3505c2004-05-12 19:32:15 +0000240 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000241 done
bellard31e31b82003-02-18 22:55:36 +0000242
bellard7d132992003-03-06 23:23:54 +0000243distclean: clean
aliguori016c62c2009-04-05 17:40:50 +0000244 rm -f config-host.mak config-host.h $(DOCS) qemu-options.texi
pbrook0cb3fb12006-05-14 12:07:53 +0000245 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
bellard76bc6832003-08-10 23:41:46 +0000246 for d in $(TARGET_DIRS); do \
bellardbc1b0502003-10-28 00:12:52 +0000247 rm -rf $$d || exit 1 ; \
bellard76bc6832003-08-10 23:41:46 +0000248 done
bellard7d132992003-03-06 23:23:54 +0000249
bellardfed4a9a2004-12-12 22:18:34 +0000250KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
251ar de en-us fi fr-be hr it lv nl pl ru th \
252common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
253
ths77755342008-11-27 15:45:16 +0000254ifdef INSTALL_BLOBS
255BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
aurel32e5d01b02009-01-09 11:01:31 +0000256video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
257pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
258bamboo.dtb
ths77755342008-11-27 15:45:16 +0000259else
260BLOBS=
261endif
262
pbrook38954dc2006-04-30 23:54:18 +0000263install-doc: $(DOCS)
aliguori58f8aea2009-04-18 15:36:02 +0000264 $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
265 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
pbrook38954dc2006-04-30 23:54:18 +0000266ifndef CONFIG_WIN32
aliguori58f8aea2009-04-18 15:36:02 +0000267 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
268 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
269 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
270 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
pbrook38954dc2006-04-30 23:54:18 +0000271endif
272
273install: all $(if $(BUILD_DOCS),install-doc)
aliguori58f8aea2009-04-18 15:36:02 +0000274 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000275ifneq ($(TOOLS),)
aliguori58f8aea2009-04-18 15:36:02 +0000276 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000277endif
ths77755342008-11-27 15:45:16 +0000278ifneq ($(BLOBS),)
aliguori58f8aea2009-04-18 15:36:02 +0000279 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
ths77755342008-11-27 15:45:16 +0000280 set -e; for x in $(BLOBS); do \
aliguori58f8aea2009-04-18 15:36:02 +0000281 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
pbrookad064842006-04-16 12:41:07 +0000282 done
ths77755342008-11-27 15:45:16 +0000283endif
bellard11d9f692004-04-02 20:55:59 +0000284ifndef CONFIG_WIN32
aliguori58f8aea2009-04-18 15:36:02 +0000285 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
blueswir118be8d72008-03-05 18:16:09 +0000286 set -e; for x in $(KEYMAPS); do \
aliguori58f8aea2009-04-18 15:36:02 +0000287 $(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
pbrookad064842006-04-16 12:41:07 +0000288 done
bellard11d9f692004-04-02 20:55:59 +0000289endif
bellard626df762003-08-10 21:39:31 +0000290 for d in $(TARGET_DIRS); do \
bellard7d3505c2004-05-12 19:32:15 +0000291 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000292 done
bellard612384d2003-03-22 17:31:19 +0000293
bellard367e86e2003-03-01 17:13:26 +0000294# various test targets
bellard9b0b8202007-11-14 10:34:57 +0000295test speed: all
bellard7d3505c2004-05-12 19:32:15 +0000296 $(MAKE) -C tests $@
bellard31e31b82003-02-18 22:55:36 +0000297
ths5fafdf22007-09-16 21:08:06 +0000298TAGS:
bellardb9adb4a2003-04-29 20:41:16 +0000299 etags *.[ch] tests/*.[ch]
bellard31e31b82003-02-18 22:55:36 +0000300
bellard6688bc62005-08-21 09:23:39 +0000301cscope:
302 rm -f ./cscope.*
aurel32ede46082008-10-01 21:46:58 +0000303 find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
bellard6688bc62005-08-21 09:23:39 +0000304 cscope -b
305
bellard3ef693a2003-03-23 20:17:16 +0000306# documentation
bellard1f673132004-04-04 15:21:17 +0000307%.html: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000308 $(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
bellard3ef693a2003-03-23 20:17:16 +0000309
bellardf3548322006-04-30 22:51:54 +0000310%.info: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000311 $(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000312
313%.dvi: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000314 $(call quiet-command,texi2dvi -I . $<," GEN $@")
blueswir15824d652009-03-28 06:44:27 +0000315
316qemu-options.texi: $(SRC_PATH)/qemu-options.hx
aliguori0d00e562009-04-05 17:40:46 +0000317 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000318
blueswir175456682009-04-19 10:25:05 +0000319qemu.1: qemu-doc.texi qemu-options.texi
aliguori0d00e562009-04-05 17:40:46 +0000320 $(call quiet-command, \
321 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
322 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
323 " GEN $@")
bellard5a671352003-10-01 00:13:48 +0000324
bellardacd935e2004-11-15 22:57:26 +0000325qemu-img.1: qemu-img.texi
aliguori0d00e562009-04-05 17:40:46 +0000326 $(call quiet-command, \
327 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
328 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
329 " GEN $@")
bellardacd935e2004-11-15 22:57:26 +0000330
bellard7a5ca862008-05-27 21:13:40 +0000331qemu-nbd.8: qemu-nbd.texi
aliguori0d00e562009-04-05 17:40:46 +0000332 $(call quiet-command, \
333 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
334 pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
335 " GEN $@")
bellard7a5ca862008-05-27 21:13:40 +0000336
pbrook0cb3fb12006-05-14 12:07:53 +0000337info: qemu-doc.info qemu-tech.info
338
339dvi: qemu-doc.dvi qemu-tech.dvi
340
341html: qemu-doc.html qemu-tech.html
342
blueswir15824d652009-03-28 06:44:27 +0000343qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi
aliguori818220f2008-09-24 01:13:40 +0000344
thsdf5cf722007-01-24 22:56:36 +0000345VERSION ?= $(shell cat VERSION)
346FILE = qemu-$(VERSION)
bellard586314f2003-03-03 15:02:29 +0000347
bellard1e43adf2003-09-30 20:54:24 +0000348# tar release (use 'make -k tar' on a checkouted tree)
bellard586314f2003-03-03 15:02:29 +0000349tar:
350 rm -rf /tmp/$(FILE)
bellard1e43adf2003-09-30 20:54:24 +0000351 cp -r . /tmp/$(FILE)
aurel3299c6c082008-04-22 20:45:30 +0000352 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
bellard586314f2003-03-03 15:02:29 +0000353 rm -rf /tmp/$(FILE)
354
bellard76b62fd2003-10-28 00:47:44 +0000355# generate a binary distribution
bellardd691f662003-03-24 21:58:34 +0000356tarbin:
blueswir118be8d72008-03-05 18:16:09 +0000357 cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
bellard43095f32005-04-27 20:49:23 +0000358 $(bindir)/qemu \
bellard43095f32005-04-27 20:49:23 +0000359 $(bindir)/qemu-system-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000360 $(bindir)/qemu-system-arm \
361 $(bindir)/qemu-system-cris \
362 $(bindir)/qemu-system-m68k \
bellard93856aa2005-07-24 18:44:35 +0000363 $(bindir)/qemu-system-mips \
pbrook38260992006-03-11 14:51:13 +0000364 $(bindir)/qemu-system-mipsel \
thsfbe4f652007-04-01 11:16:48 +0000365 $(bindir)/qemu-system-mips64 \
366 $(bindir)/qemu-system-mips64el \
aurel3240e8a532009-01-03 12:35:57 +0000367 $(bindir)/qemu-system-ppc \
368 $(bindir)/qemu-system-ppcemb \
369 $(bindir)/qemu-system-ppc64 \
thsff1aaf62007-09-29 21:18:26 +0000370 $(bindir)/qemu-system-sh4 \
ths85ffbdf2007-12-09 05:10:03 +0000371 $(bindir)/qemu-system-sh4eb \
aurel3240e8a532009-01-03 12:35:57 +0000372 $(bindir)/qemu-system-sparc \
bellard7efa4382004-05-12 18:54:06 +0000373 $(bindir)/qemu-i386 \
bellardf0403c02008-01-06 18:27:12 +0000374 $(bindir)/qemu-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000375 $(bindir)/qemu-alpha \
376 $(bindir)/qemu-arm \
377 $(bindir)/qemu-armeb \
378 $(bindir)/qemu-cris \
379 $(bindir)/qemu-m68k \
380 $(bindir)/qemu-mips \
381 $(bindir)/qemu-mipsel \
382 $(bindir)/qemu-ppc \
383 $(bindir)/qemu-ppc64 \
384 $(bindir)/qemu-ppc64abi32 \
385 $(bindir)/qemu-sh4 \
386 $(bindir)/qemu-sh4eb \
387 $(bindir)/qemu-sparc \
388 $(bindir)/qemu-sparc64 \
389 $(bindir)/qemu-sparc32plus \
390 $(bindir)/qemu-img \
391 $(bindir)/qemu-nbd \
bellard7efa4382004-05-12 18:54:06 +0000392 $(datadir)/bios.bin \
393 $(datadir)/vgabios.bin \
bellardde9258a2004-06-06 15:50:03 +0000394 $(datadir)/vgabios-cirrus.bin \
bellard637f6cd2004-06-21 19:54:47 +0000395 $(datadir)/ppc_rom.bin \
bellardd5295252005-07-03 14:00:51 +0000396 $(datadir)/video.x \
bellard0986ac32006-06-14 12:36:32 +0000397 $(datadir)/openbios-sparc32 \
blueswir1938255d2008-04-23 19:38:07 +0000398 $(datadir)/openbios-sparc64 \
aurel32e5d01b02009-01-09 11:01:31 +0000399 $(datadir)/openbios-ppc \
aurel3240e8a532009-01-03 12:35:57 +0000400 $(datadir)/pxe-ne2k_pci.bin \
bellard19c80e52007-02-05 21:22:42 +0000401 $(datadir)/pxe-rtl8139.bin \
aurel3240e8a532009-01-03 12:35:57 +0000402 $(datadir)/pxe-pcnet.bin \
aliguori29919902008-07-26 16:53:22 +0000403 $(datadir)/pxe-e1000.bin \
bellard1f50f8d2004-05-08 14:44:43 +0000404 $(docdir)/qemu-doc.html \
405 $(docdir)/qemu-tech.html \
aurel3240e8a532009-01-03 12:35:57 +0000406 $(mandir)/man1/qemu.1 \
407 $(mandir)/man1/qemu-img.1 \
bellard7a5ca862008-05-27 21:13:40 +0000408 $(mandir)/man8/qemu-nbd.8
bellardd691f662003-03-24 21:58:34 +0000409
bellard4fb240a2007-11-07 19:24:02 +0000410# Include automatically generated dependency files
411-include $(wildcard *.d audio/*.d slirp/*.d)