direct-io.hg

view tools/ioemu/Makefile @ 11268:350a73222a51

[qemu] Add target-i386-dm and hw *.[ch] files to TAGS.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author Christian Limpach <Christian.Limpach@xensource.com>
date Mon Aug 28 20:21:38 2006 +0100 (2006-08-28)
parents 08a11694b109
children 9be942ec0247
line source
1 # Makefile for QEMU.
3 XEN_ROOT=../..
4 include $(XEN_ROOT)/tools/Rules.mk
6 -include config-host.mak
8 .PHONY: all clean distclean dvi info install install-doc tar tarbin \
9 speed test test2 html dvi info
11 CFLAGS+=-Wall -O2 -g -fno-strict-aliasing -I.
12 ifdef CONFIG_DARWIN
13 CFLAGS+= -mdynamic-no-pic
14 endif
15 ifeq ($(ARCH),sparc)
16 CFLAGS+=-mcpu=ultrasparc
17 endif
18 LDFLAGS=-g
19 LIBS=
20 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
21 TOOLS=qemu-img$(EXESUF)
22 ifdef CONFIG_STATIC
23 LDFLAGS+=-static
24 endif
25 ifdef BUILD_DOCS
26 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
27 else
28 DOCS=
29 endif
31 TOOLS=
33 all: $(TOOLS) $(DOCS) recurse-all
35 subdir-%:
36 $(MAKE) -C $(subst subdir-,,$@) all
38 recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
40 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 block-bochs.c block-vpc.c block-vvfat.c
41 $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
43 dyngen$(EXESUF): dyngen.c
44 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
46 clean:
47 # avoid old build problems by removing potentially incorrect old files
48 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
49 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
50 $(MAKE) -C tests clean
51 for d in $(TARGET_DIRS); do \
52 [ -d $$d ] && $(MAKE) -C $$d $@ || exit 0 ; \
53 done
55 distclean: clean
56 rm -f config-host.mak config-host.h $(DOCS)
57 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
58 for d in $(TARGET_DIRS); do \
59 rm -rf $$d || exit 1 ; \
60 done
62 KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
63 ar de en-us fi fr-be hr it lv nl pl ru th \
64 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
66 install-doc: $(DOCS)
67 mkdir -p "$(DESTDIR)$(docdir)"
68 $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
69 ifndef CONFIG_WIN32
70 mkdir -p "$(DESTDIR)$(mandir)/man1"
71 $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
72 endif
74 install: all $(if $(BUILD_DOCS),install-doc)
75 mkdir -p "$(DESTDIR)$(bindir)"
76 # $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
77 # mkdir -p "$(DESTDIR)$(datadir)"
78 # for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
79 # video.x openbios-sparc32 linux_boot.bin; do \
80 # $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
81 # done
82 ifndef CONFIG_WIN32
83 mkdir -p "$(DESTDIR)$(datadir)/keymaps"
84 for x in $(KEYMAPS); do \
85 $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
86 done
87 endif
88 for d in $(TARGET_DIRS); do \
89 $(MAKE) -C $$d $@ || exit 1 ; \
90 done
92 # various test targets
93 test speed test2: all
94 $(MAKE) -C tests $@
96 TAGS:
97 etags *.[ch] target-i386-dm/*.[ch] hw/*.[ch]
99 cscope:
100 rm -f ./cscope.*
101 find . -name "*.[ch]" -print > ./cscope.files
102 cscope -b
104 # documentation
105 %.html: %.texi
106 texi2html -monolithic -number $<
108 %.info: %.texi
109 makeinfo $< -o $@
111 %.dvi: %.texi
112 texi2dvi $<
114 qemu.1: qemu-doc.texi
115 perl -w $(SRC_PATH)/texi2pod.pl $< qemu.pod
116 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
118 qemu-img.1: qemu-img.texi
119 perl -w $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
120 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
122 info: qemu-doc.info qemu-tech.info
124 dvi: qemu-doc.dvi qemu-tech.dvi
126 html: qemu-doc.html qemu-tech.html
128 FILE=qemu-$(shell cat VERSION)
130 # tar release (use 'make -k tar' on a checkouted tree)
131 tar:
132 rm -rf /tmp/$(FILE)
133 cp -r . /tmp/$(FILE)
134 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
135 rm -rf /tmp/$(FILE)
137 # generate a binary distribution
138 tarbin:
139 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
140 $(bindir)/qemu \
141 $(bindir)/qemu-system-ppc \
142 $(bindir)/qemu-system-sparc \
143 $(bindir)/qemu-system-x86_64 \
144 $(bindir)/qemu-system-mips \
145 $(bindir)/qemu-system-mipsel \
146 $(bindir)/qemu-system-arm \
147 $(bindir)/qemu-i386 \
148 $(bindir)/qemu-arm \
149 $(bindir)/qemu-armeb \
150 $(bindir)/qemu-sparc \
151 $(bindir)/qemu-ppc \
152 $(bindir)/qemu-mips \
153 $(bindir)/qemu-mipsel \
154 $(bindir)/qemu-img \
155 $(datadir)/bios.bin \
156 $(datadir)/vgabios.bin \
157 $(datadir)/vgabios-cirrus.bin \
158 $(datadir)/ppc_rom.bin \
159 $(datadir)/video.x \
160 $(datadir)/openbios-sparc32 \
161 $(datadir)/linux_boot.bin \
162 $(docdir)/qemu-doc.html \
163 $(docdir)/qemu-tech.html \
164 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
166 ifneq ($(wildcard .depend),)
167 include .depend
168 endif