Statistics
| Branch: | Revision:

root / Makefile @ 6a90e308

History | View | Annotate | Download (13.1 kB)

1 0cb3fb1e pbrook
# Makefile for QEMU.
2 0cb3fb1e pbrook
3 55d7e8f6 aurel32
ifneq ($(wildcard config-host.mak),)
4 1ad2134f Paul Brook
# Put the all: rule here so that config-host.mak can contain dependencies.
5 1ad2134f Paul Brook
all: build-all
6 ad064840 pbrook
include config-host.mak
7 17759187 aliguori
include $(SRC_PATH)/rules.mak
8 e5efe7f5 Juan Quintela
config-host.mak: configure
9 e5efe7f5 Juan Quintela
	@echo $@ is out-of-date, running configure
10 e5efe7f5 Juan Quintela
	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
11 55d7e8f6 aurel32
else
12 55d7e8f6 aurel32
config-host.mak:
13 55d7e8f6 aurel32
	@echo "Please call configure before running make!"
14 55d7e8f6 aurel32
	@exit 1
15 55d7e8f6 aurel32
endif
16 766a487a bellard
17 d9ace8b3 Juan Quintela
# Don't try to regenerate Makefile or configure
18 d9ace8b3 Juan Quintela
# We don't generate any of them
19 d9ace8b3 Juan Quintela
Makefile: ;
20 d9ace8b3 Juan Quintela
configure: ;
21 d9ace8b3 Juan Quintela
22 818220f5 aliguori
.PHONY: all clean cscope distclean dvi html info install install-doc \
23 9c927650 Juan Quintela
	recurse-all speed tar tarbin test build-all
24 0cb3fb1e pbrook
25 8c462f8f pbrook
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
26 8c462f8f pbrook
27 3e2e0e6b Juan Quintela
LIBS+=-lz $(LIBS_TOOLS)
28 67c0f08d Juan Quintela
29 cc8ae6de pbrook
ifdef BUILD_DOCS
30 7a5ca864 bellard
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
31 cc8ae6de pbrook
else
32 cc8ae6de pbrook
DOCS=
33 cc8ae6de pbrook
endif
34 aa05ae6f bellard
35 1215c6e7 Juan Quintela
SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
36 1f3d3c8f Juan Quintela
SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
37 1f3d3c8f Juan Quintela
38 1f3d3c8f Juan Quintela
config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
39 1bb62099 Stefan Weil
	$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep "=y$$" | sort -u > $@,"  GEN   $@")
40 1f3d3c8f Juan Quintela
41 1f3d3c8f Juan Quintela
-include config-all-devices.mak
42 1215c6e7 Juan Quintela
43 581d45f0 Stefan Weil
build-all: config-host.h config-all-devices.h $(DOCS) $(TOOLS)
44 581d45f0 Stefan Weil
	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) recurse-all,)
