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