blob: 49fd2fa4b2626cea2ed12187a8588e2880fd67bb [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
bellard4fb240a2007-11-07 19:24:02 +000083######################################################################
bellard2e2ea902008-02-01 10:02:52 +000084# libqemu_common.a: Target independent part of system emulation. The
bellard4fb240a2007-11-07 19:24:02 +000085# long term path is to suppress *all* target specific code in case of
86# system emulation, i.e. a single QEMU executable should support all
87# CPUs and machines.
bellard47cea612004-05-17 20:06:42 +000088
aliguoricd01b4a2008-08-21 19:25:45 +000089OBJS=$(BLOCK_OBJS)
pbrook87ecb682007-11-17 17:14:51 +000090OBJS+=readline.o console.o
aliguoricd01b4a2008-08-21 19:25:45 +000091
blueswir1e9c28332009-04-11 09:04:44 +000092OBJS+=irq.o ptimer.o
pbrook87ecb682007-11-17 17:14:51 +000093OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
balrog7e7c5e42008-04-14 21:57:44 +000094OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
blueswir1e9c28332009-04-11 09:04:44 +000095OBJS+=tmp105.o lm832x.o eeprom93xx.o tsc2005.o
pbrook87ecb682007-11-17 17:14:51 +000096OBJS+=scsi-disk.o cdrom.o
ths985a03b2007-12-24 16:10:43 +000097OBJS+=scsi-generic.o
blueswir168063642008-11-22 21:03:55 +000098OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
balrog6c9f8862008-07-17 20:47:13 +000099OBJS+=usb-serial.o usb-net.o
pbrook775616c2007-11-24 23:35:08 +0000100OBJS+=sd.o ssi-sd.o
balroge6a6d5a2008-09-29 00:40:44 +0000101OBJS+=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 +0000102OBJS+=bt-hci-csr.o
aliguori559b90f2008-11-11 21:20:14 +0000103OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
malc902b3d52008-12-10 19:18:40 +0000104OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o
blueswir1e9c28332009-04-11 09:04:44 +0000105OBJS+=msmouse.o ps2.o
Paul Brook90d37232009-05-14 22:35:09 +0100106OBJS+=qdev.o ssi.o
pbrook87ecb682007-11-17 17:14:51 +0000107
aurel322e4d9fb2008-04-08 06:01:02 +0000108ifdef CONFIG_BRLAPI
109OBJS+= baum.o
110LIBS+=-lbrlapi
111endif
112
bellard4fb240a2007-11-07 19:24:02 +0000113ifdef CONFIG_WIN32
114OBJS+=tap-win32.o
aliguori559b90f2008-11-11 21:20:14 +0000115else
116OBJS+=migration-exec.o
bellard4fb240a2007-11-07 19:24:02 +0000117endif
118
119AUDIO_OBJS = audio.o noaudio.o wavaudio.o mixeng.o
120ifdef CONFIG_SDL
121AUDIO_OBJS += sdlaudio.o
122endif
123ifdef CONFIG_OSS
124AUDIO_OBJS += ossaudio.o
125endif
126ifdef CONFIG_COREAUDIO
127AUDIO_OBJS += coreaudio.o
balrogca9cc282008-01-14 04:24:29 +0000128AUDIO_PT = yes
bellard4fb240a2007-11-07 19:24:02 +0000129endif
130ifdef CONFIG_ALSA
131AUDIO_OBJS += alsaaudio.o
132endif
133ifdef CONFIG_DSOUND
134AUDIO_OBJS += dsoundaudio.o
135endif
136ifdef CONFIG_FMOD
137AUDIO_OBJS += fmodaudio.o
138audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS)
139endif
balrogca9cc282008-01-14 04:24:29 +0000140ifdef CONFIG_ESD
141AUDIO_PT = yes
142AUDIO_PT_INT = yes
143AUDIO_OBJS += esdaudio.o
144endif
malcb8e59f12008-07-02 21:03:08 +0000145ifdef CONFIG_PA
146AUDIO_PT = yes
147AUDIO_PT_INT = yes
148AUDIO_OBJS += paaudio.o
149endif
balrogca9cc282008-01-14 04:24:29 +0000150ifdef AUDIO_PT
151LDFLAGS += -pthread
152endif
153ifdef AUDIO_PT_INT
154AUDIO_OBJS += audio_pt_int.o
155endif
bellard4fb240a2007-11-07 19:24:02 +0000156AUDIO_OBJS+= wavcapture.o
157OBJS+=$(addprefix audio/, $(AUDIO_OBJS))
158
aliguori04837552009-03-06 20:27:10 +0000159OBJS+=keymaps.o
bellard4fb240a2007-11-07 19:24:02 +0000160ifdef CONFIG_SDL
161OBJS+=sdl.o x_keymap.o
162endif
balrog4d3b6f62008-02-10 16:33:14 +0000163ifdef CONFIG_CURSES
164OBJS+=curses.o
165endif
aliguori76655d62009-03-06 20:27:37 +0000166OBJS+=vnc.o acl.o d3des.o
aliguori5fb6c7a2009-03-06 20:27:23 +0000167ifdef CONFIG_VNC_TLS
168OBJS+=vnc-tls.o vnc-auth-vencrypt.o
169endif
aliguori2f9606b2009-03-06 20:27:28 +0000170ifdef CONFIG_VNC_SASL
171OBJS+=vnc-auth-sasl.o
172endif
bellard4fb240a2007-11-07 19:24:02 +0000173
174ifdef CONFIG_COCOA
175OBJS+=cocoa.o
176endif
177
aliguorie5d355d2009-04-24 18:03:15 +0000178ifdef CONFIG_IOTHREAD
179OBJS+=qemu-thread.o
180endif
181
bellard4fb240a2007-11-07 19:24:02 +0000182ifdef CONFIG_SLIRP
183CPPFLAGS+=-I$(SRC_PATH)/slirp
184SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \
185slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \
186tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o
187OBJS+=$(addprefix slirp/, $(SLIRP_OBJS))
188endif
189
ths8a16d272008-07-19 09:56:24 +0000190LIBS+=$(VDE_LIBS)
191
Blue Swirl2567f572009-05-21 15:54:48 +0000192# xen backend driver support
193XEN_OBJS := xen_backend.o xen_devconfig.o
194XEN_OBJS += xen_console.o xenfb.o xen_disk.o xen_nic.o
195ifdef CONFIG_XEN
196 OBJS += $(XEN_OBJS)
197endif
198
bellard4fb240a2007-11-07 19:24:02 +0000199cocoa.o: cocoa.m
bellard4fb240a2007-11-07 19:24:02 +0000200
aliguori04837552009-03-06 20:27:10 +0000201keymaps.o: keymaps.c keymaps.h
202
203sdl.o: sdl.c keymaps.h sdl_keysym.h
aliguori807544e2009-01-21 18:12:44 +0000204
205sdl.o audio/sdlaudio.o: CFLAGS += $(SDL_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000206
aliguori76655d62009-03-06 20:27:37 +0000207acl.o: acl.h acl.c
208
aliguori2f9606b2009-03-06 20:27:28 +0000209vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
aliguori5fb6c7a2009-03-06 20:27:23 +0000210
aliguori76655d62009-03-06 20:27:37 +0000211vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
aliguori807544e2009-01-21 18:12:44 +0000212
213vnc.o: CFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000214
aliguori5fb6c7a2009-03-06 20:27:23 +0000215vnc-tls.o: vnc-tls.c vnc.h
216
217vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
218
aliguori2f9606b2009-03-06 20:27:28 +0000219vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
220
aliguori04837552009-03-06 20:27:10 +0000221curses.o: curses.c keymaps.h curses_keys.h
balrog4d3b6f62008-02-10 16:33:14 +0000222
aliguori807544e2009-01-21 18:12:44 +0000223bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000224
225libqemu_common.a: $(OBJS)
bellard4fb240a2007-11-07 19:24:02 +0000226
pbrookcec7d0b2008-05-28 16:44:57 +0000227#######################################################################
228# USER_OBJS is code used by qemu userspace emulation
malc902b3d52008-12-10 19:18:40 +0000229USER_OBJS=cutils.o cache-utils.o
pbrookcec7d0b2008-05-28 16:44:57 +0000230
231libqemu_user.a: $(USER_OBJS)
pbrookcec7d0b2008-05-28 16:44:57 +0000232
bellard4fb240a2007-11-07 19:24:02 +0000233######################################################################
234
Paul Brook88ca2a52009-05-13 22:21:47 +0100235qemu-img$(EXESUF): qemu-img.o qemu-tool.o tool-osdep.o $(BLOCK_OBJS)
bellard4fb240a2007-11-07 19:24:02 +0000236
Paul Brook88ca2a52009-05-13 22:21:47 +0100237qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o tool-osdep.o $(BLOCK_OBJS)
aliguori3aa892d2009-01-21 18:13:02 +0000238
Paul Brook88ca2a52009-05-13 22:21:47 +0100239qemu-io$(EXESUF): qemu-io.o qemu-tool.o tool-osdep.o cmd.o $(BLOCK_OBJS)
aliguori0a8e1ac2009-04-05 18:41:23 +0000240
241qemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz
bellard7a5ca862008-05-27 21:13:40 +0000242
bellard31e31b82003-02-18 22:55:36 +0000243clean:
bellard2d80ae82003-08-11 23:01:33 +0000244# avoid old build problems by removing potentially incorrect old files
ths5fafdf22007-09-16 21:08:06 +0000245 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 +0000246 rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
Anthony Liguori019d6b82009-05-09 17:14:19 -0500247 rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
bellard7d3505c2004-05-12 19:32:15 +0000248 $(MAKE) -C tests clean
Paul Brook1ad21342009-05-19 16:17:58 +0100249 for d in $(TARGET_DIRS) libhw32 libhw64; do \
bellard7d3505c2004-05-12 19:32:15 +0000250 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000251 done
bellard31e31b82003-02-18 22:55:36 +0000252
bellard7d132992003-03-06 23:23:54 +0000253distclean: clean
aliguori016c62c2009-04-05 17:40:50 +0000254 rm -f config-host.mak config-host.h $(DOCS) qemu-options.texi
pbrook0cb3fb12006-05-14 12:07:53 +0000255 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
Paul Brook1ad21342009-05-19 16:17:58 +0100256 for d in $(TARGET_DIRS) libhw32 libhw64; do \
bellardbc1b0502003-10-28 00:12:52 +0000257 rm -rf $$d || exit 1 ; \
bellard76bc6832003-08-10 23:41:46 +0000258 done
bellard7d132992003-03-06 23:23:54 +0000259
bellardfed4a9a2004-12-12 22:18:34 +0000260KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
261ar de en-us fi fr-be hr it lv nl pl ru th \
262common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
263
ths77755342008-11-27 15:45:16 +0000264ifdef INSTALL_BLOBS
265BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
aurel32e5d01b02009-01-09 11:01:31 +0000266video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
267pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
268bamboo.dtb
ths77755342008-11-27 15:45:16 +0000269else
270BLOBS=
271endif
272
pbrook38954dc2006-04-30 23:54:18 +0000273install-doc: $(DOCS)
aliguori58f8aea2009-04-18 15:36:02 +0000274 $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
275 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
pbrook38954dc2006-04-30 23:54:18 +0000276ifndef CONFIG_WIN32
aliguori58f8aea2009-04-18 15:36:02 +0000277 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
278 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
279 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
280 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
pbrook38954dc2006-04-30 23:54:18 +0000281endif
282
283install: all $(if $(BUILD_DOCS),install-doc)
aliguori58f8aea2009-04-18 15:36:02 +0000284 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000285ifneq ($(TOOLS),)
aliguori58f8aea2009-04-18 15:36:02 +0000286 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000287endif
ths77755342008-11-27 15:45:16 +0000288ifneq ($(BLOBS),)
aliguori58f8aea2009-04-18 15:36:02 +0000289 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
ths77755342008-11-27 15:45:16 +0000290 set -e; for x in $(BLOBS); do \
aliguori58f8aea2009-04-18 15:36:02 +0000291 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
pbrookad064842006-04-16 12:41:07 +0000292 done
ths77755342008-11-27 15:45:16 +0000293endif
bellard11d9f692004-04-02 20:55:59 +0000294ifndef CONFIG_WIN32
aliguori58f8aea2009-04-18 15:36:02 +0000295 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
blueswir118be8d72008-03-05 18:16:09 +0000296 set -e; for x in $(KEYMAPS); do \
aliguori58f8aea2009-04-18 15:36:02 +0000297 $(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
pbrookad064842006-04-16 12:41:07 +0000298 done
bellard11d9f692004-04-02 20:55:59 +0000299endif
bellard626df762003-08-10 21:39:31 +0000300 for d in $(TARGET_DIRS); do \
bellard7d3505c2004-05-12 19:32:15 +0000301 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000302 done
bellard612384d2003-03-22 17:31:19 +0000303
bellard367e86e2003-03-01 17:13:26 +0000304# various test targets
bellard9b0b8202007-11-14 10:34:57 +0000305test speed: all
bellard7d3505c2004-05-12 19:32:15 +0000306 $(MAKE) -C tests $@
bellard31e31b82003-02-18 22:55:36 +0000307
ths5fafdf22007-09-16 21:08:06 +0000308TAGS:
bellardb9adb4a2003-04-29 20:41:16 +0000309 etags *.[ch] tests/*.[ch]
bellard31e31b82003-02-18 22:55:36 +0000310
bellard6688bc62005-08-21 09:23:39 +0000311cscope:
312 rm -f ./cscope.*
aurel32ede46082008-10-01 21:46:58 +0000313 find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
bellard6688bc62005-08-21 09:23:39 +0000314 cscope -b
315
bellard3ef693a2003-03-23 20:17:16 +0000316# documentation
bellard1f673132004-04-04 15:21:17 +0000317%.html: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000318 $(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
bellard3ef693a2003-03-23 20:17:16 +0000319
bellardf3548322006-04-30 22:51:54 +0000320%.info: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000321 $(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000322
323%.dvi: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000324 $(call quiet-command,texi2dvi -I . $<," GEN $@")
blueswir15824d652009-03-28 06:44:27 +0000325
326qemu-options.texi: $(SRC_PATH)/qemu-options.hx
aliguori0d00e562009-04-05 17:40:46 +0000327 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000328
blueswir175456682009-04-19 10:25:05 +0000329qemu.1: qemu-doc.texi qemu-options.texi
aliguori0d00e562009-04-05 17:40:46 +0000330 $(call quiet-command, \
331 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
332 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
333 " GEN $@")
bellard5a671352003-10-01 00:13:48 +0000334
bellardacd935e2004-11-15 22:57:26 +0000335qemu-img.1: qemu-img.texi
aliguori0d00e562009-04-05 17:40:46 +0000336 $(call quiet-command, \
337 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
338 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
339 " GEN $@")
bellardacd935e2004-11-15 22:57:26 +0000340
bellard7a5ca862008-05-27 21:13:40 +0000341qemu-nbd.8: qemu-nbd.texi
aliguori0d00e562009-04-05 17:40:46 +0000342 $(call quiet-command, \
343 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
344 pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
345 " GEN $@")
bellard7a5ca862008-05-27 21:13:40 +0000346
pbrook0cb3fb12006-05-14 12:07:53 +0000347info: qemu-doc.info qemu-tech.info
348
349dvi: qemu-doc.dvi qemu-tech.dvi
350
351html: qemu-doc.html qemu-tech.html
352
blueswir15824d652009-03-28 06:44:27 +0000353qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi
aliguori818220f2008-09-24 01:13:40 +0000354
thsdf5cf722007-01-24 22:56:36 +0000355VERSION ?= $(shell cat VERSION)
356FILE = qemu-$(VERSION)
bellard586314f2003-03-03 15:02:29 +0000357
bellard1e43adf2003-09-30 20:54:24 +0000358# tar release (use 'make -k tar' on a checkouted tree)
bellard586314f2003-03-03 15:02:29 +0000359tar:
360 rm -rf /tmp/$(FILE)
bellard1e43adf2003-09-30 20:54:24 +0000361 cp -r . /tmp/$(FILE)
aurel3299c6c082008-04-22 20:45:30 +0000362 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
bellard586314f2003-03-03 15:02:29 +0000363 rm -rf /tmp/$(FILE)
364
bellard76b62fd2003-10-28 00:47:44 +0000365# generate a binary distribution
bellardd691f662003-03-24 21:58:34 +0000366tarbin:
blueswir118be8d72008-03-05 18:16:09 +0000367 cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
bellard43095f32005-04-27 20:49:23 +0000368 $(bindir)/qemu \
bellard43095f32005-04-27 20:49:23 +0000369 $(bindir)/qemu-system-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000370 $(bindir)/qemu-system-arm \
371 $(bindir)/qemu-system-cris \
372 $(bindir)/qemu-system-m68k \
bellard93856aa2005-07-24 18:44:35 +0000373 $(bindir)/qemu-system-mips \
pbrook38260992006-03-11 14:51:13 +0000374 $(bindir)/qemu-system-mipsel \
thsfbe4f652007-04-01 11:16:48 +0000375 $(bindir)/qemu-system-mips64 \
376 $(bindir)/qemu-system-mips64el \
aurel3240e8a532009-01-03 12:35:57 +0000377 $(bindir)/qemu-system-ppc \
378 $(bindir)/qemu-system-ppcemb \
379 $(bindir)/qemu-system-ppc64 \
thsff1aaf62007-09-29 21:18:26 +0000380 $(bindir)/qemu-system-sh4 \
ths85ffbdf2007-12-09 05:10:03 +0000381 $(bindir)/qemu-system-sh4eb \
aurel3240e8a532009-01-03 12:35:57 +0000382 $(bindir)/qemu-system-sparc \
bellard7efa4382004-05-12 18:54:06 +0000383 $(bindir)/qemu-i386 \
bellardf0403c02008-01-06 18:27:12 +0000384 $(bindir)/qemu-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000385 $(bindir)/qemu-alpha \
386 $(bindir)/qemu-arm \
387 $(bindir)/qemu-armeb \
388 $(bindir)/qemu-cris \
389 $(bindir)/qemu-m68k \
390 $(bindir)/qemu-mips \
391 $(bindir)/qemu-mipsel \
392 $(bindir)/qemu-ppc \
393 $(bindir)/qemu-ppc64 \
394 $(bindir)/qemu-ppc64abi32 \
395 $(bindir)/qemu-sh4 \
396 $(bindir)/qemu-sh4eb \
397 $(bindir)/qemu-sparc \
398 $(bindir)/qemu-sparc64 \
399 $(bindir)/qemu-sparc32plus \
400 $(bindir)/qemu-img \
401 $(bindir)/qemu-nbd \
bellard7efa4382004-05-12 18:54:06 +0000402 $(datadir)/bios.bin \
403 $(datadir)/vgabios.bin \
bellardde9258a2004-06-06 15:50:03 +0000404 $(datadir)/vgabios-cirrus.bin \
bellard637f6cd2004-06-21 19:54:47 +0000405 $(datadir)/ppc_rom.bin \
bellardd5295252005-07-03 14:00:51 +0000406 $(datadir)/video.x \
bellard0986ac32006-06-14 12:36:32 +0000407 $(datadir)/openbios-sparc32 \
blueswir1938255d2008-04-23 19:38:07 +0000408 $(datadir)/openbios-sparc64 \
aurel32e5d01b02009-01-09 11:01:31 +0000409 $(datadir)/openbios-ppc \
aurel3240e8a532009-01-03 12:35:57 +0000410 $(datadir)/pxe-ne2k_pci.bin \
bellard19c80e52007-02-05 21:22:42 +0000411 $(datadir)/pxe-rtl8139.bin \
aurel3240e8a532009-01-03 12:35:57 +0000412 $(datadir)/pxe-pcnet.bin \
aliguori29919902008-07-26 16:53:22 +0000413 $(datadir)/pxe-e1000.bin \
bellard1f50f8d2004-05-08 14:44:43 +0000414 $(docdir)/qemu-doc.html \
415 $(docdir)/qemu-tech.html \
aurel3240e8a532009-01-03 12:35:57 +0000416 $(mandir)/man1/qemu.1 \
417 $(mandir)/man1/qemu-img.1 \
bellard7a5ca862008-05-27 21:13:40 +0000418 $(mandir)/man8/qemu-nbd.8
bellardd691f662003-03-24 21:58:34 +0000419
bellard4fb240a2007-11-07 19:24:02 +0000420# Include automatically generated dependency files
Anthony Liguori019d6b82009-05-09 17:14:19 -0500421-include $(wildcard *.d audio/*.d slirp/*.d block/*.d)