Makefile 2.5 KB
Newer Older
1
include config-host.mak
B
bellard 已提交
2

B
bellard 已提交
3
CFLAGS=-Wall -O2 -g
4
LDFLAGS=-g
B
bellard 已提交
5
LIBS=
B
bellard 已提交
6
DEFINES+=-D_GNU_SOURCE
7
TOOLS=vlmkcow
B
bellard 已提交
8

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

vlmkcow: vlmkcow.o
15
	$(HOST_CC) -o $@ $^  $(LIBS)
B
bellard 已提交
16

17 18
dyngen: dyngen.o
	$(HOST_CC) -o $@ $^  $(LIBS)
B
bellard 已提交
19

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

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

B
bellard 已提交
29 30 31
distclean: clean
	rm -f config.mak config.h

32
install: all 
B
update  
bellard 已提交
33
	mkdir -p $(prefix)/bin
34 35 36 37
	install -m 755 -s $(TOOLS) $(prefix)/bin
	for d in $(TARGET_DIRS); do \
	make -C $$d $@ || exit 1 ; \
        done
B
bellard 已提交
38

B
bellard 已提交
39
# various test targets
40
test speed: all
B
bellard 已提交
41
	make -C tests $@
42

B
bellard 已提交
43
TAGS: 
B
bellard 已提交
44
	etags *.[ch] tests/*.[ch]
45

B
bellard 已提交
46 47 48 49
# documentation
qemu-doc.html: qemu-doc.texi
	texi2html -monolithic -number $<

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

B
bellard 已提交
76
FILE=qemu-$(VERSION)
B
bellard 已提交
77 78 79 80 81 82 83 84

tar:
	rm -rf /tmp/$(FILE)
	mkdir -p /tmp/$(FILE)
	cp -P $(FILES) /tmp/$(FILE)
	( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) )
	rm -rf /tmp/$(FILE)

85 86 87 88
# generate a binary distribution including the test binary environnment 
BINPATH=/usr/local/qemu-i386

tarbin:
B
update  
bellard 已提交
89 90 91 92
	tar zcvf /tmp/qemu-$(VERSION)-i386-glibc21.tar.gz \
                 $(BINPATH)/etc $(BINPATH)/lib $(BINPATH)/bin $(BINPATH)/usr
	tar zcvf /tmp/qemu-$(VERSION)-i386-wine.tar.gz \
                 $(BINPATH)/wine
93

94 95 96
ifneq ($(wildcard .depend),)
include .depend
endif
新手
引导
客服 返回
顶部