Statistics
| Branch: | Revision:

root / Makefile @ 0389ced4

History | View | Annotate | Download (11.5 kB)

1 0cb3fb1e pbrook
# Makefile for QEMU.
2 0cb3fb1e pbrook
3 df2943ba Michael S. Tsirkin
GENERATED_HEADERS = config-host.h trace.h qemu-options.def
4 f527c579 Juan Quintela
5 55d7e8f6 aurel32
ifneq ($(wildcard config-host.mak),)
6 1ad2134f Paul Brook
# Put the all: rule here so that config-host.mak can contain dependencies.
7 1ad2134f Paul Brook
all: build-all
8 ad064840 pbrook
include config-host.mak
9 17759187 aliguori
include $(SRC_PATH)/rules.mak
10 59bc10ee Paolo Bonzini
config-host.mak: $(SRC_PATH)/configure
11 e5efe7f5 Juan Quintela
	@echo $@ is out-of-date, running configure
12 e5efe7f5 Juan Quintela
	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
13 55d7e8f6 aurel32
else
14 55d7e8f6 aurel32
config-host.mak:
15 55d7e8f6 aurel32
	@echo "Please call configure before running make!"
16 55d7e8f6 aurel32
	@exit 1
17 55d7e8f6 aurel32
endif
18 766a487a bellard
19 d9ace8b3 Juan Quintela
# Don't try to regenerate Makefile or configure
20 d9ace8b3 Juan Quintela
# We don't generate any of them
21 d9ace8b3 Juan Quintela
Makefile: ;
22 d9ace8b3 Juan Quintela
configure: ;
23 d9ace8b3 Juan Quintela
24 818220f5 aliguori
.PHONY: all clean cscope distclean dvi html info install install-doc \
25 20cc9997 Stefan Weil
	pdf recurse-all speed tar tarbin test build-all
26 0cb3fb1e pbrook
27 076d2471 Paolo Bonzini
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
28 8c462f8f pbrook
29 3e2e0e6b Juan Quintela
LIBS+=-lz $(LIBS_TOOLS)
30 67c0f08d Juan Quintela
31 cc8ae6de pbrook
ifdef BUILD_DOCS
32 b40292e7 Jan Kiszka
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
33 cc8ae6de pbrook
else
34 cc8ae6de pbrook
DOCS=
35 cc8ae6de pbrook
endif
36 aa05ae6f bellard
37 1215c6e7 Juan Quintela
SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
38 1f3d3c8f Juan Quintela
SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
39 1f3d3c8f Juan Quintela
40 1f3d3c8f Juan Quintela
config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
41 01d86a85 Stefan Weil
	$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@,"  GEN   $@")
42 1f3d3c8f Juan Quintela
43 a992fe3d Paul Brook
%/config-devices.mak: default-configs/%.mak
44 a992fe3d Paul Brook
	$(call quiet-command,cat $< > $@.tmp, "  GEN   $@")
45 012f0879 Stefan Weil
	@if test -f $@; then \
46 904fe1fb Blue Swirl
	  if cmp -s $@.old $@; then \
47 904fe1fb Blue Swirl
	    if ! cmp -s $@ $@.tmp; then \
48 904fe1fb Blue Swirl
	      mv $@.tmp $@; \
49 904fe1fb Blue Swirl
	      cp -p $@ $@.old; \
50 904fe1fb Blue Swirl
	    fi; \
51 012f0879 Stefan Weil
	  else \
52 012f0879 Stefan Weil
	    if test -f $@.old; then \
53 012f0879 Stefan Weil
	      echo "WARNING: $@ (user modified) out of date.";\
54 012f0879 Stefan Weil
	    else \
55 012f0879 Stefan Weil
	      echo "WARNING: $@ out of date.";\
56 012f0879 Stefan Weil
	    fi; \
57 012f0879 Stefan Weil
	    echo "Run \"make defconfig\" to regenerate."; \
58 012f0879 Stefan Weil
	    rm $@.tmp; \
59 012f0879 Stefan Weil
	  fi; \
60 a992fe3d Paul Brook
	 else \
61 012f0879 Stefan Weil
	  mv $@.tmp $@; \
62 012f0879 Stefan Weil
	  cp -p $@ $@.old; \
63 a992fe3d Paul Brook
	 fi
64 a992fe3d Paul Brook
65 a992fe3d Paul Brook
defconfig:
66 a992fe3d Paul Brook
	rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
