]> git.proxmox.com Git - qemu.git/blame - Makefile
added translation cache
[qemu.git] / Makefile
CommitLineData
7d13299d 1include config.mak
766a487a 2
7d13299d 3CFLAGS=-Wall -O2 -g
31e31b8a 4LDFLAGS=-g
766a487a 5LIBS=
766a487a 6DEFINES=-DHAVE_BYTESWAP_H
7d13299d
FB
7
8ifeq ($(ARCH),i386)
9CFLAGS+=-fomit-frame-pointer
927f621e 10OP_CFLAGS=$(CFLAGS) -malign-functions=0 -mpreferred-stack-boundary=2
766a487a
FB
11endif
12
13ifeq ($(ARCH),ppc)
927f621e 14OP_CFLAGS=$(CFLAGS)
766a487a
FB
15endif
16
17#########################################################
18
0ecfa993 19DEFINES+=-D_GNU_SOURCE
766a487a 20LDSCRIPT=$(ARCH).ld
927f621e 21LIBS+=-ldl -lm
7d13299d
FB
22
23# profiling code
24ifdef TARGET_GPROF
25LDFLAGS+=-p
26CFLAGS+=-p
27endif
31e31b8a 28
586314f2 29OBJS= elfload.o main.o thunk.o syscall.o
7d13299d 30OBJS+=translate-i386.o op-i386.o exec-i386.o
0ecfa993
FB
31# NOTE: the disassembler code is only needed for debugging
32OBJS+=i386-dis.o dis-buf.o
31e31b8a
FB
33SRCS = $(OBJS:.o=.c)
34
35all: gemu
36
37gemu: $(OBJS)
367e86e8 38 $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
31e31b8a
FB
39
40depend: $(SRCS)
41 $(CC) -MM $(CFLAGS) $^ 1>.depend
42
367e86e8
FB
43# new i386 emulator
44dyngen: dyngen.c
45 $(HOST_CC) -O2 -Wall -g $< -o $@
46
47translate-i386.o: translate-i386.c op-i386.h cpu-i386.h
48
49op-i386.h: op-i386.o dyngen
50 ./dyngen -o $@ $<
51
52op-i386.o: op-i386.c opreg_template.h ops_template.h
927f621e 53 $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $<
367e86e8 54
31e31b8a
FB
55%.o: %.c
56 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
57
58clean:
7d13299d 59 $(MAKE) -C tests clean
586314f2 60 rm -f *.o *~ gemu dyngen TAGS
31e31b8a 61
7d13299d
FB
62distclean: clean
63 rm -f config.mak config.h
64
367e86e8
FB
65# various test targets
66test speed: gemu
67 make -C tests $@
31e31b8a 68
367e86e8
FB
69TAGS:
70 etags *.[ch] i386/*.[ch]
31e31b8a 71
586314f2
FB
72FILES= \
73COPYING.LIB dyngen.c ioctls.h ops_template.h syscall_types.h\
74Makefile elf.h linux_bin.h segment.h thunk.c\
75TODO elfload.c main.c signal.c thunk.h\
76cpu-i386.h gemu.h op-i386.c syscall-i386.h translate-i386.c\
77dis-asm.h gen-i386.h op-i386.h syscall.c\
78dis-buf.c i386-dis.c opreg_template.h syscall_defs.h\
7d13299d 79i386.ld ppc.ld exec-i386.h exec-i386.c configure VERSION \
77f8dd5a 80tests/Makefile\
586314f2 81tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\
d57c4e01 82tests/test-i386-muldiv.h\
1017ebe9 83tests/test2.c tests/hello.c tests/sha1.c
586314f2
FB
84
85FILE=gemu-$(VERSION)
86
87tar:
88 rm -rf /tmp/$(FILE)
89 mkdir -p /tmp/$(FILE)
90 cp -P $(FILES) /tmp/$(FILE)
91 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) )
92 rm -rf /tmp/$(FILE)
93
31e31b8a
FB
94ifneq ($(wildcard .depend),)
95include .depend
96endif