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