67 a992fe3d Paul Brook
68 1f3d3c8f Juan Quintela
-include config-all-devices.mak
69 1215c6e7 Juan Quintela
70 f527c579 Juan Quintela
build-all: $(DOCS) $(TOOLS) recurse-all
71 b9dea4fb pbrook
72 1215c6e7 Juan Quintela
config-host.h: config-host.h-timestamp
73 1215c6e7 Juan Quintela
config-host.h-timestamp: config-host.mak
74 e14056ad Blue Swirl
qemu-options.def: $(SRC_PATH)/qemu-options.hx
75 df2943ba Michael S. Tsirkin
	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
76 1215c6e7 Juan Quintela
77 cec7d0b6 pbrook
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
78 cec7d0b6 pbrook
79 f527c579 Juan Quintela
subdir-%: $(GENERATED_HEADERS)
80 0087375e Paul Brook
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
81 4aa42531 pbrook
82 b88bc808 Stefan Weil
ifneq ($(wildcard config-host.mak),)
83 0e8c9214 Andreas Färber
include $(SRC_PATH)/Makefile.objs
84 b88bc808 Stefan Weil
endif
85 0e8c9214 Andreas Färber
86 0e8c9214 Andreas Färber
$(common-obj-y): $(GENERATED_HEADERS)
87 91f16900 Andreas Färber
$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis
88 c05ac895 Paul Brook
89 91f16900 Andreas Färber
$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser
90 add16157 Blue Swirl
91 c05ac895 Paul Brook
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
92 c05ac895 Paul Brook
romsubdir-%:
93 c05ac895 Paul Brook
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
94 c05ac895 Paul Brook
95 c05ac895 Paul Brook
ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
96 c05ac895 Paul Brook
97 c05ac895 Paul Brook
recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
98 83f64091 bellard
99 98b068a9 Juan Quintela
audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
100 0e22fd2f Juan Quintela
101 a558ee17 Juan Quintela
QEMU_CFLAGS+=$(CURL_CFLAGS)
102 769ce76d Alexander Graf
103 3e230dd2 Corentin Chary
ui/cocoa.o: ui/cocoa.m
104 4fb240a4 bellard
105 3e230dd2 Corentin Chary
ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
106 0483755a aliguori
107 3e230dd2 Corentin Chary
ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
108 fb599c9a balrog
109 a558ee17 Juan Quintela
bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
110 4fb240a4 bellard
111 a82cdd58 Blue Swirl
trace.h: trace.h-timestamp
112 a82cdd58 Blue Swirl
trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
113 a82cdd58 Blue Swirl
	$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   trace.h")
114 a82cdd58 Blue Swirl
	@cmp -s $@ trace.h || cp $@ trace.h
115 a82cdd58 Blue Swirl
116 a82cdd58 Blue Swirl
trace.c: trace.c-timestamp
117 a82cdd58 Blue Swirl
trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
118 a82cdd58 Blue Swirl
	$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   trace.c")
119 a82cdd58 Blue Swirl
	@cmp -s $@ trace.c || cp $@ trace.c
120 94a420b1 Stefan Hajnoczi
121 94a420b1 Stefan Hajnoczi
trace.o: trace.c $(GENERATED_HEADERS)
122 94a420b1 Stefan Hajnoczi
123 26f7227b Stefan Hajnoczi
simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
124 26f7227b Stefan Hajnoczi
125 9fe6de94 Blue Swirl
version.o: $(SRC_PATH)/version.rc config-host.mak
126 9fe6de94 Blue Swirl
	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
127 9fe6de94 Blue Swirl
128 9fe6de94 Blue Swirl
version-obj-$(CONFIG_WIN32) += version.o
129 4fb240a4 bellard
######################################################################
130 4fb240a4 bellard
131 3c089e15 Juan Quintela
qemu-img.o: qemu-img-cmds.h
132 3c089e15 Juan Quintela
qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS)
133 153859be Stuart Brady
134 c1b0b93b Jes Sorensen
qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
135 0e8c9214 Andreas Färber
136 c1b0b93b Jes Sorensen
qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
137 0e8c9214 Andreas Färber
138 c1b0b93b Jes Sorensen
qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
139 0a8e1acd aliguori
140 153859be Stuart Brady
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
141 153859be Stuart Brady
	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