45 b9dea4fb pbrook
46 1215c6e7 Juan Quintela
config-host.h: config-host.h-timestamp
47 1215c6e7 Juan Quintela
config-host.h-timestamp: config-host.mak
48 1215c6e7 Juan Quintela
49 fe0d4d3f Juan Quintela
config-all-devices.h: config-all-devices.h-timestamp
50 fe0d4d3f Juan Quintela
config-all-devices.h-timestamp: config-all-devices.mak
51 fe0d4d3f Juan Quintela
52 cec7d0b6 pbrook
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
53 cec7d0b6 pbrook
54 fe0d4d3f Juan Quintela
subdir-%: config-host.h config-all-devices.h
55 0087375e Paul Brook
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
56 4aa42531 pbrook
57 cec7d0b6 pbrook
$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
58 c05ac895 Paul Brook
59 add16157 Blue Swirl
$(filter %-user,$(SUBDIR_RULES)): libuser.a
60 add16157 Blue Swirl
61 add16157 Blue Swirl
libuser.a:
62 6a8a2803 Blue Swirl
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libuser V="$(V)" TARGET_DIR="libuser/" all,)
63 add16157 Blue Swirl
64 c05ac895 Paul Brook
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
65 c05ac895 Paul Brook
romsubdir-%:
66 c05ac895 Paul Brook
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
67 c05ac895 Paul Brook
68 c05ac895 Paul Brook
ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
69 c05ac895 Paul Brook
70 c05ac895 Paul Brook
recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
71 83f64091 bellard
72 faf07963 pbrook
#######################################################################
73 319f08ea Juan Quintela
# block-obj-y is code used by both qemu system emulation and qemu-img
74 faf07963 pbrook
75 319f08ea Juan Quintela
block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
76 a25a0ef5 Anthony Liguori
block-obj-y += nbd.o block.o aio.o aes.o osdep.o
77 4dd75c70 Christoph Hellwig
block-obj-$(CONFIG_POSIX) += posix-aio-compat.o
78 5c6c3a6c Christoph Hellwig
block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
79 1a65ba76 Juan Quintela
80 9aebd98a Stefan Weil
block-nested-y += cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
81 1a65ba76 Juan Quintela
block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
82 1a65ba76 Juan Quintela
block-nested-y += parallels.o nbd.o
83 eeb6d45b Juan Quintela
block-nested-$(CONFIG_WIN32) += raw-win32.o
84 eeb6d45b Juan Quintela
block-nested-$(CONFIG_POSIX) += raw-posix.o
85 1a65ba76 Juan Quintela
block-nested-$(CONFIG_CURL) += curl.o
86 1a65ba76 Juan Quintela
87 1a65ba76 Juan Quintela
block-obj-y +=  $(addprefix block/, $(block-nested-y))
88 769ce76d Alexander Graf
89 e1144d00 Mark McLoughlin
net-obj-y = net.o
90 7200ac3c Mark McLoughlin
net-nested-y = queue.o checksum.o
91 5281d757 Mark McLoughlin
net-nested-$(CONFIG_POSIX) += tap.o
92 c28b1c10 Mark McLoughlin
net-nested-$(CONFIG_LINUX) += tap-linux.o
93 33ad161a Mark McLoughlin
net-nested-$(CONFIG_WIN32) += tap-win32.o
94 e7e92325 Mark McLoughlin
net-nested-$(CONFIG_BSD) += tap-bsd.o
95 966ea5ec Mark McLoughlin
net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
96 88b3ec02 Mark McLoughlin
net-nested-$(CONFIG_AIX) += tap-aix.o
97 e1144d00 Mark McLoughlin
net-obj-y += $(addprefix net/, $(net-nested-y))
98 e1144d00 Mark McLoughlin
99 4fb240a4 bellard
######################################################################
100 2e2ea909 bellard
# libqemu_common.a: Target independent part of system emulation. The
101 4fb240a4 bellard
# long term path is to suppress *all* target specific code in case of
102 4fb240a4 bellard
# system emulation, i.e. a single QEMU executable should support all
103 4fb240a4 bellard
# CPUs and machines.
104 47cea614 bellard
105 6ef859b3 Juan Quintela
obj-y = $(block-obj-y)
106 e1144d00 Mark McLoughlin
obj-y += $(net-obj-y)
107 34005a00 Kirill A. Shutemov
obj-y += readline.o console.o
108 6ef859b3 Juan Quintela
109 c2b023b6 Blue Swirl
obj-y += tcg-runtime.o host-utils.o
110 5f74377c Juan Quintela
obj-y += irq.o ioport.o
111 5f74377c Juan Quintela
obj-$(CONFIG_PTIMER) += ptimer.o
112 ae573db3 Juan Quintela
obj-$(CONFIG_MAX7310) += max7310.o
113 976ca9ab Juan Quintela
obj-$(CONFIG_WM8750) += wm8750.o
114 92eb6b4e Juan Quintela
obj-$(CONFIG_TWL92230) += twl92230.o
115 3c848e2a Juan Quintela
obj-$(CONFIG_TSC2005) += tsc2005.o
116 03aba0e3 Juan Quintela
obj-$(CONFIG_LM832X) += lm832x.o
117 d9b44620 Juan Quintela
obj-$(CONFIG_TMP105) += tmp105.o
118 4aa5b83f Juan Quintela
obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
119 6a559be5 Juan Quintela
obj-$(CONFIG_SSD0303) += ssd0303.o
120 54bcf074 Juan Quintela
obj-$(CONFIG_SSD0323) += ssd0323.o
121 20a4afc4 Juan Quintela
obj-$(CONFIG_ADS7846) += ads7846.o
122 ee99ca01 Juan Quintela
obj-$(CONFIG_MAX111X) += max111x.o
123 ee99ca01 Juan Quintela
obj-y += i2c.o smbus.o smbus_eeprom.o
124 d9b44620 Juan Quintela
obj-y += eeprom93xx.o
125 6ef859b3 Juan Quintela
obj-y += scsi-disk.o cdrom.o
126 d52affa7 Gerd Hoffmann
obj-y += scsi-generic.o scsi-bus.o
127 6ef859b3 Juan Quintela
obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
128 806b6024 Gerd Hoffmann
obj-y += usb-serial.o usb-net.o usb-bus.o
129 c62c4551 Juan Quintela
obj-$(CONFIG_SSI) += ssi.o
130 93a60400 Juan Quintela
obj-$(CONFIG_SSI_SD) += ssi-sd.o
131 b21fd8e6 Juan Quintela
obj-$(CONFIG_SD) += sd.o
132 6ef859b3 Juan Quintela
obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
133 6ef859b3 Juan Quintela
obj-y += bt-hci-csr.o
134 f7105843 Mark McLoughlin
obj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o
135 7200ac3c Mark McLoughlin
obj-y += qemu-char.o aio.o savevm.o
136 6ef859b3 Juan Quintela
obj-y += msmouse.o ps2.o
137 c62c4551 Juan Quintela
obj-y += qdev.o qdev-properties.o
138 a6fd08eb Luiz Capitulino
obj-y += qint.o qstring.o qdict.o qlist.o qemu-config.o
139 87ecb68b pbrook
140 0e22fd2f Juan Quintela
obj-$(CONFIG_BRLAPI) += baum.o
141 5ac1fad3 Paolo Bonzini
obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
142 4fb240a4 bellard
143 98b068a9 Juan Quintela
audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
144 0e22fd2f Juan Quintela
145 0e22fd2f Juan Quintela
audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
146 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_SDL) += sdlaudio.o
147 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_OSS) += ossaudio.o
148 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_COREAUDIO) += coreaudio.o
149 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_ALSA) += alsaaudio.o
150 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
151 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_FMOD) += fmodaudio.o
152 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_ESD) += esdaudio.o
153 0e22fd2f Juan Quintela
audio-obj-$(CONFIG_PA) += paaudio.o
154 d5631638 malc
audio-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
155 67f86e8e Juan Quintela
audio-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
156 d5631638 malc
audio-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
157 eda959bd Juan Quintela
audio-obj-y += wavcapture.o
158 6ef859b3 Juan Quintela
obj-y += $(addprefix audio/, $(audio-obj-y))
159 4fb240a4 bellard
160 6ef859b3 Juan Quintela
obj-y += keymaps.o
161 0e22fd2f Juan Quintela
obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
162 0e22fd2f Juan Quintela
obj-$(CONFIG_CURSES) += curses.o
163 6ef859b3 Juan Quintela
obj-y += vnc.o acl.o d3des.o
164 0e22fd2f Juan Quintela
obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
165 0e22fd2f Juan Quintela
obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
166 0e22fd2f Juan Quintela
obj-$(CONFIG_COCOA) += cocoa.o
167 0e22fd2f Juan Quintela
obj-$(CONFIG_IOTHREAD) += qemu-thread.o
168 e5d355d1 aliguori
169 f835ed1c Juan Quintela
slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
170 f835ed1c Juan Quintela
slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
171 f835ed1c Juan Quintela
slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
172 0e22fd2f Juan Quintela
obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
173 4fb240a4 bellard
174 2567f579 Blue Swirl
# xen backend driver support
175 0e22fd2f Juan Quintela
obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
176 0e22fd2f Juan Quintela
obj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
177 2567f579 Blue Swirl
178 a558ee17 Juan Quintela
QEMU_CFLAGS+=$(CURL_CFLAGS)
179 769ce76d Alexander Graf
180 4fb240a4 bellard
cocoa.o: cocoa.m
181 4fb240a4 bellard
182 0483755a aliguori
keymaps.o: keymaps.c keymaps.h
183 0483755a aliguori
184 c18a2c36 Stefano Stabellini
sdl_zoom.o: sdl_zoom.c sdl_zoom.h sdl_zoom_template.h
185 c18a2c36 Stefano Stabellini
186 c18a2c36 Stefano Stabellini
sdl.o: sdl.c keymaps.h sdl_keysym.h sdl_zoom.h
187 807544e2 aliguori
188 a558ee17 Juan Quintela
sdl.o audio/sdlaudio.o sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
189 4fb240a4 bellard
190 76655d6d aliguori
acl.o: acl.h acl.c
191 76655d6d aliguori
192 2f9606b3 aliguori
vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
193 5fb6c7a8 aliguori
194 76655d6d aliguori
vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
195 4fb240a4 bellard
196 a558ee17 Juan Quintela
vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
197 4d3b6f6e balrog
198 5fb6c7a8 aliguori
vnc-tls.o: vnc-tls.c vnc.h
199 5fb6c7a8 aliguori
200 5fb6c7a8 aliguori
vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
201 5fb6c7a8 aliguori
202 2f9606b3 aliguori
vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
203 2f9606b3 aliguori
204 0483755a aliguori
curses.o: curses.c keymaps.h curses_keys.h
205 fb599c9a balrog
206 a558ee17 Juan Quintela
bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
207 4fb240a4 bellard
208 6ef859b3 Juan Quintela
libqemu_common.a: $(obj-y)
209 4fb240a4 bellard
210 4fb240a4 bellard
######################################################################
211 4fb240a4 bellard
212 fafce63d Uri Lublin
qemu-img.o: config-host.h qemu-img-cmds.h
213 153859be Stuart Brady
214 a25a0ef5 Anthony Liguori
qemu-img$(EXESUF): qemu-img.o qemu-tool.o $(block-obj-y)
215 4fb240a4 bellard
216 a25a0ef5 Anthony Liguori
qemu-nbd$(EXESUF):  qemu-nbd.o qemu-tool.o $(block-obj-y)
217 3aa892d7 aliguori
218 783c4f58 Paolo Bonzini
qemu-io.o: config-host.h
219 783c4f58 Paolo Bonzini
220 a25a0ef5 Anthony Liguori
qemu-io$(EXESUF):  qemu-io.o qemu-tool.o cmd.o $(block-obj-y)
221 0a8e1acd aliguori
222 153859be Stuart Brady
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
223 153859be Stuart Brady
	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
