Statistics
| Branch: | Revision:

root / Makefile @ 9da8ba18

History | View | Annotate | Download (2.7 kB)

1
include config-host.mak
2

    
3
CFLAGS=-Wall -O2 -g
4
LDFLAGS=-g
5
LIBS=
6
DEFINES+=-D_GNU_SOURCE
7
TOOLS=vlmkcow
8

    
9
all: dyngen $(TOOLS) qemu-doc.html
10
	for d in $(TARGET_DIRS); do \
11
	make -C $$d $@ || exit 1 ; \
12
        done
13

    
14
vlmkcow: vlmkcow.o
15
	$(HOST_CC) -o $@ $^  $(LIBS)
16

    
17
dyngen: dyngen.o
18
	$(HOST_CC) -o $@ $^  $(LIBS)
19

    
20
%.o: %.c
21
	$(HOST_CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
22

    
23
clean:
24
	rm -f *.o *.a $(TOOLS) dyngen TAGS
25
	for d in $(TARGET_DIRS); do \
26
	make -C $$d $@ || exit 1 ; \
27
        done
28

    
29
distclean: clean
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
34

    
35
install: all 
36
	mkdir -p $(prefix)/bin
37
	install -m 755 -s $(TOOLS) $(prefix)/bin
38
	for d in $(TARGET_DIRS); do \
39
	make -C $$d $@ || exit 1 ; \
40
        done
41

    
42
# various test targets
43
test speed: all
44
	make -C tests $@
45

    
46
TAGS: 
47
	etags *.[ch] tests/*.[ch]
48

    
49
# documentation
50
qemu-doc.html: qemu-doc.texi
51
	texi2html -monolithic -number $<
52

    
53
FILES= \
54
README README.distrib COPYING COPYING.LIB TODO Changelog VERSION \
55
configure Makefile Makefile.target \
56
dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \
57
elf.h elfload.c main.c signal.c qemu.h \
58
syscall.c syscall_defs.h vm86.c path.c mmap.c \
59
i386.ld ppc.ld alpha.ld s390.ld sparc.ld arm.ld m68k.ld \
60
vl.c i386-vl.ld vl.h block.c vlmkcow.c vga.c vga_template.h sdl.c \
61
thunk.c cpu-exec.c translate.c cpu-all.h cpu-defs.h thunk.h exec.h\
62
exec.c cpu-exec.c gdbstub.c bswap.h \
63
cpu-i386.h op-i386.c helper-i386.c helper2-i386.c syscall-i386.h translate-i386.c \
64
exec-i386.h ops_template.h ops_template_mem.h op_string.h opreg_template.h \
65
ops_mem.h softmmu_template.h softmmu_header.h \
66
cpu-arm.h syscall-arm.h exec-arm.h op-arm.c translate-arm.c op-arm-template.h \
67
dis-asm.h disas.c disas.h alpha-dis.c ppc-dis.c i386-dis.c sparc-dis.c \
68
arm-dis.c \
69
tests/Makefile \
70
tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h \
71
tests/test-i386-muldiv.h tests/test-i386-code16.S tests/test-i386-vm86.S \
72
tests/hello-i386.c tests/hello-i386 \
73
tests/hello-arm.c tests/hello-arm \
74
tests/sha1.c \
75
tests/testsig.c tests/testclone.c tests/testthread.c \
76
tests/runcom.c tests/pi_10.com \
77
tests/test_path.c \
78
qemu-doc.texi qemu-doc.html
79

    
80
FILE=qemu-$(VERSION)
81

    
82
tar:
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

    
89
# generate a binary distribution including the test binary environnment 
90
BINPATH=/usr/local/qemu-i386
91

    
92
tarbin:
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
97

    
98
ifneq ($(wildcard .depend),)
99
include .depend
100
endif