Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 124 lines (94 sloc) 2.715 kb
7d13299 added translation cache
bellard authored
1 include config.mak
766a487 ppc build
bellard authored
2
7d13299 added translation cache
bellard authored
3 CFLAGS=-Wall -O2 -g
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
4 LDFLAGS=-g
766a487 ppc build
bellard authored
5 LIBS=
6 DEFINES=-DHAVE_BYTESWAP_H
7d13299 added translation cache
bellard authored
7
8 ifeq ($(ARCH),i386)
9 CFLAGS+=-fomit-frame-pointer
ca73520 gcc 3.x fixes
bellard authored
10 OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
11 ifeq ($(GCC_MAJOR),3)
12 OP_CFLAGS+= -falign-functions=0
13 else
14 OP_CFLAGS+= -malign-functions=0
15 endif
766a487 ppc build
bellard authored
16 endif
17
18 ifeq ($(ARCH),ppc)
927f621 added float support
bellard authored
19 OP_CFLAGS=$(CFLAGS)
766a487 ppc build
bellard authored
20 endif
21
ca73520 gcc 3.x fixes
bellard authored
22 ifeq ($(GCC_MAJOR),3)
23 # very important to generate a return at the end of every operation
24 OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
25 endif
26
766a487 ppc build
bellard authored
27 #########################################################
28
0ecfa99 prints hello world
bellard authored
29 DEFINES+=-D_GNU_SOURCE
766a487 ppc build
bellard authored
30 LDSCRIPT=$(ARCH).ld
3ef693a distribution patches
bellard authored
31 LIBS+=-lm
7d13299 added translation cache
bellard authored
32
33 # profiling code
34 ifdef TARGET_GPROF
35 LDFLAGS+=-p
dc99065 added flags computation optimization
bellard authored
36 main.o: CFLAGS+=-p
7d13299 added translation cache
bellard authored
37 endif
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
38
3ef693a distribution patches
bellard authored
39 OBJS= elfload.o main.o syscall.o signal.o
40 SRCS:= $(OBJS:.o=.c)
41 OBJS+= libqemu.a
612384d added libgemu.a build
bellard authored
42
3ef693a distribution patches
bellard authored
43 LIBOBJS+=thunk.o translate-i386.o op-i386.o exec-i386.o
0ecfa99 prints hello world
bellard authored
44 # NOTE: the disassembler code is only needed for debugging
612384d added libgemu.a build
bellard authored
45 LIBOBJS+=i386-dis.o dis-buf.o
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
46
3ef693a distribution patches
bellard authored
47 all: qemu qemu-doc.html
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
48
3ef693a distribution patches
bellard authored
49 qemu: $(OBJS)
612384d added libgemu.a build
bellard authored
50 $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
51
52 depend: $(SRCS)
53 $(CC) -MM $(CFLAGS) $^ 1>.depend
54
3ef693a distribution patches
bellard authored
55 # libqemu
612384d added libgemu.a build
bellard authored
56
3ef693a distribution patches
bellard authored
57 libqemu.a: $(LIBOBJS)
612384d added libgemu.a build
bellard authored
58 rm -f $@
59 $(AR) rcs $@ $(LIBOBJS)
60
367e86e new x86 CPU core
bellard authored
61 dyngen: dyngen.c
62 $(HOST_CC) -O2 -Wall -g $< -o $@
63
64 translate-i386.o: translate-i386.c op-i386.h cpu-i386.h
65
66 op-i386.h: op-i386.o dyngen
67 ./dyngen -o $@ $<
68
69 op-i386.o: op-i386.c opreg_template.h ops_template.h
927f621 added float support
bellard authored
70 $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $<
367e86e new x86 CPU core
bellard authored
71
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
72 %.o: %.c
73 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
74
75 clean:
7d13299 added translation cache
bellard authored
76 $(MAKE) -C tests clean
3ef693a distribution patches
bellard authored
77 rm -f *.o *.a *~ qemu dyngen TAGS
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
78
7d13299 added translation cache
bellard authored
79 distclean: clean
80 rm -f config.mak config.h
81
3ef693a distribution patches
bellard authored
82 install: qemu
83 install -m 755 -s qemu $(prefix)/bin
612384d added libgemu.a build
bellard authored
84
367e86e new x86 CPU core
bellard authored
85 # various test targets
3ef693a distribution patches
bellard authored
86 test speed: qemu
367e86e new x86 CPU core
bellard authored
87 make -C tests $@
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
88
367e86e new x86 CPU core
bellard authored
89 TAGS:
90 etags *.[ch] i386/*.[ch]
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
91
3ef693a distribution patches
bellard authored
92 # documentation
93 qemu-doc.html: qemu-doc.texi
94 texi2html -monolithic -number $<
95
586314f better debug support
bellard authored
96 FILES= \
3ef693a distribution patches
bellard authored
97 README COPYING COPYING.LIB TODO Changelog VERSION \
98 dyngen.c ioctls.h ops_template.h syscall_types.h\
586314f better debug support
bellard authored
99 Makefile elf.h linux_bin.h segment.h thunk.c\
3ef693a distribution patches
bellard authored
100 elfload.c main.c signal.c thunk.h\
101 cpu-i386.h qemu.h op-i386.c opc-i386.h syscall-i386.h translate-i386.c\
586314f better debug support
bellard authored
102 dis-asm.h gen-i386.h op-i386.h syscall.c\
103 dis-buf.c i386-dis.c opreg_template.h syscall_defs.h\
3ef693a distribution patches
bellard authored
104 i386.ld ppc.ld exec-i386.h exec-i386.c configure \
77f8dd5 float fixes - added bsr/bsf support
bellard authored
105 tests/Makefile\
586314f better debug support
bellard authored
106 tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\
612384d added libgemu.a build
bellard authored
107 tests/test-i386-muldiv.h tests/test-i386-code16.S\
108 tests/hello.c tests/hello tests/sha1.c \
3ef693a distribution patches
bellard authored
109 tests/testsig.c tests/testclone.c tests/testthread.c \
110 qemu-doc.texi qemu-doc.html
586314f better debug support
bellard authored
111
3ef693a distribution patches
bellard authored
112 FILE=qemu-$(VERSION)
586314f better debug support
bellard authored
113
114 tar:
115 rm -rf /tmp/$(FILE)
116 mkdir -p /tmp/$(FILE)
117 cp -P $(FILES) /tmp/$(FILE)
118 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) )
119 rm -rf /tmp/$(FILE)
120
31e31b8 This commit was generated by cvs2svn to compensate for changes in r2,
bellard authored
121 ifneq ($(wildcard .depend),)
122 include .depend
123 endif
Something went wrong with that request. Please try again.