224 153859be Stuart Brady
225 33837ba6 Luiz Capitulino
check-qint: check-qint.o qint.o qemu-malloc.o
226 5de65a07 Luiz Capitulino
check-qstring: check-qstring.o qstring.o qemu-malloc.o
227 7b8c51ad Luiz Capitulino
check-qdict: check-qdict.o qdict.o qint.o qstring.o qemu-malloc.o
228 3aa3dcff Luiz Capitulino
check-qlist: check-qlist.o qlist.o qint.o qemu-malloc.o
229 33837ba6 Luiz Capitulino
230 31e31b8a bellard
clean:
231 2d80ae89 bellard
# avoid old build problems by removing potentially incorrect old files
232 25be210f Juan Quintela
	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
233 86e840ee aurel32
	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
234 e1144d00 Mark McLoughlin
	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d
235 07b44ce9 Blue Swirl
	rm -f qemu-img-cmds.h
236 7d3505c5 bellard
	$(MAKE) -C tests clean
237 add16157 Blue Swirl
	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
238 7d3505c5 bellard
	$(MAKE) -C $$d $@ || exit 1 ; \
239 626df76a bellard
        done
240 31e31b8a bellard
241 7d13299d bellard
distclean: clean
242 1215c6e7 Juan Quintela
	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
