blob: f72e98999068462125b3c4249070868f666987b7 [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 Quintelaa558ee12009-08-03 14:46:21 +020019QEMU_CFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
20QEMU_CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
21QEMU_CFLAGS += -U_FORTIFY_SOURCE
Juan Quintelafa5e22c2009-08-03 14:46:15 +020022LIBS+=-lz
Juan Quintela67c0f082009-07-27 16:12:51 +020023
pbrookcc8ae6d2006-04-23 17:57:59 +000024ifdef BUILD_DOCS
bellard7a5ca862008-05-27 21:13:40 +000025DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
pbrookcc8ae6d2006-04-23 17:57:59 +000026else
27DOCS=
28endif
bellard7d132992003-03-06 23:23:54 +000029
Paul Brookc05ac892009-07-31 13:18:32 +010030build-all: $(TOOLS) $(DOCS) recurse-all
pbrookb9dea4f2006-05-13 16:54:03 +000031
aurel3255d7e8f2009-04-15 14:42:57 +000032config-host.mak: configure
33ifneq ($(wildcard config-host.mak),)
34 @echo $@ is out-of-date, running configure
blueswir1052ff922009-04-17 20:01:12 +000035 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
aurel3255d7e8f2009-04-15 14:42:57 +000036endif
37
Paul Brook00873752009-05-07 02:00:31 +010038SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
pbrookcec7d0b2008-05-28 16:44:57 +000039SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
40
aurel3286e840e2008-12-07 15:21:23 +000041subdir-%:
Paul Brook00873752009-05-07 02:00:31 +010042 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
pbrook4aa42532006-05-13 13:55:08 +000043
pbrookcec7d0b2008-05-28 16:44:57 +000044$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
45$(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
46
Paul Brookc05ac892009-07-31 13:18:32 +010047
48ROMSUBDIR_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
Juan Quintela1a65ba72009-07-16 17:57:03 +020060block-obj-y += nbd.o block.o aio.o aes.o
Juan Quintelaeeb6d452009-07-27 16:13:08 +020061block-obj-$(CONFIG_AIO) += posix-aio-compat.o
Juan Quintela1a65ba72009-07-16 17:57:03 +020062
Stefan Weil9aebd982009-07-31 21:45:56 +020063block-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 +020064block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
65block-nested-y += parallels.o nbd.o
Juan Quintelaeeb6d452009-07-27 16:13:08 +020066block-nested-$(CONFIG_WIN32) += raw-win32.o
67block-nested-$(CONFIG_POSIX) += raw-posix.o
Juan Quintela1a65ba72009-07-16 17:57:03 +020068block-nested-$(CONFIG_CURL) += curl.o
69
70block-obj-y += $(addprefix block/, $(block-nested-y))
Alexander Graf769ce762009-05-11 17:41:42 +020071
bellard4fb240a2007-11-07 19:24:02 +000072######################################################################
bellard2e2ea902008-02-01 10:02:52 +000073# libqemu_common.a: Target independent part of system emulation. The
bellard4fb240a2007-11-07 19:24:02 +000074# long term path is to suppress *all* target specific code in case of
75# system emulation, i.e. a single QEMU executable should support all
76# CPUs and machines.
bellard47cea612004-05-17 20:06:42 +000077
Juan Quintela6ef859b2009-06-25 00:08:07 +020078obj-y = $(block-obj-y)
79obj-y += readline.o console.o
aliguoricd01b4a2008-08-21 19:25:45 +000080
Juan Quintela6ef859b2009-06-25 00:08:07 +020081obj-y += irq.o ptimer.o
82obj-y += i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
83obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
84obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
85obj-y += scsi-disk.o cdrom.o
86obj-y += scsi-generic.o
87obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
88obj-y += usb-serial.o usb-net.o
89obj-y += sd.o ssi-sd.o
90obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
91obj-y += bt-hci-csr.o
92obj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
Juan Quintela3b476122009-07-16 17:57:06 +020093obj-y += qemu-char.o aio.o net-checksum.o savevm.o
Juan Quintela6ef859b2009-06-25 00:08:07 +020094obj-y += msmouse.o ps2.o
Gerd Hoffmannee6847d2009-07-15 13:43:31 +020095obj-y += qdev.o qdev-properties.o ssi.o
pbrook87ecb682007-11-17 17:14:51 +000096
Juan Quintela0e22fd22009-06-25 00:08:09 +020097obj-$(CONFIG_BRLAPI) += baum.o
98
Juan Quintelaeb822842009-07-27 16:13:18 +020099LIBS+=$(BRLAPI_LIBS)
aurel322e4d9fb2008-04-08 06:01:02 +0000100
Juan Quintelaeeb6d452009-07-27 16:13:08 +0200101obj-$(CONFIG_WIN32) += tap-win32.o
102obj-$(CONFIG_POSIX) += migration-exec.o
bellard4fb240a2007-11-07 19:24:02 +0000103
bellard4fb240a2007-11-07 19:24:02 +0000104ifdef CONFIG_COREAUDIO
Anthony Liguoric6a5a712009-07-01 10:07:16 -0500105AUDIO_PT = y
bellard4fb240a2007-11-07 19:24:02 +0000106endif
bellard4fb240a2007-11-07 19:24:02 +0000107ifdef CONFIG_FMOD
Juan Quintelaa558ee12009-08-03 14:46:21 +0200108audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS := $(FMOD_CFLAGS) $(QEMU_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000109endif
balrogca9cc282008-01-14 04:24:29 +0000110ifdef CONFIG_ESD
Anthony Liguoric6a5a712009-07-01 10:07:16 -0500111AUDIO_PT = y
112AUDIO_PT_INT = y
balrogca9cc282008-01-14 04:24:29 +0000113endif
malcb8e59f12008-07-02 21:03:08 +0000114ifdef CONFIG_PA
Anthony Liguoric6a5a712009-07-01 10:07:16 -0500115AUDIO_PT = y
116AUDIO_PT_INT = y
malcb8e59f12008-07-02 21:03:08 +0000117endif
balrogca9cc282008-01-14 04:24:29 +0000118ifdef AUDIO_PT
119LDFLAGS += -pthread
120endif
Juan Quintela0e22fd22009-06-25 00:08:09 +0200121
122audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
123audio-obj-$(CONFIG_SDL) += sdlaudio.o
124audio-obj-$(CONFIG_OSS) += ossaudio.o
125audio-obj-$(CONFIG_COREAUDIO) += coreaudio.o
126audio-obj-$(CONFIG_ALSA) += alsaaudio.o
127audio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
128audio-obj-$(CONFIG_FMOD) += fmodaudio.o
129audio-obj-$(CONFIG_ESD) += esdaudio.o
130audio-obj-$(CONFIG_PA) += paaudio.o
131audio-obj-$(AUDIO_PT_INT) += audio_pt_int.o
Juan Quintelaeda959b2009-06-25 00:08:03 +0200132audio-obj-y += wavcapture.o
Juan Quintela6ef859b2009-06-25 00:08:07 +0200133obj-y += $(addprefix audio/, $(audio-obj-y))
bellard4fb240a2007-11-07 19:24:02 +0000134
Juan Quintela6ef859b2009-06-25 00:08:07 +0200135obj-y += keymaps.o
Juan Quintela0e22fd22009-06-25 00:08:09 +0200136obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
137obj-$(CONFIG_CURSES) += curses.o
Juan Quintela6ef859b2009-06-25 00:08:07 +0200138obj-y += vnc.o acl.o d3des.o
Juan Quintela0e22fd22009-06-25 00:08:09 +0200139obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
140obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
141obj-$(CONFIG_COCOA) += cocoa.o
142obj-$(CONFIG_IOTHREAD) += qemu-thread.o
aliguorie5d355d2009-04-24 18:03:15 +0000143
bellard4fb240a2007-11-07 19:24:02 +0000144ifdef CONFIG_SLIRP
Juan Quintelaa558ee12009-08-03 14:46:21 +0200145QEMU_CFLAGS+=-I$(SRC_PATH)/slirp
Juan Quintela0e22fd22009-06-25 00:08:09 +0200146endif
147
Juan Quintelaf835ed12009-06-25 00:08:04 +0200148slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
149slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
150slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
Juan Quintela0e22fd22009-06-25 00:08:09 +0200151obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
bellard4fb240a2007-11-07 19:24:02 +0000152
ths8a16d272008-07-19 09:56:24 +0000153LIBS+=$(VDE_LIBS)
154
Blue Swirl2567f572009-05-21 15:54:48 +0000155# xen backend driver support
Juan Quintela0e22fd22009-06-25 00:08:09 +0200156obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
157obj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
Blue Swirl2567f572009-05-21 15:54:48 +0000158
Juan Quintelaa558ee12009-08-03 14:46:21 +0200159QEMU_CFLAGS+=$(CURL_CFLAGS)
Alexander Graf769ce762009-05-11 17:41:42 +0200160LIBS+=$(CURL_LIBS)
161
bellard4fb240a2007-11-07 19:24:02 +0000162cocoa.o: cocoa.m
bellard4fb240a2007-11-07 19:24:02 +0000163
aliguori04837552009-03-06 20:27:10 +0000164keymaps.o: keymaps.c keymaps.h
165
Stefano Stabellinic18a2c32009-06-24 11:58:25 +0100166sdl_zoom.o: sdl_zoom.c sdl_zoom.h sdl_zoom_template.h
167
168sdl.o: sdl.c keymaps.h sdl_keysym.h sdl_zoom.h
aliguori807544e2009-01-21 18:12:44 +0000169
Juan Quintelaa558ee12009-08-03 14:46:21 +0200170sdl.o audio/sdlaudio.o sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000171
aliguori76655d62009-03-06 20:27:37 +0000172acl.o: acl.h acl.c
173
aliguori2f9606b2009-03-06 20:27:28 +0000174vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
aliguori5fb6c7a2009-03-06 20:27:23 +0000175
aliguori76655d62009-03-06 20:27:37 +0000176vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
aliguori807544e2009-01-21 18:12:44 +0000177
Juan Quintelaa558ee12009-08-03 14:46:21 +0200178vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000179
aliguori5fb6c7a2009-03-06 20:27:23 +0000180vnc-tls.o: vnc-tls.c vnc.h
181
182vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
183
aliguori2f9606b2009-03-06 20:27:28 +0000184vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
185
aliguori04837552009-03-06 20:27:10 +0000186curses.o: curses.c keymaps.h curses_keys.h
balrog4d3b6f62008-02-10 16:33:14 +0000187
Juan Quintelaa558ee12009-08-03 14:46:21 +0200188bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
bellard4fb240a2007-11-07 19:24:02 +0000189
Juan Quintela6ef859b2009-06-25 00:08:07 +0200190libqemu_common.a: $(obj-y)
bellard4fb240a2007-11-07 19:24:02 +0000191
pbrookcec7d0b2008-05-28 16:44:57 +0000192#######################################################################
Juan Quintelae11b1dc2009-06-25 00:08:06 +0200193# user-obj-y is code used by qemu userspace emulation
194user-obj-y = cutils.o cache-utils.o
pbrookcec7d0b2008-05-28 16:44:57 +0000195
Juan Quintelae11b1dc2009-06-25 00:08:06 +0200196libqemu_user.a: $(user-obj-y)
pbrookcec7d0b2008-05-28 16:44:57 +0000197
bellard4fb240a2007-11-07 19:24:02 +0000198######################################################################
199
Stuart Brady153859b2009-06-07 00:42:17 +0100200qemu-img.o: qemu-img-cmds.h
201
Juan Quintela319f08e2009-06-25 00:08:02 +0200202qemu-img$(EXESUF): qemu-img.o qemu-tool.o tool-osdep.o $(block-obj-y)
bellard4fb240a2007-11-07 19:24:02 +0000203
Juan Quintela319f08e2009-06-25 00:08:02 +0200204qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o tool-osdep.o $(block-obj-y)
aliguori3aa892d2009-01-21 18:13:02 +0000205
Juan Quintela319f08e2009-06-25 00:08:02 +0200206qemu-io$(EXESUF): qemu-io.o qemu-tool.o tool-osdep.o cmd.o $(block-obj-y)
aliguori0a8e1ac2009-04-05 18:41:23 +0000207
Stuart Brady153859b2009-06-07 00:42:17 +0100208qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
209 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@")
210
bellard31e31b82003-02-18 22:55:36 +0000211clean:
bellard2d80ae82003-08-11 23:01:33 +0000212# avoid old build problems by removing potentially incorrect old files
ths5fafdf22007-09-16 21:08:06 +0000213 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 +0000214 rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
Anthony Liguori019d6b82009-05-09 17:14:19 -0500215 rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
Blue Swirl07b44ce2009-06-09 18:45:16 +0000216 rm -f qemu-img-cmds.h
bellard7d3505c2004-05-12 19:32:15 +0000217 $(MAKE) -C tests clean
Paul Brookc05ac892009-07-31 13:18:32 +0100218 for d in $(ALL_SUBDIRS) libhw32 libhw64; do \
bellard7d3505c2004-05-12 19:32:15 +0000219 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000220 done
bellard31e31b82003-02-18 22:55:36 +0000221
bellard7d132992003-03-06 23:23:54 +0000222distclean: clean
Juan Quintela4bf6b552009-07-22 22:37:40 +0200223 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 +0000224 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
Paul Brook1ad21342009-05-19 16:17:58 +0100225 for d in $(TARGET_DIRS) libhw32 libhw64; do \
bellardbc1b0502003-10-28 00:12:52 +0000226 rm -rf $$d || exit 1 ; \
bellard76bc6832003-08-10 23:41:46 +0000227 done
bellard7d132992003-03-06 23:23:54 +0000228
bellardfed4a9a2004-12-12 22:18:34 +0000229KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
230ar de en-us fi fr-be hr it lv nl pl ru th \
231common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
232
ths77755342008-11-27 15:45:16 +0000233ifdef INSTALL_BLOBS
234BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
aurel32e5d01b02009-01-09 11:01:31 +0000235video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
236pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
Alexander Graf253d0942009-06-29 15:37:40 +0200237bamboo.dtb petalogix-s3adsp1800.dtb \
238multiboot.bin
ths77755342008-11-27 15:45:16 +0000239else
240BLOBS=
241endif
242
pbrook38954dc2006-04-30 23:54:18 +0000243install-doc: $(DOCS)
aliguori58f8aea2009-04-18 15:36:02 +0000244 $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
245 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
pbrook38954dc2006-04-30 23:54:18 +0000246ifndef CONFIG_WIN32
aliguori58f8aea2009-04-18 15:36:02 +0000247 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
248 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
249 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
250 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
pbrook38954dc2006-04-30 23:54:18 +0000251endif
252
253install: all $(if $(BUILD_DOCS),install-doc)
aliguori58f8aea2009-04-18 15:36:02 +0000254 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000255ifneq ($(TOOLS),)
aliguori58f8aea2009-04-18 15:36:02 +0000256 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
ths932a79d2007-10-20 18:29:34 +0000257endif
ths77755342008-11-27 15:45:16 +0000258ifneq ($(BLOBS),)
aliguori58f8aea2009-04-18 15:36:02 +0000259 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
ths77755342008-11-27 15:45:16 +0000260 set -e; for x in $(BLOBS); do \
aliguori58f8aea2009-04-18 15:36:02 +0000261 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
pbrookad064842006-04-16 12:41:07 +0000262 done
ths77755342008-11-27 15:45:16 +0000263endif
aliguori58f8aea2009-04-18 15:36:02 +0000264 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
blueswir118be8d72008-03-05 18:16:09 +0000265 set -e; for x in $(KEYMAPS); do \
Anthony Liguori79fd42a2009-05-28 03:11:42 -0500266 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
pbrookad064842006-04-16 12:41:07 +0000267 done
bellard626df762003-08-10 21:39:31 +0000268 for d in $(TARGET_DIRS); do \
bellard7d3505c2004-05-12 19:32:15 +0000269 $(MAKE) -C $$d $@ || exit 1 ; \
bellard626df762003-08-10 21:39:31 +0000270 done
bellard612384d2003-03-22 17:31:19 +0000271
bellard367e86e2003-03-01 17:13:26 +0000272# various test targets
bellard9b0b8202007-11-14 10:34:57 +0000273test speed: all
bellard7d3505c2004-05-12 19:32:15 +0000274 $(MAKE) -C tests $@
bellard31e31b82003-02-18 22:55:36 +0000275
ths5fafdf22007-09-16 21:08:06 +0000276TAGS:
Juan Quintelaae95ade2009-06-29 13:49:29 +0200277 etags *.[ch] tests/*.[ch] block/*.[ch] hw/*.[ch]
bellard31e31b82003-02-18 22:55:36 +0000278
bellard6688bc62005-08-21 09:23:39 +0000279cscope:
280 rm -f ./cscope.*
aurel32ede46082008-10-01 21:46:58 +0000281 find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
bellard6688bc62005-08-21 09:23:39 +0000282 cscope -b
283
bellard3ef693a2003-03-23 20:17:16 +0000284# documentation
bellard1f673132004-04-04 15:21:17 +0000285%.html: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000286 $(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
bellard3ef693a2003-03-23 20:17:16 +0000287
bellardf3548322006-04-30 22:51:54 +0000288%.info: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000289 $(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000290
291%.dvi: %.texi
aliguori0d00e562009-04-05 17:40:46 +0000292 $(call quiet-command,texi2dvi -I . $<," GEN $@")
blueswir15824d652009-03-28 06:44:27 +0000293
294qemu-options.texi: $(SRC_PATH)/qemu-options.hx
aliguori0d00e562009-04-05 17:40:46 +0000295 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
bellardf3548322006-04-30 22:51:54 +0000296
Blue Swirl23130862009-06-06 08:22:04 +0000297qemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
298 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
299
Stuart Brady153859b2009-06-07 00:42:17 +0100300qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
301 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
302
Blue Swirl23130862009-06-06 08:22:04 +0000303qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
aliguori0d00e562009-04-05 17:40:46 +0000304 $(call quiet-command, \
305 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
306 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
307 " GEN $@")
bellard5a671352003-10-01 00:13:48 +0000308
Stuart Brady153859b2009-06-07 00:42:17 +0100309qemu-img.1: qemu-img.texi qemu-img-cmds.texi
aliguori0d00e562009-04-05 17:40:46 +0000310 $(call quiet-command, \
311 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
312 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
313 " GEN $@")
bellardacd935e2004-11-15 22:57:26 +0000314
bellard7a5ca862008-05-27 21:13:40 +0000315qemu-nbd.8: qemu-nbd.texi
aliguori0d00e562009-04-05 17:40:46 +0000316 $(call quiet-command, \
317 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
318 pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
319 " GEN $@")
bellard7a5ca862008-05-27 21:13:40 +0000320
pbrook0cb3fb12006-05-14 12:07:53 +0000321info: qemu-doc.info qemu-tech.info
322
323dvi: qemu-doc.dvi qemu-tech.dvi
324
325html: qemu-doc.html qemu-tech.html
326
Stuart Brady153859b2009-06-07 00:42:17 +0100327qemu-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 +0000328
thsdf5cf722007-01-24 22:56:36 +0000329VERSION ?= $(shell cat VERSION)
330FILE = qemu-$(VERSION)
bellard586314f2003-03-03 15:02:29 +0000331
bellard1e43adf2003-09-30 20:54:24 +0000332# tar release (use 'make -k tar' on a checkouted tree)
bellard586314f2003-03-03 15:02:29 +0000333tar:
334 rm -rf /tmp/$(FILE)
bellard1e43adf2003-09-30 20:54:24 +0000335 cp -r . /tmp/$(FILE)
aurel3299c6c082008-04-22 20:45:30 +0000336 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
bellard586314f2003-03-03 15:02:29 +0000337 rm -rf /tmp/$(FILE)
338
bellard76b62fd2003-10-28 00:47:44 +0000339# generate a binary distribution
bellardd691f662003-03-24 21:58:34 +0000340tarbin:
blueswir118be8d72008-03-05 18:16:09 +0000341 cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
bellard43095f32005-04-27 20:49:23 +0000342 $(bindir)/qemu \
bellard43095f32005-04-27 20:49:23 +0000343 $(bindir)/qemu-system-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000344 $(bindir)/qemu-system-arm \
345 $(bindir)/qemu-system-cris \
346 $(bindir)/qemu-system-m68k \
bellard93856aa2005-07-24 18:44:35 +0000347 $(bindir)/qemu-system-mips \
pbrook38260992006-03-11 14:51:13 +0000348 $(bindir)/qemu-system-mipsel \
thsfbe4f652007-04-01 11:16:48 +0000349 $(bindir)/qemu-system-mips64 \
350 $(bindir)/qemu-system-mips64el \
aurel3240e8a532009-01-03 12:35:57 +0000351 $(bindir)/qemu-system-ppc \
352 $(bindir)/qemu-system-ppcemb \
353 $(bindir)/qemu-system-ppc64 \
thsff1aaf62007-09-29 21:18:26 +0000354 $(bindir)/qemu-system-sh4 \
ths85ffbdf2007-12-09 05:10:03 +0000355 $(bindir)/qemu-system-sh4eb \
aurel3240e8a532009-01-03 12:35:57 +0000356 $(bindir)/qemu-system-sparc \
bellard7efa4382004-05-12 18:54:06 +0000357 $(bindir)/qemu-i386 \
bellardf0403c02008-01-06 18:27:12 +0000358 $(bindir)/qemu-x86_64 \
aurel3240e8a532009-01-03 12:35:57 +0000359 $(bindir)/qemu-alpha \
360 $(bindir)/qemu-arm \
361 $(bindir)/qemu-armeb \
362 $(bindir)/qemu-cris \
363 $(bindir)/qemu-m68k \
364 $(bindir)/qemu-mips \
365 $(bindir)/qemu-mipsel \
366 $(bindir)/qemu-ppc \
367 $(bindir)/qemu-ppc64 \
368 $(bindir)/qemu-ppc64abi32 \
369 $(bindir)/qemu-sh4 \
370 $(bindir)/qemu-sh4eb \
371 $(bindir)/qemu-sparc \
372 $(bindir)/qemu-sparc64 \
373 $(bindir)/qemu-sparc32plus \
374 $(bindir)/qemu-img \
375 $(bindir)/qemu-nbd \
bellard7efa4382004-05-12 18:54:06 +0000376 $(datadir)/bios.bin \
377 $(datadir)/vgabios.bin \
bellardde9258a2004-06-06 15:50:03 +0000378 $(datadir)/vgabios-cirrus.bin \
bellard637f6cd2004-06-21 19:54:47 +0000379 $(datadir)/ppc_rom.bin \
bellardd5295252005-07-03 14:00:51 +0000380 $(datadir)/video.x \
bellard0986ac32006-06-14 12:36:32 +0000381 $(datadir)/openbios-sparc32 \
blueswir1938255d2008-04-23 19:38:07 +0000382 $(datadir)/openbios-sparc64 \
aurel32e5d01b02009-01-09 11:01:31 +0000383 $(datadir)/openbios-ppc \
aurel3240e8a532009-01-03 12:35:57 +0000384 $(datadir)/pxe-ne2k_pci.bin \
bellard19c80e52007-02-05 21:22:42 +0000385 $(datadir)/pxe-rtl8139.bin \
aurel3240e8a532009-01-03 12:35:57 +0000386 $(datadir)/pxe-pcnet.bin \
aliguori29919902008-07-26 16:53:22 +0000387 $(datadir)/pxe-e1000.bin \
bellard1f50f8d2004-05-08 14:44:43 +0000388 $(docdir)/qemu-doc.html \
389 $(docdir)/qemu-tech.html \
aurel3240e8a532009-01-03 12:35:57 +0000390 $(mandir)/man1/qemu.1 \
391 $(mandir)/man1/qemu-img.1 \
bellard7a5ca862008-05-27 21:13:40 +0000392 $(mandir)/man8/qemu-nbd.8
bellardd691f662003-03-24 21:58:34 +0000393
bellard4fb240a2007-11-07 19:24:02 +0000394# Include automatically generated dependency files
Anthony Liguori019d6b82009-05-09 17:14:19 -0500395-include $(wildcard *.d audio/*.d slirp/*.d block/*.d)