pbrook | 0cb3fb1 | 2006-05-14 12:07:53 +0000 | [diff] [blame] | 1 | # Makefile for QEMU. |
| 2 | |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 3 | include config-host.mak |
bellard | 766a487 | 2003-02-18 23:35:48 +0000 | [diff] [blame] | 4 | |
aliguori | 818220f | 2008-09-24 01:13:40 +0000 | [diff] [blame] | 5 | .PHONY: all clean cscope distclean dvi html info install install-doc \ |
| 6 | recurse-all speed tar tarbin test |
pbrook | 0cb3fb1 | 2006-05-14 12:07:53 +0000 | [diff] [blame] | 7 | |
pbrook | 8c462f8 | 2007-11-18 21:12:37 +0000 | [diff] [blame] | 8 | VPATH=$(SRC_PATH):$(SRC_PATH)/hw |
| 9 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 10 | CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS) |
| 11 | LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS) |
blueswir1 | 3142255 | 2007-04-16 18:27:06 +0000 | [diff] [blame] | 12 | |
malc | 96935aa | 2008-07-02 21:16:22 +0000 | [diff] [blame] | 13 | CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@ |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 14 | CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
bellard | 766a487 | 2003-02-18 23:35:48 +0000 | [diff] [blame] | 15 | LIBS= |
bellard | 1f50f8d | 2004-05-08 14:44:43 +0000 | [diff] [blame] | 16 | ifdef CONFIG_STATIC |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 17 | LDFLAGS += -static |
bellard | 1f50f8d | 2004-05-08 14:44:43 +0000 | [diff] [blame] | 18 | endif |
pbrook | cc8ae6d | 2006-04-23 17:57:59 +0000 | [diff] [blame] | 19 | ifdef BUILD_DOCS |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 20 | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 |
pbrook | cc8ae6d | 2006-04-23 17:57:59 +0000 | [diff] [blame] | 21 | else |
| 22 | DOCS= |
| 23 | endif |
bellard | 7d13299 | 2003-03-06 23:23:54 +0000 | [diff] [blame] | 24 | |
ths | 70956b7 | 2007-03-17 15:00:37 +0000 | [diff] [blame] | 25 | LIBS+=$(AIOLIBS) |
bellard | 83f6409 | 2006-08-01 16:21:11 +0000 | [diff] [blame] | 26 | |
aliguori | 7e00eb9 | 2008-08-02 01:57:02 +0000 | [diff] [blame] | 27 | ifdef CONFIG_SOLARIS |
| 28 | LIBS+=-lsocket -lnsl -lresolv |
| 29 | endif |
| 30 | |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 31 | ifdef CONFIG_WIN32 |
| 32 | LIBS+=-lwinmm -lws2_32 -liphlpapi |
| 33 | endif |
| 34 | |
aliguori | 818220f | 2008-09-24 01:13:40 +0000 | [diff] [blame] | 35 | all: $(TOOLS) $(DOCS) recurse-all |
pbrook | b9dea4f | 2006-05-13 16:54:03 +0000 | [diff] [blame] | 36 | |
pbrook | cec7d0b | 2008-05-28 16:44:57 +0000 | [diff] [blame] | 37 | SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) |
| 38 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 39 | subdir-%: |
pbrook | 4aa4253 | 2006-05-13 13:55:08 +0000 | [diff] [blame] | 40 | $(MAKE) -C $(subst subdir-,,$@) all |
| 41 | |
pbrook | cec7d0b | 2008-05-28 16:44:57 +0000 | [diff] [blame] | 42 | $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a |
| 43 | $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a |
| 44 | |
| 45 | recurse-all: $(SUBDIR_RULES) |
bellard | 83f6409 | 2006-08-01 16:21:11 +0000 | [diff] [blame] | 46 | |
pbrook | faf0796 | 2007-11-11 02:51:17 +0000 | [diff] [blame] | 47 | ####################################################################### |
| 48 | # BLOCK_OBJS is code used by both qemu system emulation and qemu-img |
| 49 | |
pbrook | 17e2377 | 2008-06-09 13:47:45 +0000 | [diff] [blame] | 50 | BLOCK_OBJS=cutils.o qemu-malloc.o |
pbrook | faf0796 | 2007-11-11 02:51:17 +0000 | [diff] [blame] | 51 | BLOCK_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o |
| 52 | BLOCK_OBJS+=block-dmg.o block-bochs.o block-vpc.o block-vvfat.o |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 53 | BLOCK_OBJS+=block-qcow2.o block-parallels.o block-nbd.o |
aliguori | a76bab4 | 2008-09-22 19:17:18 +0000 | [diff] [blame] | 54 | BLOCK_OBJS+=nbd.o block.o aio.o |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 55 | |
| 56 | ifdef CONFIG_WIN32 |
| 57 | BLOCK_OBJS += block-raw-win32.o |
| 58 | else |
aliguori | 3c529d9 | 2008-12-12 16:41:40 +0000 | [diff] [blame] | 59 | ifdef CONFIG_AIO |
| 60 | BLOCK_OBJS += posix-aio-compat.o |
| 61 | endif |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 62 | BLOCK_OBJS += block-raw-posix.o |
| 63 | endif |
| 64 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 65 | ###################################################################### |
bellard | 2e2ea90 | 2008-02-01 10:02:52 +0000 | [diff] [blame] | 66 | # libqemu_common.a: Target independent part of system emulation. The |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 67 | # long term path is to suppress *all* target specific code in case of |
| 68 | # system emulation, i.e. a single QEMU executable should support all |
| 69 | # CPUs and machines. |
bellard | 47cea61 | 2004-05-17 20:06:42 +0000 | [diff] [blame] | 70 | |
aliguori | cd01b4a | 2008-08-21 19:25:45 +0000 | [diff] [blame] | 71 | OBJS=$(BLOCK_OBJS) |
pbrook | 87ecb68 | 2007-11-17 17:14:51 +0000 | [diff] [blame] | 72 | OBJS+=readline.o console.o |
aliguori | cd01b4a | 2008-08-21 19:25:45 +0000 | [diff] [blame] | 73 | |
pbrook | 87ecb68 | 2007-11-17 17:14:51 +0000 | [diff] [blame] | 74 | OBJS+=irq.o |
| 75 | OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o |
balrog | 7e7c5e4 | 2008-04-14 21:57:44 +0000 | [diff] [blame] | 76 | OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o |
balrog | 1d4e547 | 2008-05-09 22:16:11 +0000 | [diff] [blame] | 77 | OBJS+=tmp105.o lm832x.o |
pbrook | 87ecb68 | 2007-11-17 17:14:51 +0000 | [diff] [blame] | 78 | OBJS+=scsi-disk.o cdrom.o |
ths | 985a03b | 2007-12-24 16:10:43 +0000 | [diff] [blame] | 79 | OBJS+=scsi-generic.o |
blueswir1 | 6806364 | 2008-11-22 21:03:55 +0000 | [diff] [blame] | 80 | OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o |
balrog | 6c9f886 | 2008-07-17 20:47:13 +0000 | [diff] [blame] | 81 | OBJS+=usb-serial.o usb-net.o |
pbrook | 775616c | 2007-11-24 23:35:08 +0000 | [diff] [blame] | 82 | OBJS+=sd.o ssi-sd.o |
balrog | e6a6d5a | 2008-09-29 00:40:44 +0000 | [diff] [blame] | 83 | OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o |
aliguori | 559b90f | 2008-11-11 21:20:14 +0000 | [diff] [blame] | 84 | OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o |
malc | 902b3d5 | 2008-12-10 19:18:40 +0000 | [diff] [blame] | 85 | OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o |
pbrook | 87ecb68 | 2007-11-17 17:14:51 +0000 | [diff] [blame] | 86 | |
aurel32 | 2e4d9fb | 2008-04-08 06:01:02 +0000 | [diff] [blame] | 87 | ifdef CONFIG_BRLAPI |
| 88 | OBJS+= baum.o |
| 89 | LIBS+=-lbrlapi |
| 90 | endif |
| 91 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 92 | ifdef CONFIG_WIN32 |
| 93 | OBJS+=tap-win32.o |
aliguori | 559b90f | 2008-11-11 21:20:14 +0000 | [diff] [blame] | 94 | else |
| 95 | OBJS+=migration-exec.o |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 96 | endif |
| 97 | |
| 98 | AUDIO_OBJS = audio.o noaudio.o wavaudio.o mixeng.o |
| 99 | ifdef CONFIG_SDL |
| 100 | AUDIO_OBJS += sdlaudio.o |
| 101 | endif |
| 102 | ifdef CONFIG_OSS |
| 103 | AUDIO_OBJS += ossaudio.o |
| 104 | endif |
| 105 | ifdef CONFIG_COREAUDIO |
| 106 | AUDIO_OBJS += coreaudio.o |
balrog | ca9cc28 | 2008-01-14 04:24:29 +0000 | [diff] [blame] | 107 | AUDIO_PT = yes |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 108 | endif |
| 109 | ifdef CONFIG_ALSA |
| 110 | AUDIO_OBJS += alsaaudio.o |
| 111 | endif |
| 112 | ifdef CONFIG_DSOUND |
| 113 | AUDIO_OBJS += dsoundaudio.o |
| 114 | endif |
| 115 | ifdef CONFIG_FMOD |
| 116 | AUDIO_OBJS += fmodaudio.o |
| 117 | audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS) |
| 118 | endif |
balrog | ca9cc28 | 2008-01-14 04:24:29 +0000 | [diff] [blame] | 119 | ifdef CONFIG_ESD |
| 120 | AUDIO_PT = yes |
| 121 | AUDIO_PT_INT = yes |
| 122 | AUDIO_OBJS += esdaudio.o |
| 123 | endif |
malc | b8e59f1 | 2008-07-02 21:03:08 +0000 | [diff] [blame] | 124 | ifdef CONFIG_PA |
| 125 | AUDIO_PT = yes |
| 126 | AUDIO_PT_INT = yes |
| 127 | AUDIO_OBJS += paaudio.o |
| 128 | endif |
balrog | ca9cc28 | 2008-01-14 04:24:29 +0000 | [diff] [blame] | 129 | ifdef AUDIO_PT |
| 130 | LDFLAGS += -pthread |
| 131 | endif |
| 132 | ifdef AUDIO_PT_INT |
| 133 | AUDIO_OBJS += audio_pt_int.o |
| 134 | endif |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 135 | AUDIO_OBJS+= wavcapture.o |
| 136 | OBJS+=$(addprefix audio/, $(AUDIO_OBJS)) |
| 137 | |
| 138 | ifdef CONFIG_SDL |
| 139 | OBJS+=sdl.o x_keymap.o |
| 140 | endif |
balrog | 4d3b6f6 | 2008-02-10 16:33:14 +0000 | [diff] [blame] | 141 | ifdef CONFIG_CURSES |
| 142 | OBJS+=curses.o |
| 143 | endif |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 144 | OBJS+=vnc.o d3des.o |
| 145 | |
| 146 | ifdef CONFIG_COCOA |
| 147 | OBJS+=cocoa.o |
| 148 | endif |
| 149 | |
| 150 | ifdef CONFIG_SLIRP |
| 151 | CPPFLAGS+=-I$(SRC_PATH)/slirp |
| 152 | SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \ |
| 153 | slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \ |
| 154 | tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o |
| 155 | OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) |
| 156 | endif |
| 157 | |
ths | 8a16d27 | 2008-07-19 09:56:24 +0000 | [diff] [blame] | 158 | LIBS+=$(VDE_LIBS) |
| 159 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 160 | cocoa.o: cocoa.m |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 161 | $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 162 | |
| 163 | sdl.o: sdl.c keymaps.c sdl_keysym.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 164 | $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) -c -o $@ $< |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 165 | |
| 166 | vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h d3des.c d3des.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 167 | $(CC) $(CFLAGS) $(CPPFLAGS) $(CONFIG_VNC_TLS_CFLAGS) -c -o $@ $< |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 168 | |
balrog | 4d3b6f6 | 2008-02-10 16:33:14 +0000 | [diff] [blame] | 169 | curses.o: curses.c keymaps.c curses_keys.h |
pbrook | f5d2839 | 2008-03-31 23:41:24 +0000 | [diff] [blame] | 170 | $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< |
balrog | 4d3b6f6 | 2008-02-10 16:33:14 +0000 | [diff] [blame] | 171 | |
balrog | fb599c9 | 2008-09-28 23:49:55 +0000 | [diff] [blame] | 172 | bt-host.o: bt-host.c |
| 173 | $(CC) $(CFLAGS) $(CPPFLAGS) $(CONFIG_BLUEZ_CFLAGS) -c -o $@ $< |
| 174 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 175 | audio/sdlaudio.o: audio/sdlaudio.c |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 176 | $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) -c -o $@ $< |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 177 | |
| 178 | libqemu_common.a: $(OBJS) |
| 179 | rm -f $@ |
| 180 | $(AR) rcs $@ $(OBJS) |
| 181 | |
pbrook | cec7d0b | 2008-05-28 16:44:57 +0000 | [diff] [blame] | 182 | ####################################################################### |
| 183 | # USER_OBJS is code used by qemu userspace emulation |
malc | 902b3d5 | 2008-12-10 19:18:40 +0000 | [diff] [blame] | 184 | USER_OBJS=cutils.o cache-utils.o |
pbrook | cec7d0b | 2008-05-28 16:44:57 +0000 | [diff] [blame] | 185 | |
| 186 | libqemu_user.a: $(USER_OBJS) |
| 187 | rm -f $@ |
| 188 | $(AR) rcs $@ $(USER_OBJS) |
| 189 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 190 | ###################################################################### |
| 191 | |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 192 | qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 193 | $(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS) |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 194 | |
| 195 | %.o: %.c |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 196 | $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 197 | |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 198 | qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o osdep.o $(BLOCK_OBJS) |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 199 | $(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS) |
| 200 | |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 201 | clean: |
bellard | 2d80ae8 | 2003-08-11 23:01:33 +0000 | [diff] [blame] | 202 | # avoid old build problems by removing potentially incorrect old files |
ths | 5fafdf2 | 2007-09-16 21:08:06 +0000 | [diff] [blame] | 203 | 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 |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 204 | rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~ |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 205 | rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d |
bellard | 7d3505c | 2004-05-12 19:32:15 +0000 | [diff] [blame] | 206 | $(MAKE) -C tests clean |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 207 | for d in $(TARGET_DIRS); do \ |
bellard | 7d3505c | 2004-05-12 19:32:15 +0000 | [diff] [blame] | 208 | $(MAKE) -C $$d $@ || exit 1 ; \ |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 209 | done |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 210 | |
bellard | 7d13299 | 2003-03-06 23:23:54 +0000 | [diff] [blame] | 211 | distclean: clean |
pbrook | cc8ae6d | 2006-04-23 17:57:59 +0000 | [diff] [blame] | 212 | rm -f config-host.mak config-host.h $(DOCS) |
pbrook | 0cb3fb1 | 2006-05-14 12:07:53 +0000 | [diff] [blame] | 213 | rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr} |
bellard | 76bc683 | 2003-08-10 23:41:46 +0000 | [diff] [blame] | 214 | for d in $(TARGET_DIRS); do \ |
bellard | bc1b050 | 2003-10-28 00:12:52 +0000 | [diff] [blame] | 215 | rm -rf $$d || exit 1 ; \ |
bellard | 76bc683 | 2003-08-10 23:41:46 +0000 | [diff] [blame] | 216 | done |
bellard | 7d13299 | 2003-03-06 23:23:54 +0000 | [diff] [blame] | 217 | |
bellard | fed4a9a | 2004-12-12 22:18:34 +0000 | [diff] [blame] | 218 | KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ |
| 219 | ar de en-us fi fr-be hr it lv nl pl ru th \ |
| 220 | common de-ch es fo fr-ca hu ja mk nl-be pt sl tr |
| 221 | |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 222 | ifdef INSTALL_BLOBS |
| 223 | BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ |
| 224 | video.x openbios-sparc32 openbios-sparc64 pxe-ne2k_pci.bin \ |
aurel32 | 2c9fade | 2008-12-16 10:44:14 +0000 | [diff] [blame] | 225 | pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin bamboo.dtb |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 226 | else |
| 227 | BLOBS= |
| 228 | endif |
| 229 | |
pbrook | 38954dc | 2006-04-30 23:54:18 +0000 | [diff] [blame] | 230 | install-doc: $(DOCS) |
| 231 | mkdir -p "$(DESTDIR)$(docdir)" |
| 232 | $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" |
| 233 | ifndef CONFIG_WIN32 |
| 234 | mkdir -p "$(DESTDIR)$(mandir)/man1" |
| 235 | $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 236 | mkdir -p "$(DESTDIR)$(mandir)/man8" |
| 237 | $(INSTALL) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" |
pbrook | 38954dc | 2006-04-30 23:54:18 +0000 | [diff] [blame] | 238 | endif |
| 239 | |
| 240 | install: all $(if $(BUILD_DOCS),install-doc) |
pbrook | 1236cab | 2006-04-09 20:47:35 +0000 | [diff] [blame] | 241 | mkdir -p "$(DESTDIR)$(bindir)" |
ths | 932a79d | 2007-10-20 18:29:34 +0000 | [diff] [blame] | 242 | ifneq ($(TOOLS),) |
pbrook | 6a88264 | 2006-04-17 13:57:12 +0000 | [diff] [blame] | 243 | $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" |
ths | 932a79d | 2007-10-20 18:29:34 +0000 | [diff] [blame] | 244 | endif |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 245 | ifneq ($(BLOBS),) |
pbrook | 1236cab | 2006-04-09 20:47:35 +0000 | [diff] [blame] | 246 | mkdir -p "$(DESTDIR)$(datadir)" |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 247 | set -e; for x in $(BLOBS); do \ |
pbrook | 6a88264 | 2006-04-17 13:57:12 +0000 | [diff] [blame] | 248 | $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 249 | done |
ths | 7775534 | 2008-11-27 15:45:16 +0000 | [diff] [blame] | 250 | endif |
bellard | 11d9f69 | 2004-04-02 20:55:59 +0000 | [diff] [blame] | 251 | ifndef CONFIG_WIN32 |
pbrook | 1236cab | 2006-04-09 20:47:35 +0000 | [diff] [blame] | 252 | mkdir -p "$(DESTDIR)$(datadir)/keymaps" |
blueswir1 | 18be8d7 | 2008-03-05 18:16:09 +0000 | [diff] [blame] | 253 | set -e; for x in $(KEYMAPS); do \ |
pbrook | 6a88264 | 2006-04-17 13:57:12 +0000 | [diff] [blame] | 254 | $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 255 | done |
bellard | 11d9f69 | 2004-04-02 20:55:59 +0000 | [diff] [blame] | 256 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 257 | for d in $(TARGET_DIRS); do \ |
bellard | 7d3505c | 2004-05-12 19:32:15 +0000 | [diff] [blame] | 258 | $(MAKE) -C $$d $@ || exit 1 ; \ |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 259 | done |
bellard | 612384d | 2003-03-22 17:31:19 +0000 | [diff] [blame] | 260 | |
bellard | 367e86e | 2003-03-01 17:13:26 +0000 | [diff] [blame] | 261 | # various test targets |
bellard | 9b0b820 | 2007-11-14 10:34:57 +0000 | [diff] [blame] | 262 | test speed: all |
bellard | 7d3505c | 2004-05-12 19:32:15 +0000 | [diff] [blame] | 263 | $(MAKE) -C tests $@ |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 264 | |
ths | 5fafdf2 | 2007-09-16 21:08:06 +0000 | [diff] [blame] | 265 | TAGS: |
bellard | b9adb4a | 2003-04-29 20:41:16 +0000 | [diff] [blame] | 266 | etags *.[ch] tests/*.[ch] |
bellard | 31e31b8 | 2003-02-18 22:55:36 +0000 | [diff] [blame] | 267 | |
bellard | 6688bc6 | 2005-08-21 09:23:39 +0000 | [diff] [blame] | 268 | cscope: |
| 269 | rm -f ./cscope.* |
aurel32 | ede4608 | 2008-10-01 21:46:58 +0000 | [diff] [blame] | 270 | find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files |
bellard | 6688bc6 | 2005-08-21 09:23:39 +0000 | [diff] [blame] | 271 | cscope -b |
| 272 | |
bellard | 3ef693a | 2003-03-23 20:17:16 +0000 | [diff] [blame] | 273 | # documentation |
bellard | 1f67313 | 2004-04-04 15:21:17 +0000 | [diff] [blame] | 274 | %.html: %.texi |
bellard | 3ef693a | 2003-03-23 20:17:16 +0000 | [diff] [blame] | 275 | texi2html -monolithic -number $< |
| 276 | |
bellard | f354832 | 2006-04-30 22:51:54 +0000 | [diff] [blame] | 277 | %.info: %.texi |
| 278 | makeinfo $< -o $@ |
| 279 | |
| 280 | %.dvi: %.texi |
| 281 | texi2dvi $< |
| 282 | |
bellard | 5a67135 | 2003-10-01 00:13:48 +0000 | [diff] [blame] | 283 | qemu.1: qemu-doc.texi |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 284 | $(SRC_PATH)/texi2pod.pl $< qemu.pod |
bellard | 5a67135 | 2003-10-01 00:13:48 +0000 | [diff] [blame] | 285 | pod2man --section=1 --center=" " --release=" " qemu.pod > $@ |
| 286 | |
bellard | acd935e | 2004-11-15 22:57:26 +0000 | [diff] [blame] | 287 | qemu-img.1: qemu-img.texi |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 288 | $(SRC_PATH)/texi2pod.pl $< qemu-img.pod |
bellard | acd935e | 2004-11-15 22:57:26 +0000 | [diff] [blame] | 289 | pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ |
| 290 | |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 291 | qemu-nbd.8: qemu-nbd.texi |
| 292 | $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod |
| 293 | pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@ |
| 294 | |
pbrook | 0cb3fb1 | 2006-05-14 12:07:53 +0000 | [diff] [blame] | 295 | info: qemu-doc.info qemu-tech.info |
| 296 | |
| 297 | dvi: qemu-doc.dvi qemu-tech.dvi |
| 298 | |
| 299 | html: qemu-doc.html qemu-tech.html |
| 300 | |
aliguori | 818220f | 2008-09-24 01:13:40 +0000 | [diff] [blame] | 301 | qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi |
| 302 | |
ths | df5cf72 | 2007-01-24 22:56:36 +0000 | [diff] [blame] | 303 | VERSION ?= $(shell cat VERSION) |
| 304 | FILE = qemu-$(VERSION) |
bellard | 586314f | 2003-03-03 15:02:29 +0000 | [diff] [blame] | 305 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 306 | # tar release (use 'make -k tar' on a checkouted tree) |
bellard | 586314f | 2003-03-03 15:02:29 +0000 | [diff] [blame] | 307 | tar: |
| 308 | rm -rf /tmp/$(FILE) |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 309 | cp -r . /tmp/$(FILE) |
aurel32 | 99c6c08 | 2008-04-22 20:45:30 +0000 | [diff] [blame] | 310 | cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn |
bellard | 586314f | 2003-03-03 15:02:29 +0000 | [diff] [blame] | 311 | rm -rf /tmp/$(FILE) |
| 312 | |
bellard | 76b62fd | 2003-10-28 00:47:44 +0000 | [diff] [blame] | 313 | # generate a binary distribution |
bellard | d691f66 | 2003-03-24 21:58:34 +0000 | [diff] [blame] | 314 | tarbin: |
blueswir1 | 18be8d7 | 2008-03-05 18:16:09 +0000 | [diff] [blame] | 315 | cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \ |
bellard | 43095f3 | 2005-04-27 20:49:23 +0000 | [diff] [blame] | 316 | $(bindir)/qemu \ |
bellard | 43095f3 | 2005-04-27 20:49:23 +0000 | [diff] [blame] | 317 | $(bindir)/qemu-system-x86_64 \ |
aurel32 | 40e8a53 | 2009-01-03 12:35:57 +0000 | [diff] [blame] | 318 | $(bindir)/qemu-system-arm \ |
| 319 | $(bindir)/qemu-system-cris \ |
| 320 | $(bindir)/qemu-system-m68k \ |
bellard | 93856aa | 2005-07-24 18:44:35 +0000 | [diff] [blame] | 321 | $(bindir)/qemu-system-mips \ |
pbrook | 3826099 | 2006-03-11 14:51:13 +0000 | [diff] [blame] | 322 | $(bindir)/qemu-system-mipsel \ |
ths | fbe4f65 | 2007-04-01 11:16:48 +0000 | [diff] [blame] | 323 | $(bindir)/qemu-system-mips64 \ |
| 324 | $(bindir)/qemu-system-mips64el \ |
aurel32 | 40e8a53 | 2009-01-03 12:35:57 +0000 | [diff] [blame] | 325 | $(bindir)/qemu-system-ppc \ |
| 326 | $(bindir)/qemu-system-ppcemb \ |
| 327 | $(bindir)/qemu-system-ppc64 \ |
ths | ff1aaf6 | 2007-09-29 21:18:26 +0000 | [diff] [blame] | 328 | $(bindir)/qemu-system-sh4 \ |
ths | 85ffbdf | 2007-12-09 05:10:03 +0000 | [diff] [blame] | 329 | $(bindir)/qemu-system-sh4eb \ |
aurel32 | 40e8a53 | 2009-01-03 12:35:57 +0000 | [diff] [blame] | 330 | $(bindir)/qemu-system-sparc \ |
bellard | 7efa438 | 2004-05-12 18:54:06 +0000 | [diff] [blame] | 331 | $(bindir)/qemu-i386 \ |
bellard | f0403c0 | 2008-01-06 18:27:12 +0000 | [diff] [blame] | 332 | $(bindir)/qemu-x86_64 \ |
aurel32 | 40e8a53 | 2009-01-03 12:35:57 +0000 | [diff] [blame] | 333 | $(bindir)/qemu-alpha \ |
| 334 | $(bindir)/qemu-arm \ |
| 335 | $(bindir)/qemu-armeb \ |
| 336 | $(bindir)/qemu-cris \ |
| 337 | $(bindir)/qemu-m68k \ |
| 338 | $(bindir)/qemu-mips \ |
| 339 | $(bindir)/qemu-mipsel \ |
| 340 | $(bindir)/qemu-ppc \ |
| 341 | $(bindir)/qemu-ppc64 \ |
| 342 | $(bindir)/qemu-ppc64abi32 \ |
| 343 | $(bindir)/qemu-sh4 \ |
| 344 | $(bindir)/qemu-sh4eb \ |
| 345 | $(bindir)/qemu-sparc \ |
| 346 | $(bindir)/qemu-sparc64 \ |
| 347 | $(bindir)/qemu-sparc32plus \ |
| 348 | $(bindir)/qemu-img \ |
| 349 | $(bindir)/qemu-nbd \ |
bellard | 7efa438 | 2004-05-12 18:54:06 +0000 | [diff] [blame] | 350 | $(datadir)/bios.bin \ |
| 351 | $(datadir)/vgabios.bin \ |
bellard | de9258a | 2004-06-06 15:50:03 +0000 | [diff] [blame] | 352 | $(datadir)/vgabios-cirrus.bin \ |
bellard | 637f6cd | 2004-06-21 19:54:47 +0000 | [diff] [blame] | 353 | $(datadir)/ppc_rom.bin \ |
bellard | d529525 | 2005-07-03 14:00:51 +0000 | [diff] [blame] | 354 | $(datadir)/video.x \ |
bellard | 0986ac3 | 2006-06-14 12:36:32 +0000 | [diff] [blame] | 355 | $(datadir)/openbios-sparc32 \ |
blueswir1 | 938255d | 2008-04-23 19:38:07 +0000 | [diff] [blame] | 356 | $(datadir)/openbios-sparc64 \ |
aurel32 | 40e8a53 | 2009-01-03 12:35:57 +0000 | [diff] [blame] | 357 | $(datadir)/pxe-ne2k_pci.bin \ |
bellard | 19c80e5 | 2007-02-05 21:22:42 +0000 | [diff] [blame] | 358 | $(datadir)/pxe-rtl8139.bin \ |
aurel32 | 40e8a53 | 2009-01-03 12:35:57 +0000 | [diff] [blame] | 359 | $(datadir)/pxe-pcnet.bin \ |
aliguori | 2991990 | 2008-07-26 16:53:22 +0000 | [diff] [blame] | 360 | $(datadir)/pxe-e1000.bin \ |
bellard | 1f50f8d | 2004-05-08 14:44:43 +0000 | [diff] [blame] | 361 | $(docdir)/qemu-doc.html \ |
| 362 | $(docdir)/qemu-tech.html \ |
aurel32 | 40e8a53 | 2009-01-03 12:35:57 +0000 | [diff] [blame] | 363 | $(mandir)/man1/qemu.1 \ |
| 364 | $(mandir)/man1/qemu-img.1 \ |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 365 | $(mandir)/man8/qemu-nbd.8 |
bellard | d691f66 | 2003-03-24 21:58:34 +0000 | [diff] [blame] | 366 | |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 367 | # Include automatically generated dependency files |
| 368 | -include $(wildcard *.d audio/*.d slirp/*.d) |