]> git.proxmox.com Git - mirror_qemu.git/blame_incremental - Makefile
build all targets at the same time
[mirror_qemu.git] / Makefile
... / ...
CommitLineData
1include config-host.mak
2
3CFLAGS=-Wall -O2 -g
4LDFLAGS=-g
5LIBS=
6DEFINES+=-D_GNU_SOURCE
7TOOLS=vlmkcow
8
9all: dyngen $(TOOLS) qemu-doc.html
10 for d in $(TARGET_DIRS); do \
11 make -C $$d $@ || exit 1 ; \
12 done
13
14vlmkcow: vlmkcow.o
15 $(HOST_CC) -o $@ $^ $(LIBS)
16
17dyngen: dyngen.o
18 $(HOST_CC) -o $@ $^ $(LIBS)
19
20%.o: %.c
21 $(HOST_CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
22
23clean:
24 rm -f *.o *.a $(TOOLS) dyngen TAGS
25 for d in $(TARGET_DIRS); do \
26 make -C $$d $@ || exit 1 ; \
27 done
28
29distclean: clean
30 rm -f config.mak config.h
31
32install: all
33 mkdir -p $(prefix)/bin
34 install -m 755 -s $(TOOLS) $(prefix)/bin
35 for d in $(TARGET_DIRS); do \
36 make -C $$d $@ || exit 1 ; \
37 done
38
39# various test targets
40test speed: all
41 make -C tests $@
42
43TAGS:
44 etags *.[ch] tests/*.[ch]
45
46# documentation
47qemu-doc.html: qemu-doc.texi
48 texi2html -monolithic -number $<
49
50FILES= \
51README README.distrib COPYING COPYING.LIB TODO Changelog VERSION \
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 \
56i386.ld ppc.ld alpha.ld s390.ld sparc.ld arm.ld\
57vl.c i386-vl.ld vl.h block.c vlmkcow.c\
58thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\
59exec.c cpu-exec.c gdbstub.c\
60cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \
61exec-i386.h ops_template.h ops_template_mem.h op_string.h opreg_template.h \
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 \
68tests/hello-i386.c tests/hello-i386 \
69tests/hello-arm.c tests/hello-arm \
70tests/sha1.c \
71tests/testsig.c tests/testclone.c tests/testthread.c \
72tests/runcom.c tests/pi_10.com \
73tests/test_path.c \
74qemu-doc.texi qemu-doc.html
75
76FILE=qemu-$(VERSION)
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
85# generate a binary distribution including the test binary environnment
86BINPATH=/usr/local/qemu-i386
87
88tarbin:
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
93
94ifneq ($(wildcard .depend),)
95include .depend
96endif