]> git.proxmox.com Git - mirror_qemu.git/blame - Makefile
build all targets at the same time
[mirror_qemu.git] / Makefile
CommitLineData
626df76a 1include config-host.mak
766a487a 2
7d13299d 3CFLAGS=-Wall -O2 -g
31e31b8a 4LDFLAGS=-g
766a487a 5LIBS=
0ecfa993 6DEFINES+=-D_GNU_SOURCE
626df76a 7TOOLS=vlmkcow
aa05ae6f 8
626df76a
FB
9all: dyngen $(TOOLS) qemu-doc.html
10 for d in $(TARGET_DIRS); do \
11 make -C $$d $@ || exit 1 ; \
12 done
33e3963e
FB
13
14vlmkcow: vlmkcow.o
626df76a 15 $(HOST_CC) -o $@ $^ $(LIBS)
de83cd02 16
626df76a
FB
17dyngen: dyngen.o
18 $(HOST_CC) -o $@ $^ $(LIBS)
de83cd02 19
31e31b8a 20%.o: %.c
626df76a 21 $(HOST_CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
31e31b8a
FB
22
23clean:
626df76a
FB
24 rm -f *.o *.a $(TOOLS) dyngen TAGS
25 for d in $(TARGET_DIRS); do \
26 make -C $$d $@ || exit 1 ; \
27 done
31e31b8a 28
7d13299d
FB
29distclean: clean
30 rm -f config.mak config.h
31
626df76a 32install: all
d5a0b50c 33 mkdir -p $(prefix)/bin
626df76a
FB
34 install -m 755 -s $(TOOLS) $(prefix)/bin
35 for d in $(TARGET_DIRS); do \
36 make -C $$d $@ || exit 1 ; \
37 done
612384d7 38
367e86e8 39# various test targets
626df76a 40test speed: all
367e86e8 41 make -C tests $@
31e31b8a 42
367e86e8 43TAGS:
b9adb4a6 44 etags *.[ch] tests/*.[ch]
31e31b8a 45
3ef693a0
FB
46# documentation
47qemu-doc.html: qemu-doc.texi
48 texi2html -monolithic -number $<
49
586314f2 50FILES= \
fd429f2f 51README README.distrib COPYING COPYING.LIB TODO Changelog VERSION \
de83cd02
FB
52configure \
53dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \
54Makefile elf.h elfload.c main.c signal.c qemu.h \
55syscall.c syscall_defs.h vm86.c path.c mmap.c \
6b1534cc 56i386.ld ppc.ld alpha.ld s390.ld sparc.ld arm.ld\
4690764b 57vl.c i386-vl.ld vl.h block.c vlmkcow.c\
de83cd02 58thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\
4690764b 59exec.c cpu-exec.c gdbstub.c\
de83cd02 60cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \
4690764b 61exec-i386.h ops_template.h ops_template_mem.h op_string.h opreg_template.h \
de83cd02
FB
62cpu-arm.h syscall-arm.h exec-arm.h op-arm.c translate-arm.c op-arm-template.h \
63dis-asm.h disas.c disas.h alpha-dis.c ppc-dis.c i386-dis.c sparc-dis.c \
64arm-dis.c \
65tests/Makefile \
66tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h \
67tests/test-i386-muldiv.h tests/test-i386-code16.S tests/test-i386-vm86.S \
322d0c66 68tests/hello-i386.c tests/hello-i386 \
de83cd02
FB
69tests/hello-arm.c tests/hello-arm \
70tests/sha1.c \
3ef693a0 71tests/testsig.c tests/testclone.c tests/testthread.c \
fd429f2f 72tests/runcom.c tests/pi_10.com \
1eb87257 73tests/test_path.c \
3ef693a0 74qemu-doc.texi qemu-doc.html
586314f2 75
3ef693a0 76FILE=qemu-$(VERSION)
586314f2
FB
77
78tar:
79 rm -rf /tmp/$(FILE)
80 mkdir -p /tmp/$(FILE)
81 cp -P $(FILES) /tmp/$(FILE)
82 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) )
83 rm -rf /tmp/$(FILE)
84
d691f669
FB
85# generate a binary distribution including the test binary environnment
86BINPATH=/usr/local/qemu-i386
87
88tarbin:
1eb87257
FB
89 tar zcvf /tmp/qemu-$(VERSION)-i386-glibc21.tar.gz \
90 $(BINPATH)/etc $(BINPATH)/lib $(BINPATH)/bin $(BINPATH)/usr
91 tar zcvf /tmp/qemu-$(VERSION)-i386-wine.tar.gz \
92 $(BINPATH)/wine
d691f669 93
31e31b8a
FB
94ifneq ($(wildcard .depend),)
95include .depend
96endif