debuggers.hg

view tools/ioemu/Makefile @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
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 BASE_CFLAGS=
12 BASE_LDFLAGS=
14 BASE_CFLAGS += $(OS_CFLAGS)
15 ifeq ($(ARCH),sparc)
16 BASE_CFLAGS += -mcpu=ultrasparc
17 endif
18 CPPFLAGS += -I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
19 LIBS=
20 TOOLS=qemu-img$(EXESUF)
21 ifdef CONFIG_STATIC
22 BASE_LDFLAGS += -static
23 endif
24 ifdef BUILD_DOCS
25 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
26 else
27 DOCS=
28 endif
30 ifndef CONFIG_DARWIN
31 ifndef CONFIG_WIN32
32 ifndef CONFIG_SOLARIS
33 LIBS+=-lrt
34 endif
35 endif
36 endif
38 TOOLS=tapdisk-ioemu
40 all: $(TOOLS) $(DOCS) recurse-all
42 subdir-%:
43 $(MAKE) -C $(subst subdir-,,$@) all
45 recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
47 tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
48 tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
49 tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
50 tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include
51 tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.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 block-qcow2.c hw/xen_blktap.c osdep.c
52 $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS)
54 qemu-img$(EXESUF): qemu-img.c cutils.c block.c block-raw.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 block-qcow2.c
55 $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS)
57 dyngen$(EXESUF): dyngen.c
58 $(HOST_CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -o $@ $^
60 clean:
61 # avoid old build problems by removing potentially incorrect old files
62 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
63 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
64 $(MAKE) -C tests clean
65 for d in $(TARGET_DIRS); do \
66 [ -d $$d ] && $(MAKE) -C $$d $@ || exit 0 ; \
67 done
69 distclean: clean
70 rm -f config-host.mak config-host.h $(DOCS)
71 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
72 for d in $(TARGET_DIRS); do \
73 rm -rf $$d || exit 1 ; \
74 done
76 KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
77 ar de en-us fi fr-be hr it lv nl pl ru th \
78 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
80 install-doc: $(DOCS)
81 mkdir -p "$(DESTDIR)$(docdir)"
82 $(INSTALL_DATA) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
83 ifndef CONFIG_WIN32
84 mkdir -p "$(DESTDIR)$(mandir)/man1"
85 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
86 endif
88 install: all $(if $(BUILD_DOCS),install-doc)
89 mkdir -p "$(DESTDIR)$(bindir)"
90 $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(SBINDIR)"
91 # mkdir -p "$(DESTDIR)$(datadir)"
92 # for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
93 # video.x openbios-sparc32 linux_boot.bin pxe-ne2k_pci.bin \
94 # pxe-rtl8139.bin pxe-pcnet.bin; do \
95 # $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
96 # done
97 ifndef CONFIG_WIN32
98 mkdir -p "$(DESTDIR)$(datadir)/keymaps"
99 set -e; for x in $(KEYMAPS); do \
100 $(INSTALL_DATA) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
101 done
102 endif
103 for d in $(TARGET_DIRS); do \
104 $(MAKE) -C $$d $@ || exit 1 ; \
105 done
107 # various test targets
108 test speed test2: all
109 $(MAKE) -C tests $@
111 TAGS:
112 etags *.[ch] target-i386-dm/*.[ch] hw/*.[ch]
114 cscope:
115 rm -f ./cscope.*
116 find . -name "*.[ch]" -print > ./cscope.files
117 cscope -b
119 # documentation
120 %.html: %.texi
121 texi2html -monolithic -number $<
123 %.info: %.texi
124 makeinfo $< -o $@
126 %.dvi: %.texi
127 texi2dvi $<
129 qemu.1: qemu-doc.texi
130 perl -w $(SRC_PATH)/texi2pod.pl $< qemu.pod
131 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
133 qemu-img.1: qemu-img.texi
134 perl -w $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
135 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
137 info: qemu-doc.info qemu-tech.info
139 dvi: qemu-doc.dvi qemu-tech.dvi
141 html: qemu-doc.html qemu-tech.html
143 VERSION ?= $(shell cat VERSION)
144 FILE = qemu-$(VERSION)
146 # tar release (use 'make -k tar' on a checkouted tree)
147 tar:
148 rm -rf /tmp/$(FILE)
149 cp -r . /tmp/$(FILE)
150 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS
151 rm -rf /tmp/$(FILE)
153 # generate a binary distribution
154 tarbin:
155 cd / && tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
156 $(bindir)/qemu \
157 $(bindir)/qemu-system-ppc \
158 $(bindir)/qemu-system-sparc \
159 $(bindir)/qemu-system-x86_64 \
160 $(bindir)/qemu-system-mips \
161 $(bindir)/qemu-system-mipsel \
162 $(bindir)/qemu-system-arm \
163 $(bindir)/qemu-i386 \
164 $(bindir)/qemu-arm \
165 $(bindir)/qemu-armeb \
166 $(bindir)/qemu-sparc \
167 $(bindir)/qemu-ppc \
168 $(bindir)/qemu-mips \
169 $(bindir)/qemu-mipsel \
170 $(bindir)/qemu-img \
171 $(datadir)/bios.bin \
172 $(datadir)/vgabios.bin \
173 $(datadir)/vgabios-cirrus.bin \
174 $(datadir)/ppc_rom.bin \
175 $(datadir)/video.x \
176 $(datadir)/openbios-sparc32 \
177 $(datadir)/linux_boot.bin \
178 $(datadir)/pxe-ne2k_pci.bin \
179 $(datadir)/pxe-rtl8139.bin \
180 $(datadir)/pxe-pcnet.bin \
181 $(docdir)/qemu-doc.html \
182 $(docdir)/qemu-tech.html \
183 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1
185 ifneq ($(wildcard .depend),)
186 include .depend
187 endif