243 1f3d3c8f Juan Quintela
	rm -f config-all-devices.mak config-all-devices.h*
244 0cb3fb1e pbrook
	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
245 add16157 Blue Swirl
	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
246 bc1b050d bellard
	rm -rf $$d || exit 1 ; \
247 76bc6838 bellard
        done
248 7d13299d bellard
249 fed4a9ad bellard
KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
250 fed4a9ad bellard
ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
251 fed4a9ad bellard
common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
252 fed4a9ad bellard
253 77755340 ths
ifdef INSTALL_BLOBS
254 77755340 ths
BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
255 e5d01b06 aurel32
video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
256 e5d01b06 aurel32
pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
257 74b12bef Anthony Liguori
pxe-virtio.bin pxe-eepro100.bin pxe-pcnet.bin \
258 253d0942 Alexander Graf
bamboo.dtb petalogix-s3adsp1800.dtb \
259 253d0942 Alexander Graf
multiboot.bin
260 77755340 ths
else
261 77755340 ths
BLOBS=
262 77755340 ths
endif
263 77755340 ths
264 38954dca pbrook
install-doc: $(DOCS)
265 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
266 58f8aead aliguori
	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
267 96d409eb Juan Quintela
ifdef CONFIG_POSIX
268 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
269 58f8aead aliguori
	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
270 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
271 58f8aead aliguori
	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
272 38954dca pbrook
endif
273 38954dca pbrook
274 38954dca pbrook
install: all $(if $(BUILD_DOCS),install-doc)
275 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
276 932a79df ths
ifneq ($(TOOLS),)
277 58f8aead aliguori
	$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
