5 |
LIBS= |
LIBS= |
6 |
DEFINES=-DHAVE_BYTESWAP_H |
DEFINES=-DHAVE_BYTESWAP_H |
7 |
HELPER_CFLAGS=$(CFLAGS) |
HELPER_CFLAGS=$(CFLAGS) |
8 |
|
PROGS=qemu |
9 |
|
|
10 |
ifdef CONFIG_STATIC |
ifdef CONFIG_STATIC |
11 |
LDFLAGS+=-static |
LDFLAGS+=-static |
14 |
ifeq ($(ARCH),i386) |
ifeq ($(ARCH),i386) |
15 |
CFLAGS+=-fomit-frame-pointer |
CFLAGS+=-fomit-frame-pointer |
16 |
OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 |
OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 |
17 |
ifeq ($(GCC_MAJOR),3) |
ifeq ($(HAVE_GCC3_OPTIONS),yes) |
18 |
OP_CFLAGS+= -falign-functions=0 |
OP_CFLAGS+= -falign-functions=0 |
19 |
else |
else |
20 |
OP_CFLAGS+= -malign-functions=0 |
OP_CFLAGS+= -malign-functions=0 |
27 |
# is the simplest way to make it self virtualizable! |
# is the simplest way to make it self virtualizable! |
28 |
LDFLAGS+=-Wl,-shared |
LDFLAGS+=-Wl,-shared |
29 |
endif |
endif |
30 |
|
ifeq ($(TARGET_ARCH), i386) |
31 |
|
PROGS+=vl |
32 |
|
endif |
33 |
endif |
endif |
34 |
|
|
35 |
ifeq ($(ARCH),ppc) |
ifeq ($(ARCH),ppc) |
74 |
LDFLAGS+=-Wl,-T,arm.ld |
LDFLAGS+=-Wl,-T,arm.ld |
75 |
endif |
endif |
76 |
|
|
77 |
ifeq ($(GCC_MAJOR),3) |
ifeq ($(HAVE_GCC3_OPTIONS),yes) |
78 |
# very important to generate a return at the end of every operation |
# very important to generate a return at the end of every operation |
79 |
OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls |
OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls |
80 |
endif |
endif |
129 |
OBJS += ia64-syscall.o |
OBJS += ia64-syscall.o |
130 |
endif |
endif |
131 |
|
|
132 |
all: qemu qemu-doc.html |
all: $(PROGS) qemu-doc.html |
133 |
|
|
134 |
qemu: $(OBJS) |
qemu: $(OBJS) |
135 |
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
188 |
distclean: clean |
distclean: clean |
189 |
rm -f config.mak config.h |
rm -f config.mak config.h |
190 |
|
|
191 |
install: qemu |
install: $(PROGS) |
192 |
install -m 755 -s qemu $(prefix)/bin |
install -m 755 -s $(PROGS) $(prefix)/bin |
193 |
|
|
194 |
# various test targets |
# various test targets |
195 |
test speed: qemu |
test speed: qemu |
208 |
dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \ |
dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \ |
209 |
Makefile elf.h elfload.c main.c signal.c qemu.h \ |
Makefile elf.h elfload.c main.c signal.c qemu.h \ |
210 |
syscall.c syscall_defs.h vm86.c path.c mmap.c \ |
syscall.c syscall_defs.h vm86.c path.c mmap.c \ |
211 |
ppc.ld alpha.ld s390.ld sparc.ld arm.ld\ |
i386.ld ppc.ld alpha.ld s390.ld sparc.ld arm.ld\ |
212 |
|
vl.c i386-vl.ld\ |
213 |
thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\ |
thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\ |
214 |
exec.c cpu-exec.c\ |
exec.c cpu-exec.c\ |
215 |
cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \ |
cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \ |