xref: /openbmc/qemu/Makefile (revision 904fe1fb)
10cb3fb1eSpbrook# Makefile for QEMU.
20cb3fb1eSpbrook
394a420b1SStefan HajnocziGENERATED_HEADERS = config-host.h trace.h
4f527c579SJuan Quintela
555d7e8f6Saurel32ifneq ($(wildcard config-host.mak),)
61ad2134fSPaul Brook# Put the all: rule here so that config-host.mak can contain dependencies.
71ad2134fSPaul Brookall: build-all
8ad064840Spbrookinclude config-host.mak
917759187Saliguoriinclude $(SRC_PATH)/rules.mak
1059bc10eeSPaolo Bonziniconfig-host.mak: $(SRC_PATH)/configure
11e5efe7f5SJuan Quintela	@echo $@ is out-of-date, running configure
12e5efe7f5SJuan Quintela	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
1355d7e8f6Saurel32else
1455d7e8f6Saurel32config-host.mak:
1555d7e8f6Saurel32	@echo "Please call configure before running make!"
1655d7e8f6Saurel32	@exit 1
1755d7e8f6Saurel32endif
18766a487aSbellard
19d9ace8b3SJuan Quintela# Don't try to regenerate Makefile or configure
20d9ace8b3SJuan Quintela# We don't generate any of them
21d9ace8b3SJuan QuintelaMakefile: ;
22d9ace8b3SJuan Quintelaconfigure: ;
23d9ace8b3SJuan Quintela
24818220f5Saliguori.PHONY: all clean cscope distclean dvi html info install install-doc \
2520cc9997SStefan Weil	pdf recurse-all speed tar tarbin test build-all
260cb3fb1eSpbrook
27076d2471SPaolo Bonzini$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
288c462f8fSpbrook
293e2e0e6bSJuan QuintelaLIBS+=-lz $(LIBS_TOOLS)
3067c0f08dSJuan Quintela
31cc8ae6deSpbrookifdef BUILD_DOCS
32b40292e7SJan KiszkaDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
33cc8ae6deSpbrookelse
34cc8ae6deSpbrookDOCS=
35cc8ae6deSpbrookendif
367d13299dSbellard
371215c6e7SJuan QuintelaSUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
381f3d3c8fSJuan QuintelaSUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
391f3d3c8fSJuan Quintela
401f3d3c8fSJuan Quintelaconfig-all-devices.mak: $(SUBDIR_DEVICES_MAK)
4101d86a85SStefan Weil	$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@,"  GEN   $@")
421f3d3c8fSJuan Quintela
43a992fe3dSPaul Brook%/config-devices.mak: default-configs/%.mak
44a992fe3dSPaul Brook	$(call quiet-command,cat $< > $@.tmp, "  GEN   $@")
45a992fe3dSPaul Brook	@if test -f $@; then \
46*904fe1fbSBlue Swirl	  if cmp -s $@.old $@; then \
47*904fe1fbSBlue Swirl	    if ! cmp -s $@ $@.tmp; then \
48012f0879SStefan Weil	      mv $@.tmp $@; \
49012f0879SStefan Weil	      cp -p $@ $@.old; \
50*904fe1fbSBlue Swirl	    fi; \
51012f0879SStefan Weil	  else \
52012f0879SStefan Weil	    if test -f $@.old; then \
53012f0879SStefan Weil	      echo "WARNING: $@ (user modified) out of date.";\
54012f0879SStefan Weil	    else \
55a992fe3dSPaul Brook	      echo "WARNING: $@ out of date.";\
56012f0879SStefan Weil	    fi; \
5763e86b2eSStefan Weil	    echo "Run \"make defconfig\" to regenerate."; \
58a992fe3dSPaul Brook	    rm $@.tmp; \
59012f0879SStefan Weil	  fi; \
60a992fe3dSPaul Brook	 else \
61a992fe3dSPaul Brook	  mv $@.tmp $@; \
62012f0879SStefan Weil	  cp -p $@ $@.old; \
63a992fe3dSPaul Brook	 fi
64a992fe3dSPaul Brook
65a992fe3dSPaul Brookdefconfig:
66a992fe3dSPaul Brook	rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
67a992fe3dSPaul Brook
681f3d3c8fSJuan Quintela-include config-all-devices.mak
691215c6e7SJuan Quintela
70f527c579SJuan Quintelabuild-all: $(DOCS) $(TOOLS) recurse-all
71b9dea4fbSpbrook
721215c6e7SJuan Quintelaconfig-host.h: config-host.h-timestamp
731215c6e7SJuan Quintelaconfig-host.h-timestamp: config-host.mak
741215c6e7SJuan Quintela
75cec7d0b6SpbrookSUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
76cec7d0b6Spbrook
77f527c579SJuan Quintelasubdir-%: $(GENERATED_HEADERS)
780087375eSPaul Brook	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
794aa42531Spbrook
80b88bc808SStefan Weilifneq ($(wildcard config-host.mak),)
810e8c9214SAndreas Färberinclude $(SRC_PATH)/Makefile.objs
82b88bc808SStefan Weilendif
830e8c9214SAndreas Färber
840e8c9214SAndreas Färber$(common-obj-y): $(GENERATED_HEADERS)
8591f16900SAndreas Färber$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis
86c05ac895SPaul Brook
8791f16900SAndreas Färber$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser
88add16157SBlue Swirl
89c05ac895SPaul BrookROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
90c05ac895SPaul Brookromsubdir-%:
91c05ac895SPaul Brook	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
92c05ac895SPaul Brook
93c05ac895SPaul BrookALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
94c05ac895SPaul Brook
95c05ac895SPaul Brookrecurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
964aa42531Spbrook
9798b068a9SJuan Quintelaaudio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
980e22fd2fSJuan Quintela
99a558ee17SJuan QuintelaQEMU_CFLAGS+=$(CURL_CFLAGS)
100769ce76dSAlexander Graf
1013e230dd2SCorentin Charyui/cocoa.o: ui/cocoa.m
1024fb240a4Sbellard
1033e230dd2SCorentin Charyui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
1040483755aSaliguori
1053e230dd2SCorentin Charyui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
1064d3b6f6eSbalrog
107a558ee17SJuan Quintelabt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
1084fb240a4Sbellard
10994a420b1SStefan Hajnoczitrace.h: $(SRC_PATH)/trace-events config-host.mak
11094a420b1SStefan Hajnoczi	$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   $@")
11194a420b1SStefan Hajnoczi
11294a420b1SStefan Hajnoczitrace.c: $(SRC_PATH)/trace-events config-host.mak
11394a420b1SStefan Hajnoczi	$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   $@")
11494a420b1SStefan Hajnoczi
11594a420b1SStefan Hajnoczitrace.o: trace.c $(GENERATED_HEADERS)
11694a420b1SStefan Hajnoczi
11726f7227bSStefan Hajnoczisimpletrace.o: simpletrace.c $(GENERATED_HEADERS)
11826f7227bSStefan Hajnoczi
1199fe6de94SBlue Swirlversion.o: $(SRC_PATH)/version.rc config-host.mak
1209fe6de94SBlue Swirl	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
1219fe6de94SBlue Swirl
1229fe6de94SBlue Swirlversion-obj-$(CONFIG_WIN32) += version.o
1234fb240a4Sbellard######################################################################
1244fb240a4Sbellard
1253c089e15SJuan Quintelaqemu-img.o: qemu-img-cmds.h
1263c089e15SJuan Quintelaqemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS)
127153859beSStuart Brady
1289fe6de94SBlue Swirlqemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y)
1294fb240a4Sbellard
1309fe6de94SBlue Swirlqemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y)
1313aa892d7Saliguori
1329fe6de94SBlue Swirlqemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y)
1330a8e1acdSaliguori
134153859beSStuart Bradyqemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
135153859beSStuart Brady	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
136153859beSStuart Brady
1374091da4bSJan Kiszkacheck-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o: $(GENERATED_HEADERS)
1384091da4bSJan Kiszka
13933837ba6SLuiz Capitulinocheck-qint: check-qint.o qint.o qemu-malloc.o
1405de65a07SLuiz Capitulinocheck-qstring: check-qstring.o qstring.o qemu-malloc.o
141acc3b033SMarkus Armbrustercheck-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qemu-malloc.o qlist.o
1423aa3dcffSLuiz Capitulinocheck-qlist: check-qlist.o qlist.o qint.o qemu-malloc.o
1439c9efb6bSAnthony Liguoricheck-qfloat: check-qfloat.o qfloat.o qemu-malloc.o
144422c46a8SAnthony Liguoricheck-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
14533837ba6SLuiz Capitulino
14631e31b8aSbellardclean:
1472d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files
14825be210fSJuan 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
14986e840eeSaurel32	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
1503e230dd2SCorentin 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
15107b44ce9SBlue Swirl	rm -f qemu-img-cmds.h
15294a420b1SStefan Hajnoczi	rm -f trace.c trace.h
1537d3505c5Sbellard	$(MAKE) -C tests clean
1544d904533SBlue Swirl	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; do \
155fc8e320eSMagnus Damm	if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
156626df76aSbellard        done
15731e31b8aSbellard
1587d13299dSbellarddistclean: clean
159fc8e320eSMagnus Damm	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
160d6f3a845SHidetoshi Seto	rm -f qemu-options.def
161a992fe3dSPaul Brook	rm -f config-all-devices.mak
162fc8e320eSMagnus Damm	rm -f roms/seabios/config.mak roms/vgabios/config.mak
163e1a068b2SHidetoshi 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
164e1a068b2SHidetoshi 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
1654d904533SBlue Swirl	for d in $(TARGET_DIRS) libhw32 libhw64 libuser libdis libdis-user; do \
166bc1b050dSbellard	rm -rf $$d || exit 1 ; \
16776bc6838Sbellard        done
1687d13299dSbellard
169fed4a9adSbellardKEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
170fed4a9adSbellardar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
171fed4a9adSbellardcommon  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
172fed4a9adSbellard
17377755340Sthsifdef INSTALL_BLOBS
17477755340SthsBLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
175e5d01b06Saurel32video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
1765309e5fbSStefan Weilgpxe-eepro100-80861209.rom \
1775309e5fbSStefan Weilgpxe-eepro100-80861229.rom \
1785309e5fbSStefan Weilpxe-e1000.bin \
17988e2b0a5SStefan Weilpxe-ne2k_pci.bin pxe-pcnet.bin \
18088e2b0a5SStefan Weilpxe-rtl8139.bin pxe-virtio.bin \
181253d0942SAlexander Grafbamboo.dtb petalogix-s3adsp1800.dtb \
182fe270d04SAlexander Grafmultiboot.bin linuxboot.bin \
183fe270d04SAlexander Grafs390-zipl.rom
18477755340Sthselse
18577755340SthsBLOBS=
18677755340Sthsendif
18777755340Sths
18838954dcaSpbrookinstall-doc: $(DOCS)
18958f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
19058f8aeadSaliguori	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
19196d409ebSJuan Quintelaifdef CONFIG_POSIX
19258f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
19358f8aeadSaliguori	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
19458f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
19558f8aeadSaliguori	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
19638954dcaSpbrookendif
19738954dcaSpbrook
198b5ec5ce0Sjohn cooperinstall-sysconfig:
199990caaf1SAndre Przywara	$(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"
200990caaf1SAndre Przywara	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
201b5ec5ce0Sjohn cooper
202b5ec5ce0Sjohn cooperinstall: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
20358f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
204932a79dfSthsifneq ($(TOOLS),)
20558f8aeadSaliguori	$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
206932a79dfSthsendif
20777755340Sthsifneq ($(BLOBS),)
20858f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
20977755340Sths	set -e; for x in $(BLOBS); do \
21058f8aeadSaliguori		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
211ad064840Spbrook	done
21277755340Sthsendif
21358f8aeadSaliguori	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
21418be8d77Sblueswir1	set -e; for x in $(KEYMAPS); do \
21579fd42aaSAnthony Liguori		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
216ad064840Spbrook	done
217626df76aSbellard	for d in $(TARGET_DIRS); do \
2187d3505c5Sbellard	$(MAKE) -C $$d $@ || exit 1 ; \
219626df76aSbellard        done
220612384d7Sbellard
221367e86e8Sbellard# various test targets
2229b0b8203Sbellardtest speed: all
2237d3505c5Sbellard	$(MAKE) -C tests $@
22431e31b8aSbellard
22521d4e8e3SAlexandre Bique.PHONY: TAGS
226367e86e8SbellardTAGS:
22721d4e8e3SAlexandre Bique	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
22831e31b8aSbellard
2296688bc6dSbellardcscope:
2306688bc6dSbellard	rm -f ./cscope.*
231ede46085Saurel32	find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
2326688bc6dSbellard	cscope -b
2336688bc6dSbellard
2343ef693a0Sbellard# documentation
23501668d98SStefan WeilMAKEINFO=makeinfo
23601668d98SStefan WeilMAKEINFOFLAGS=--no-headers --no-split --number-sections
23720cc9997SStefan WeilTEXIFLAG=$(if $(V),,--quiet)
23820cc9997SStefan Weil%.dvi: %.texi
23920cc9997SStefan Weil	$(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<,"  GEN   $@")
24020cc9997SStefan Weil
2411f673135Sbellard%.html: %.texi
24201668d98SStefan Weil	$(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \
24301668d98SStefan Weil	"  GEN   $@")
2443ef693a0Sbellard
245f3548328Sbellard%.info: %.texi
24601668d98SStefan Weil	$(call quiet-command,$(MAKEINFO) $< -o $@,"  GEN   $@")
247f3548328Sbellard
24820cc9997SStefan Weil%.pdf: %.texi
24920cc9997SStefan Weil	$(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<,"  GEN   $@")
2505824d651Sblueswir1
2515824d651Sblueswir1qemu-options.texi: $(SRC_PATH)/qemu-options.hx
2520d00e563Saliguori	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
253f3548328Sbellard
2542313086aSBlue Swirlqemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
2552313086aSBlue Swirl	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
2562313086aSBlue Swirl
257b40292e7SJan KiszkaQMP/qmp-commands.txt: $(SRC_PATH)/qemu-monitor.hx
258b40292e7SJan Kiszka	$(call quiet-command,sh $(SRC_PATH)/hxtool -q < $< > $@,"  GEN   $@")
259b40292e7SJan Kiszka
260153859beSStuart Bradyqemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
261153859beSStuart Brady	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
262153859beSStuart Brady
2632313086aSBlue Swirlqemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
2640d00e563Saliguori	$(call quiet-command, \
2650d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
2660d00e563Saliguori	  pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
2670d00e563Saliguori	  "  GEN   $@")
2685a67135aSbellard
269153859beSStuart Bradyqemu-img.1: qemu-img.texi qemu-img-cmds.texi
2700d00e563Saliguori	$(call quiet-command, \
2710d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
2720d00e563Saliguori	  pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
2730d00e563Saliguori	  "  GEN   $@")
274acd935efSbellard
2757a5ca864Sbellardqemu-nbd.8: qemu-nbd.texi
2760d00e563Saliguori	$(call quiet-command, \
2770d00e563Saliguori	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
2780d00e563Saliguori	  pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
2790d00e563Saliguori	  "  GEN   $@")
2807a5ca864Sbellard
2810cb3fb1eSpbrookdvi: qemu-doc.dvi qemu-tech.dvi
2820cb3fb1eSpbrookhtml: qemu-doc.html qemu-tech.html
28320cc9997SStefan Weilinfo: qemu-doc.info qemu-tech.info
28420cc9997SStefan Weilpdf: qemu-doc.pdf qemu-tech.pdf
2850cb3fb1eSpbrook
28620cc9997SStefan Weilqemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \
28720cc9997SStefan Weil	qemu-img.texi qemu-nbd.texi qemu-options.texi \
28820cc9997SStefan Weil	qemu-monitor.texi qemu-img-cmds.texi
289818220f5Saliguori
290df5cf721SthsVERSION ?= $(shell cat VERSION)
291df5cf721SthsFILE = qemu-$(VERSION)
292586314f2Sbellard
2931e43adfcSbellard# tar release (use 'make -k tar' on a checkouted tree)
294586314f2Sbellardtar:
295586314f2Sbellard	rm -rf /tmp/$(FILE)
2961e43adfcSbellard	cp -r . /tmp/$(FILE)
29799c6c082Saurel32	cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
298586314f2Sbellard	rm -rf /tmp/$(FILE)
299586314f2Sbellard
3004c0a6db0SStuart BradySYSTEM_TARGETS=$(filter %-softmmu,$(TARGET_DIRS))
3014c0a6db0SStuart BradySYSTEM_PROGS=$(patsubst qemu-system-i386,qemu, \
3024c0a6db0SStuart Brady             $(patsubst %-softmmu,qemu-system-%, \
3034c0a6db0SStuart Brady             $(SYSTEM_TARGETS)))
3044c0a6db0SStuart Brady
3054c0a6db0SStuart BradyUSER_TARGETS=$(filter %-user,$(TARGET_DIRS))
3064c0a6db0SStuart BradyUSER_PROGS=$(patsubst %-bsd-user,qemu-%, \
3074c0a6db0SStuart Brady           $(patsubst %-darwin-user,qemu-%, \
3084c0a6db0SStuart Brady           $(patsubst %-linux-user,qemu-%, \
3094c0a6db0SStuart Brady           $(USER_TARGETS))))
3104c0a6db0SStuart Brady
31176b62fd0Sbellard# generate a binary distribution
312d691f669Sbellardtarbin:
31318be8d77Sblueswir1	cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
3144c0a6db0SStuart Brady	$(patsubst %,$(bindir)/%, $(SYSTEM_PROGS)) \
3154c0a6db0SStuart Brady	$(patsubst %,$(bindir)/%, $(USER_PROGS)) \
316b932cabaSbellard	$(bindir)/qemu-img \
3177a5ca864Sbellard	$(bindir)/qemu-nbd \
3187efa4387Sbellard	$(datadir)/bios.bin \
3197efa4387Sbellard	$(datadir)/vgabios.bin \
320de9258a8Sbellard	$(datadir)/vgabios-cirrus.bin \
321637f6cd7Sbellard	$(datadir)/ppc_rom.bin \
322d5295253Sbellard	$(datadir)/video.x \
3230986ac3bSbellard	$(datadir)/openbios-sparc32 \
324938255d2Sblueswir1	$(datadir)/openbios-sparc64 \
325e5d01b06Saurel32	$(datadir)/openbios-ppc \
32619c80e50Sbellard	$(datadir)/pxe-ne2k_pci.bin \
32719c80e50Sbellard	$(datadir)/pxe-rtl8139.bin \
32819c80e50Sbellard	$(datadir)/pxe-pcnet.bin \
3292991990bSaliguori	$(datadir)/pxe-e1000.bin \
3301f50f8d1Sbellard	$(docdir)/qemu-doc.html \
3311f50f8d1Sbellard	$(docdir)/qemu-tech.html \
33240e8a53bSaurel32	$(mandir)/man1/qemu.1 \
33340e8a53bSaurel32	$(mandir)/man1/qemu-img.1 \
3347a5ca864Sbellard	$(mandir)/man8/qemu-nbd.8
335d691f669Sbellard
3364fb240a4Sbellard# Include automatically generated dependency files
3373e230dd2SCorentin Chary-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d)
338