fpu init fix (Jocelyn Mayer)
[qemu/qemu_0_9_1_stable.git] / Makefile
blobbc978167ceb85e3f381b0570d1d98ce416cb9d77
1 -include config-host.mak
3 CFLAGS=-Wall -O2 -g -fno-strict-aliasing
4 ifdef CONFIG_DARWIN
5 CFLAGS+= -mdynamic-no-pic
6 endif
7 LDFLAGS=-g
8 LIBS=
9 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
10 TOOLS=qemu-img$(EXESUF)
11 ifdef CONFIG_STATIC
12 LDFLAGS+=-static
13 endif
14 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
16 all: dyngen$(EXESUF) $(TOOLS) $(DOCS)
17 for d in $(TARGET_DIRS); do \
18 $(MAKE) -C $$d $@ || exit 1 ; \
19 done
20 ifdef CONFIG_KQEMU
21 $(MAKE) -C kqemu
22 endif
24 qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c
25 $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
27 dyngen$(EXESUF): dyngen.c
28 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
30 clean:
31 # avoid old build problems by removing potentially incorrect old files
32 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
33 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
34 $(MAKE) -C tests clean
35 for d in $(TARGET_DIRS); do \
36 $(MAKE) -C $$d $@ || exit 1 ; \
37 done
38 ifdef CONFIG_KQEMU
39 $(MAKE) -C kqemu clean
40 endif
42 distclean: clean
43 rm -f config-host.mak config-host.h
44 for d in $(TARGET_DIRS); do \
45 rm -rf $$d || exit 1 ; \
46 done
48 KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
49 ar de en-us fi fr-be hr it lv nl pl ru th \
50 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
52 install: all
53 mkdir -p "$(bindir)"
54 install -m 755 -s $(TOOLS) "$(bindir)"
55 mkdir -p "$(datadir)"
56 install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
57 pc-bios/vgabios-cirrus.bin \
58 pc-bios/ppc_rom.bin \
59 pc-bios/proll.elf \
60 pc-bios/linux_boot.bin "$(datadir)"
61 mkdir -p "$(docdir)"
62 install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
63 ifndef CONFIG_WIN32
64 mkdir -p "$(mandir)/man1"
65 install qemu.1 qemu-img.1 "$(mandir)/man1"
66 mkdir -p "$(datadir)/keymaps"
67 install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(datadir)/keymaps"
68 endif
69 for d in $(TARGET_DIRS); do \
70 $(MAKE) -C $$d $@ || exit 1 ; \
71 done
72 ifdef CONFIG_KQEMU
73 cd kqemu ; ./install.sh
74 endif
76 # various test targets
77 test speed test2: all
78 $(MAKE) -C tests $@
80 TAGS:
81 etags *.[ch] tests/*.[ch]
83 # documentation
84 %.html: %.texi
85 texi2html -monolithic -number $<
87 qemu.1: qemu-doc.texi
88 ./texi2pod.pl $< qemu.pod
89 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
91 qemu-img.1: qemu-img.texi
92 ./texi2pod.pl $< qemu-img.pod
93 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
95 FILE=qemu-$(shell cat VERSION)
97 # tar release (use 'make -k tar' on a checkouted tree)
98 tar:
99 rm -rf /tmp/$(FILE)
100 cp -r . /tmp/$(FILE)
101 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
102 rm -rf /tmp/$(FILE)
104 # generate a binary distribution
105 tarbin:
106 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
107 $(bindir)/qemu $(bindir)/qemu-fast \
108 $(bindir)/qemu-system-ppc \
109 $(bindir)/qemu-system-sparc \
110 $(bindir)/qemu-i386 \
111 $(bindir)/qemu-arm \
112 $(bindir)/qemu-sparc \
113 $(bindir)/qemu-ppc \
114 $(bindir)/qemu-img \
115 $(datadir)/bios.bin \
116 $(datadir)/vgabios.bin \
117 $(datadir)/vgabios-cirrus.bin \
118 $(datadir)/ppc_rom.bin \
119 $(datadir)/proll.elf \
120 $(datadir)/linux_boot.bin \
121 $(docdir)/qemu-doc.html \
122 $(docdir)/qemu-tech.html \
123 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
125 ifneq ($(wildcard .depend),)
126 include .depend
127 endif