]> git.proxmox.com Git - mirror_qemu.git/blame - Makefile
gcc 3.x is mandatory now on PowerPC
[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 29distclean: clean
76bc6838
FB
30 rm -f config-host.mak config-host.h config.mak config.h
31 for d in $(TARGET_DIRS); do \
32 rm -f $$d/config.h $$d/config.mak || exit 1 ; \
33 done
7d13299d 34
626df76a 35install: all
d5a0b50c 36 mkdir -p $(prefix)/bin
626df76a
FB
37 install -m 755 -s $(TOOLS) $(prefix)/bin
38 for d in $(TARGET_DIRS); do \
39 make -C $$d $@ || exit 1 ; \
40 done
612384d7 41
367e86e8 42# various test targets
626df76a 43test speed: all
367e86e8 44 make -C tests $@
31e31b8a 45
367e86e8 46TAGS:
b9adb4a6 47 etags *.[ch] tests/*.[ch]
31e31b8a 48
3ef693a0
FB
49# documentation
50qemu-doc.html: qemu-doc.texi
51 texi2html -monolithic -number $<
52
586314f2 53FILES= \
fd429f2f 54README README.distrib COPYING COPYING.LIB TODO Changelog VERSION \
76bc6838 55configure Makefile Makefile.target \
de83cd02 56dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \
76bc6838 57elf.h elfload.c main.c signal.c qemu.h \
de83cd02 58syscall.c syscall_defs.h vm86.c path.c mmap.c \
76bc6838
FB
59i386.ld ppc.ld alpha.ld s390.ld sparc.ld arm.ld m68k.ld \
60vl.c i386-vl.ld vl.h block.c vlmkcow.c vga.c vga_template.h sdl.c \
61thunk.c cpu-exec.c translate.c cpu-all.h cpu-defs.h thunk.h exec.h\
62exec.c cpu-exec.c gdbstub.c bswap.h \
63cpu-i386.h op-i386.c helper-i386.c helper2-i386.c syscall-i386.h translate-i386.c \
4690764b 64exec-i386.h ops_template.h ops_template_mem.h op_string.h opreg_template.h \
76bc6838 65ops_mem.h softmmu_template.h softmmu_header.h \
de83cd02
FB
66cpu-arm.h syscall-arm.h exec-arm.h op-arm.c translate-arm.c op-arm-template.h \
67dis-asm.h disas.c disas.h alpha-dis.c ppc-dis.c i386-dis.c sparc-dis.c \
68arm-dis.c \
69tests/Makefile \
70tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h \
71tests/test-i386-muldiv.h tests/test-i386-code16.S tests/test-i386-vm86.S \
322d0c66 72tests/hello-i386.c tests/hello-i386 \
de83cd02
FB
73tests/hello-arm.c tests/hello-arm \
74tests/sha1.c \
3ef693a0 75tests/testsig.c tests/testclone.c tests/testthread.c \
fd429f2f 76tests/runcom.c tests/pi_10.com \
1eb87257 77tests/test_path.c \
3ef693a0 78qemu-doc.texi qemu-doc.html
586314f2 79
3ef693a0 80FILE=qemu-$(VERSION)
586314f2
FB
81
82tar:
83 rm -rf /tmp/$(FILE)
84 mkdir -p /tmp/$(FILE)
85 cp -P $(FILES) /tmp/$(FILE)
86 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) )
87 rm -rf /tmp/$(FILE)
88
d691f669
FB
89# generate a binary distribution including the test binary environnment
90BINPATH=/usr/local/qemu-i386
91
92tarbin:
1eb87257
FB
93 tar zcvf /tmp/qemu-$(VERSION)-i386-glibc21.tar.gz \
94 $(BINPATH)/etc $(BINPATH)/lib $(BINPATH)/bin $(BINPATH)/usr
95 tar zcvf /tmp/qemu-$(VERSION)-i386-wine.tar.gz \
96 $(BINPATH)/wine
d691f669 97
31e31b8a
FB
98ifneq ($(wildcard .depend),)
99include .depend
100endif