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