142 153859be Stuart Brady
143 4091da4b Jan Kiszka
check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o: $(GENERATED_HEADERS)
144 4091da4b Jan Kiszka
145 945d3e63 Jan Kiszka
check-qint: check-qint.o qint.o qemu-malloc.o $(trace-obj-y)
146 945d3e63 Jan Kiszka
check-qstring: check-qstring.o qstring.o qemu-malloc.o $(trace-obj-y)
147 945d3e63 Jan Kiszka
check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qemu-malloc.o qlist.o $(trace-obj-y)
148 945d3e63 Jan Kiszka
check-qlist: check-qlist.o qlist.o qint.o qemu-malloc.o $(trace-obj-y)
149 945d3e63 Jan Kiszka
check-qfloat: check-qfloat.o qfloat.o qemu-malloc.o $(trace-obj-y)
150 945d3e63 Jan Kiszka
check-qjson: check-qjson.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o qjson.o json-streamer.o json-lexer.o json-parser.o qemu-malloc.o $(trace-obj-y)
151 33837ba6 Luiz Capitulino
152 31e31b8a bellard
clean:
153 2d80ae89 bellard
# avoid old build problems by removing potentially incorrect old files
154 25be210f Juan Quintela
	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
155 df2943ba Michael S. Tsirkin
	rm -f qemu-options.def
156 86e840ee aurel32
	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
157 3e230dd2 Corentin Chary
	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d
158 07b44ce9 Blue Swirl
	rm -f qemu-img-cmds.h
159 d7489b72 Blue Swirl
	rm -f trace.c trace.h trace.c-timestamp trace.h-timestamp
160 7d3505c5 bellard
	$(MAKE) -C tests clean
161 4d904533 Blue Swirl
	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; do \
162 fc8e320e Magnus Damm
	if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
163 df2943ba Michael S. Tsirkin
	rm -f $$d/qemu-options.def; \
164 626df76a bellard
        done
165 31e31b8a bellard
166 7d13299d bellard
distclean: clean
167 fc8e320e Magnus Damm
	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
168 a992fe3d Paul Brook
	rm -f config-all-devices.mak
169 fc8e320e Magnus Damm
	rm -f roms/seabios/config.mak roms/vgabios/config.mak
170 e1a068b2 Hidetoshi Seto
	rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.dvi qemu-doc.fn qemu-doc.info qemu-doc.ky qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp qemu-doc.vr
171 e1a068b2 Hidetoshi Seto
	rm -f qemu-tech.info qemu-tech.aux qemu-tech.cp qemu-tech.dvi qemu-tech.fn qemu-tech.info qemu-tech.ky qemu-tech.log qemu-tech.pdf qemu-tech.pg qemu-tech.toc qemu-tech.tp qemu-tech.vr
172 4d904533 Blue Swirl
	for d in $(TARGET_DIRS) libhw32 libhw64 libuser libdis libdis-user; do \
173 bc1b050d bellard
	rm -rf $$d || exit 1 ; \
174 76bc6838 bellard
        done
175 7d13299d bellard
176 fed4a9ad bellard
KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
177 fed4a9ad bellard
ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
178 fed4a9ad bellard
common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
179 fed4a9ad bellard
180 77755340 ths
ifdef INSTALL_BLOBS
181 77755340 ths
BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
182 ae0bfb79 Blue Swirl
openbios-sparc32 openbios-sparc64 openbios-ppc \
183 5309e5fb Stefan Weil
gpxe-eepro100-80861209.rom \
184 5309e5fb Stefan Weil
pxe-e1000.bin \
185 88e2b0a5 Stefan Weil
pxe-ne2k_pci.bin pxe-pcnet.bin \
186 88e2b0a5 Stefan Weil
pxe-rtl8139.bin pxe-virtio.bin \
187 253d0942 Alexander Graf
bamboo.dtb petalogix-s3adsp1800.dtb \
188 fe270d04 Alexander Graf
multiboot.bin linuxboot.bin \
189 fe270d04 Alexander Graf
s390-zipl.rom
190 77755340 ths
else
191 77755340 ths
BLOBS=
192 77755340 ths
endif
193 77755340 ths
194 38954dca pbrook
install-doc: $(DOCS)
195 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
196 58f8aead aliguori
	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
197 96d409eb Juan Quintela
ifdef CONFIG_POSIX
198 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
199 58f8aead aliguori
	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
200 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
201 58f8aead aliguori
	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
