Statistics
| Branch: | Revision:

root / Makefile @ e71e00ed

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