278 932a79df ths
endif
279 77755340 ths
ifneq ($(BLOBS),)
280 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
281 77755340 ths
	set -e; for x in $(BLOBS); do \
282 58f8aead aliguori
		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
283 ad064840 pbrook
	done
284 77755340 ths
endif
285 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
286 18be8d77 blueswir1
	set -e; for x in $(KEYMAPS); do \
287 79fd42aa Anthony Liguori
		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
288 ad064840 pbrook
	done
289 626df76a bellard
	for d in $(TARGET_DIRS); do \
290 7d3505c5 bellard
	$(MAKE) -C $$d $@ || exit 1 ; \
291 626df76a bellard
        done
292 612384d7 bellard
293 367e86e8 bellard
# various test targets
294 9b0b8203 bellard
test speed: all
295 7d3505c5 bellard
	$(MAKE) -C tests $@
296 31e31b8a bellard
297 21d4e8e3 Alexandre Bique
.PHONY: TAGS
298 5fafdf24 ths
TAGS:
299 21d4e8e3 Alexandre Bique
	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
300 31e31b8a bellard
301 6688bc6d bellard
cscope:
302 6688bc6d bellard
	rm -f ./cscope.*
303 ede46085 aurel32
	find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
304 6688bc6d bellard
	cscope -b
305 6688bc6d bellard
306 3ef693a0 bellard
# documentation
307 1f673135 bellard
%.html: %.texi
308 0d00e563 aliguori
	$(call quiet-command,texi2html -I=. -monolithic -number $<,"  GEN   $@")
309 3ef693a0 bellard
310 f3548328 bellard
%.info: %.texi
311 0d00e563 aliguori
	$(call quiet-command,makeinfo -I . $< -o $@,"  GEN   $@")
312 f3548328 bellard
313 f3548328 bellard
%.dvi: %.texi
314 0d00e563 aliguori
	$(call quiet-command,texi2dvi -I . $<,"  GEN   $@")
315 5824d651 blueswir1
316 5824d651 blueswir1
qemu-options.texi: $(SRC_PATH)/qemu-options.hx
317 0d00e563 aliguori
	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
318 f3548328 bellard
319 2313086a Blue Swirl
qemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
320 2313086a Blue Swirl
	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
321 2313086a Blue Swirl
322 153859be Stuart Brady
qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
323 153859be Stuart Brady
	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
324 153859be Stuart Brady
325 2313086a Blue Swirl
qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
326 0d00e563 aliguori
	$(call quiet-command, \
327 0d00e563 aliguori
	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
328 0d00e563 aliguori
	  pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
329 0d00e563 aliguori
	  "  GEN   $@")
330 5a67135a bellard
331 153859be Stuart Brady
qemu-img.1: qemu-img.texi qemu-img-cmds.texi
332 0d00e563 aliguori
	$(call quiet-command, \
333 0d00e563 aliguori
	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
334 0d00e563 aliguori
	  pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
335 0d00e563 aliguori
	  "  GEN   $@")
336 acd935ef bellard
337 7a5ca864 bellard
qemu-nbd.8: qemu-nbd.texi
338 0d00e563 aliguori
	$(call quiet-command, \
339 0d00e563 aliguori
	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
340 0d00e563 aliguori
	  pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
341 0d00e563 aliguori
	  "  GEN   $@")
342 7a5ca864 bellard
343 0cb3fb1e pbrook
info: qemu-doc.info qemu-tech.info
344 0cb3fb1e pbrook
345 0cb3fb1e pbrook
dvi: qemu-doc.dvi qemu-tech.dvi
346 0cb3fb1e pbrook
347 0cb3fb1e pbrook
html: qemu-doc.html qemu-tech.html
348 0cb3fb1e pbrook
349 153859be Stuart Brady
qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-monitor.texi qemu-img-cmds.texi
350 818220f5 aliguori
351 df5cf721 ths
VERSION ?= $(shell cat VERSION)
352 df5cf721 ths
FILE = qemu-$(VERSION)
353 586314f2 bellard
354 1e43adfc bellard
# tar release (use 'make -k tar' on a checkouted tree)
355 586314f2 bellard
tar:
356 586314f2 bellard
	rm -rf /tmp/$(FILE)
357 1e43adfc bellard
	cp -r . /tmp/$(FILE)
358 99c6c082 aurel32
	cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
359 586314f2 bellard
	rm -rf /tmp/$(FILE)