202 38954dca pbrook
endif
203 38954dca pbrook
204 b5ec5ce0 john cooper
install-sysconfig:
205 990caaf1 Andre Przywara
	$(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"
206 990caaf1 Andre Przywara
	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
207 b5ec5ce0 john cooper
208 b5ec5ce0 john cooper
install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
209 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
210 932a79df ths
ifneq ($(TOOLS),)
211 58f8aead aliguori
	$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
212 932a79df ths
endif
213 77755340 ths
ifneq ($(BLOBS),)
214 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
215 77755340 ths
	set -e; for x in $(BLOBS); do \
216 58f8aead aliguori
		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
217 ad064840 pbrook
	done
218 77755340 ths
endif
219 58f8aead aliguori
	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
220 18be8d77 blueswir1
	set -e; for x in $(KEYMAPS); do \
221 79fd42aa Anthony Liguori
		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
222 ad064840 pbrook
	done
223 626df76a bellard
	for d in $(TARGET_DIRS); do \
224 7d3505c5 bellard
	$(MAKE) -C $$d $@ || exit 1 ; \
225 626df76a bellard
        done
226 612384d7 bellard
227 367e86e8 bellard
# various test targets
228 9b0b8203 bellard
test speed: all
229 7d3505c5 bellard
	$(MAKE) -C tests $@
230 31e31b8a bellard
231 21d4e8e3 Alexandre Bique
.PHONY: TAGS
232 5fafdf24 ths
TAGS:
233 21d4e8e3 Alexandre Bique
	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
234 31e31b8a bellard
235 6688bc6d bellard
cscope:
236 6688bc6d bellard
	rm -f ./cscope.*
237 ede46085 aurel32
	find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
238 6688bc6d bellard
	cscope -b
239 6688bc6d bellard
240 3ef693a0 bellard
# documentation
241 01668d98 Stefan Weil
MAKEINFO=makeinfo
242 01668d98 Stefan Weil
MAKEINFOFLAGS=--no-headers --no-split --number-sections
243 20cc9997 Stefan Weil
TEXIFLAG=$(if $(V),,--quiet)
244 20cc9997 Stefan Weil
%.dvi: %.texi
245 20cc9997 Stefan Weil
	$(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<,"  GEN   $@")
246 20cc9997 Stefan Weil
247 1f673135 bellard
%.html: %.texi
248 01668d98 Stefan Weil
	$(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \
249 01668d98 Stefan Weil
	"  GEN   $@")
250 3ef693a0 bellard
251 f3548328 bellard
%.info: %.texi
252 01668d98 Stefan Weil
	$(call quiet-command,$(MAKEINFO) $< -o $@,"  GEN   $@")
253 f3548328 bellard
254 20cc9997 Stefan Weil
%.pdf: %.texi
255 20cc9997 Stefan Weil
	$(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<,"  GEN   $@")
256 5824d651 blueswir1
257 5824d651 blueswir1
qemu-options.texi: $(SRC_PATH)/qemu-options.hx
258 0d00e563 aliguori
	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
259 f3548328 bellard
260 acd0a093 Luiz Capitulino
qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx
261 2313086a Blue Swirl
	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
262 2313086a Blue Swirl
263 82a56f0d Luiz Capitulino
QMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx
264 b40292e7 Jan Kiszka
	$(call quiet-command,sh $(SRC_PATH)/hxtool -q < $< > $@,"  GEN   $@")
265 b40292e7 Jan Kiszka
266 153859be Stuart Brady
qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
267 153859be Stuart Brady
	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
268 153859be Stuart Brady
269 2313086a Blue Swirl
qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
270 0d00e563 aliguori
	$(call quiet-command, \
271 0d00e563 aliguori
	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
272 0d00e563 aliguori
	  pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
273 0d00e563 aliguori
	  "  GEN   $@")
274 5a67135a bellard
275 153859be Stuart Brady
qemu-img.1: qemu-img.texi qemu-img-cmds.texi
276 0d00e563 aliguori
	$(call quiet-command, \
277 0d00e563 aliguori
	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
278 0d00e563 aliguori
	  pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
279 0d00e563 aliguori
	  "  GEN   $@")
280 acd935ef bellard
281 7a5ca864 bellard
qemu-nbd.8: qemu-nbd.texi
282 0d00e563 aliguori
	$(call quiet-command, \
283 0d00e563 aliguori
	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
284 0d00e563 aliguori
	  pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
285 0d00e563 aliguori
	  "  GEN   $@")
286 7a5ca864 bellard
287 0cb3fb1e pbrook
dvi: qemu-doc.dvi qemu-tech.dvi
288 0cb3fb1e pbrook
html: qemu-doc.html qemu-tech.html
289 20cc9997 Stefan Weil
info: qemu-doc.info qemu-tech.info
290 20cc9997 Stefan Weil
pdf: qemu-doc.pdf qemu-tech.pdf
291 0cb3fb1e pbrook
292 20cc9997 Stefan Weil
qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \
293 20cc9997 Stefan Weil
	qemu-img.texi qemu-nbd.texi qemu-options.texi \
294 20cc9997 Stefan Weil
	qemu-monitor.texi qemu-img-cmds.texi
295 818220f5 aliguori
296 df5cf721 ths
VERSION ?= $(shell cat VERSION)
297 df5cf721 ths
FILE = qemu-$(VERSION)
298 586314f2 bellard
299 1e43adfc bellard
# tar release (use 'make -k tar' on a checkouted tree)
300 586314f2 bellard
tar:
301 586314f2 bellard
	rm -rf /tmp/$(FILE)
302 1e43adfc bellard
	cp -r . /tmp/$(FILE)
303 99c6c082 aurel32
	cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
304 586314f2 bellard
	rm -rf /tmp/$(FILE)
305 586314f2 bellard
306 4c0a6db0 Stuart Brady
SYSTEM_TARGETS=$(filter %-softmmu,$(TARGET_DIRS))
307 4c0a6db0 Stuart Brady
SYSTEM_PROGS=$(patsubst qemu-system-i386,qemu, \
308 4c0a6db0 Stuart Brady
             $(patsubst %-softmmu,qemu-system-%, \
309 4c0a6db0 Stuart Brady
             $(SYSTEM_TARGETS)))
310 4c0a6db0 Stuart Brady
311 4c0a6db0 Stuart Brady
USER_TARGETS=$(filter %-user,$(TARGET_DIRS))
312 4c0a6db0 Stuart Brady
USER_PROGS=$(patsubst %-bsd-user,qemu-%, \
313 4c0a6db0 Stuart Brady
           $(patsubst %-darwin-user,qemu-%, \
314 4c0a6db0 Stuart Brady
           $(patsubst %-linux-user,qemu-%, \
315 4c0a6db0 Stuart Brady
           $(USER_TARGETS))))
316 4c0a6db0 Stuart Brady
317 76b62fd0 bellard
# generate a binary distribution
318 d691f669 bellard
tarbin:
319 18be8d77 blueswir1
	cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
320 4c0a6db0 Stuart Brady
	$(patsubst %,$(bindir)/%, $(SYSTEM_PROGS)) \
321 4c0a6db0 Stuart Brady
	$(patsubst %,$(bindir)/%, $(USER_PROGS)) \
322 40e8a53b aurel32
	$(bindir)/qemu-img \
323 40e8a53b aurel32
	$(bindir)/qemu-nbd \
324 7efa4387 bellard
	$(datadir)/bios.bin \
325 7efa4387 bellard
	$(datadir)/vgabios.bin \
326 de9258a8 bellard
	$(datadir)/vgabios-cirrus.bin \
327 637f6cd7 bellard
	$(datadir)/ppc_rom.bin \
328 0986ac3b bellard
	$(datadir)/openbios-sparc32 \
329 938255d2 blueswir1
	$(datadir)/openbios-sparc64 \
330 e5d01b06 aurel32
	$(datadir)/openbios-ppc \
331 40e8a53b aurel32
	$(datadir)/pxe-ne2k_pci.bin \
332 19c80e50 bellard
	$(datadir)/pxe-rtl8139.bin \
333 40e8a53b aurel32
	$(datadir)/pxe-pcnet.bin \
334 2991990b aliguori
	$(datadir)/pxe-e1000.bin \
335 1f50f8d1 bellard
	$(docdir)/qemu-doc.html \
336 1f50f8d1 bellard
	$(docdir)/qemu-tech.html \
337 40e8a53b aurel32
	$(mandir)/man1/qemu.1 \
338 40e8a53b aurel32
	$(mandir)/man1/qemu-img.1 \
339 7a5ca864 bellard
	$(mandir)/man8/qemu-nbd.8
340 d691f669 bellard
341 4fb240a4 bellard
# Include automatically generated dependency files
342 3e230dd2 Corentin Chary
-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d)