6 DEFINES=-DHAVE_BYTESWAP_H
9 CFLAGS+=-fomit-frame-pointer
10 OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
12 OP_CFLAGS+= -falign-functions=0
14 OP_CFLAGS+= -malign-functions=0
23 # very important to generate a return at the end of every operation
24 OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
27 #########################################################
29 DEFINES+=-D_GNU_SOURCE
39 OBJS= elfload.o main.o syscall.o signal.o
43 LIBOBJS+=thunk.o translate-i386.o op-i386.o exec-i386.o
44 # NOTE: the disassembler code is only needed for debugging
45 LIBOBJS+=i386-dis.o dis-buf.o
47 all: qemu qemu-doc.html
50 $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
53 $(CC) -MM $(CFLAGS) $^ 1>.depend
59 $(AR) rcs $@ $(LIBOBJS)
62 $(HOST_CC) -O2 -Wall -g $< -o $@
64 translate-i386.o: translate-i386.c op-i386.h cpu-i386.h
66 op-i386.h: op-i386.o dyngen
69 op-i386.o: op-i386.c opreg_template.h ops_template.h
70 $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $<
73 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
76 $(MAKE) -C tests clean
77 rm -f *.o *.a *~ qemu dyngen TAGS
80 rm -f config.mak config.h
83 install -m 755 -s qemu $(prefix)/bin
85 # various test targets
90 etags *.[ch] i386/*.[ch]
93 qemu-doc.html: qemu-doc.texi
94 texi2html -monolithic -number $<
97 README COPYING COPYING.LIB TODO Changelog VERSION \
98 dyngen.c ioctls.h ops_template.h syscall_types.h\
99 Makefile elf.h linux_bin.h segment.h thunk.c\
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\
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\
104 i386.ld ppc.ld exec-i386.h exec-i386.c configure \
106 tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\
107 tests/test-i386-muldiv.h tests/test-i386-code16.S\
108 tests/hello.c tests/hello tests/sha1.c \
109 tests/testsig.c tests/testclone.c tests/testthread.c \
110 qemu-doc.texi qemu-doc.html
116 mkdir -p /tmp/$(FILE)
117 cp -P $(FILES) /tmp/$(FILE)
118 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) )
121 # generate a binary distribution including the test binary environnment
122 BINPATH=/usr/local/qemu-i386
125 tar zcvf /tmp/qemu-i386-glibc21.tar.gz \
126 $(BINPATH)/etc $(BINPATH)/lib $(BINPATH)/bin
127 tar zcvf /tmp/qemu-i386-wine.tar.gz \
128 $(BINPATH)/X11R6 $(BINPATH)/wine
130 ifneq ($(wildcard .depend),)