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