360 586314f2 bellard
361 76b62fd0 bellard
# generate a binary distribution
362 d691f669 bellard
tarbin:
363 18be8d77 blueswir1
	cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
364 43095f31 bellard
	$(bindir)/qemu \
365 43095f31 bellard
	$(bindir)/qemu-system-x86_64 \
366 40e8a53b aurel32
	$(bindir)/qemu-system-arm \
367 40e8a53b aurel32
	$(bindir)/qemu-system-cris \
368 40e8a53b aurel32
	$(bindir)/qemu-system-m68k \
369 bc6291a1 Edgar E. Iglesias
	$(bindir)/qemu-system-microblaze \
370 93856aac bellard
	$(bindir)/qemu-system-mips \
371 38260998 pbrook
	$(bindir)/qemu-system-mipsel \
372 fbe4f65b ths
	$(bindir)/qemu-system-mips64 \
373 fbe4f65b ths
	$(bindir)/qemu-system-mips64el \
374 40e8a53b aurel32
	$(bindir)/qemu-system-ppc \
375 40e8a53b aurel32
	$(bindir)/qemu-system-ppcemb \
376 40e8a53b aurel32
	$(bindir)/qemu-system-ppc64 \
377 ff1aaf65 ths
	$(bindir)/qemu-system-sh4 \
378 85ffbdfc ths
	$(bindir)/qemu-system-sh4eb \
379 40e8a53b aurel32
	$(bindir)/qemu-system-sparc \
380 7efa4387 bellard
	$(bindir)/qemu-i386 \
381 f0403c03 bellard
	$(bindir)/qemu-x86_64 \
382 40e8a53b aurel32
	$(bindir)/qemu-alpha \
383 40e8a53b aurel32
	$(bindir)/qemu-arm \
384 40e8a53b aurel32
	$(bindir)/qemu-armeb \
385 40e8a53b aurel32
	$(bindir)/qemu-cris \
386 40e8a53b aurel32
	$(bindir)/qemu-m68k \
387 bc6291a1 Edgar E. Iglesias
	$(bindir)/qemu-microblaze \
388 40e8a53b aurel32
	$(bindir)/qemu-mips \
389 40e8a53b aurel32
	$(bindir)/qemu-mipsel \
390 40e8a53b aurel32
	$(bindir)/qemu-ppc \
391 40e8a53b aurel32
	$(bindir)/qemu-ppc64 \
392 40e8a53b aurel32
	$(bindir)/qemu-ppc64abi32 \
393 40e8a53b aurel32
	$(bindir)/qemu-sh4 \
394 40e8a53b aurel32
	$(bindir)/qemu-sh4eb \
395 40e8a53b aurel32
	$(bindir)/qemu-sparc \
396 40e8a53b aurel32
	$(bindir)/qemu-sparc64 \
397 40e8a53b aurel32
	$(bindir)/qemu-sparc32plus \
398 40e8a53b aurel32
	$(bindir)/qemu-img \
399 40e8a53b aurel32
	$(bindir)/qemu-nbd \
400 7efa4387 bellard
	$(datadir)/bios.bin \
401 7efa4387 bellard
	$(datadir)/vgabios.bin \
402 de9258a8 bellard
	$(datadir)/vgabios-cirrus.bin \
403 637f6cd7 bellard
	$(datadir)/ppc_rom.bin \
404 d5295253 bellard
	$(datadir)/video.x \
405 0986ac3b bellard
	$(datadir)/openbios-sparc32 \
406 938255d2 blueswir1
	$(datadir)/openbios-sparc64 \
407 e5d01b06 aurel32
	$(datadir)/openbios-ppc \
408 40e8a53b aurel32
	$(datadir)/pxe-ne2k_pci.bin \
409 19c80e50 bellard
	$(datadir)/pxe-rtl8139.bin \
410 40e8a53b aurel32
	$(datadir)/pxe-pcnet.bin \
411 2991990b aliguori
	$(datadir)/pxe-e1000.bin \
412 1f50f8d1 bellard
	$(docdir)/qemu-doc.html \
413 1f50f8d1 bellard
	$(docdir)/qemu-tech.html \
414 40e8a53b aurel32
	$(mandir)/man1/qemu.1 \
415 40e8a53b aurel32
	$(mandir)/man1/qemu-img.1 \
416 7a5ca864 bellard
	$(mandir)/man8/qemu-nbd.8
417 d691f669 bellard
418 4fb240a4 bellard
# Include automatically generated dependency files
419 e1144d00 Mark McLoughlin
-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d)