VM86 EIP masking fix (aka NT5 install fix) (Mike Nordell)
[qemu.git] / Makefile
blob15506a19c09efad5ea8158557902328b05450097
1 include config-host.mak
3 CFLAGS=-Wall -O2 -g
4 ifdef CONFIG_WIN32
5 CFLAGS+=-fpack-struct
6 endif
7 LDFLAGS=-g
8 LIBS=
9 DEFINES+=-D_GNU_SOURCE
10 ifndef CONFIG_WIN32
11 TOOLS=qemu-mkcow
12 endif
14 all: dyngen$(EXESUF) $(TOOLS) qemu-doc.html qemu-tech.html qemu.1
15 for d in $(TARGET_DIRS); do \
16 make -C $$d $@ || exit 1 ; \
17 done
19 qemu-mkcow: qemu-mkcow.c
20 $(CC) $(CFLAGS) $(DEFINES) -o $@ $^ $(LIBS)
22 dyngen$(EXESUF): dyngen.c
23 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
25 clean:
26 # avoid old build problems by removing potentially incorrect old files
27 rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
28 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS qemu.pod
29 make -C tests clean
30 for d in $(TARGET_DIRS); do \
31 make -C $$d $@ || exit 1 ; \
32 done
34 distclean: clean
35 rm -f config-host.mak config-host.h
36 for d in $(TARGET_DIRS); do \
37 rm -rf $$d || exit 1 ; \
38 done
40 install: all
41 mkdir -p "$(bindir)"
42 ifndef CONFIG_WIN32
43 install -m 755 -s $(TOOLS) "$(bindir)"
44 endif
45 mkdir -p "$(sharedir)"
46 install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
47 pc-bios/linux_boot.bin "$(sharedir)"
48 ifndef CONFIG_WIN32
49 mkdir -p "$(mandir)/man1"
50 install qemu.1 qemu-mkcow.1 "$(mandir)/man1"
51 endif
52 for d in $(TARGET_DIRS); do \
53 make -C $$d $@ || exit 1 ; \
54 done
56 # various test targets
57 test speed test2: all
58 make -C tests $@
60 TAGS:
61 etags *.[ch] tests/*.[ch]
63 # documentation
64 %.html: %.texi
65 texi2html -monolithic -number $<
67 qemu.1: qemu-doc.texi
68 ./texi2pod.pl $< qemu.pod
69 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
71 FILE=qemu-$(shell cat VERSION)
73 # tar release (use 'make -k tar' on a checkouted tree)
74 tar:
75 rm -rf /tmp/$(FILE)
76 cp -r . /tmp/$(FILE)
77 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
78 rm -rf /tmp/$(FILE)
80 # generate a binary distribution
81 tarbin:
82 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
83 $(prefix)/bin/qemu $(prefix)/bin/qemu-fast \
84 $(prefix)/bin/qemu-i386 \
85 $(prefix)/bin/qemu-arm \
86 $(prefix)/bin/qemu-sparc \
87 $(prefix)/bin/qemu-ppc \
88 $(sharedir)/bios.bin \
89 $(sharedir)/vgabios.bin \
90 $(mandir)/man1/qemu.1 )
92 ifneq ($(wildcard .depend),)
93 include .depend
94 endif