root / Makefile @ feb33ea7
History | View | Annotate | Download (15.3 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 | 250b086e | Lluís Vilanova | # All following code might depend on configuration variables |
7 | 55d7e8f6 | aurel32 | ifneq ($(wildcard config-host.mak),) |
8 | 1ad2134f | Paul Brook | # Put the all: rule here so that config-host.mak can contain dependencies. |
9 | 8f67aa82 | Stefan Weil | all: |
10 | ad064840 | pbrook | include config-host.mak |
11 | d1bd2423 | Peter Maydell | |
12 | d1bd2423 | Peter Maydell | # Check that we're not trying to do an out-of-tree build from |
13 | d1bd2423 | Peter Maydell | # a tree that's been used for an in-tree build. |
14 | d1bd2423 | Peter Maydell | ifneq ($(realpath $(SRC_PATH)),$(realpath .)) |
15 | d1bd2423 | Peter Maydell | ifneq ($(wildcard $(SRC_PATH)/config-host.mak),) |
16 | d1bd2423 | Peter Maydell | $(error This is an out of tree build but your source tree ($(SRC_PATH)) \ |
17 | d1bd2423 | Peter Maydell | seems to have been used for an in-tree build. You can fix this by running \ |
18 | d1bd2423 | Peter Maydell | "make distclean && rm -rf *-linux-user *-softmmu" in your source tree) |
19 | d1bd2423 | Peter Maydell | endif |
20 | d1bd2423 | Peter Maydell | endif |
21 | d1bd2423 | Peter Maydell | |
22 | 17759187 | aliguori | include $(SRC_PATH)/rules.mak |
23 | 59bc10ee | Paolo Bonzini | config-host.mak: $(SRC_PATH)/configure |
24 | e5efe7f5 | Juan Quintela | @echo $@ is out-of-date, running configure |
25 | e5efe7f5 | Juan Quintela | @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh |
26 | 55d7e8f6 | aurel32 | else |
27 | 55d7e8f6 | aurel32 | config-host.mak: |
28 | 7748b8cb | Mike Frysinger | ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
29 | 55d7e8f6 | aurel32 | @echo "Please call configure before running make!" |
30 | 55d7e8f6 | aurel32 | @exit 1 |
31 | 55d7e8f6 | aurel32 | endif |
32 | 7748b8cb | Mike Frysinger | endif |
33 | 766a487a | bellard | |
34 | 250b086e | Lluís Vilanova | GENERATED_HEADERS = config-host.h trace.h qemu-options.def |
35 | 250b086e | Lluís Vilanova | ifeq ($(TRACE_BACKEND),dtrace) |
36 | 250b086e | Lluís Vilanova | GENERATED_HEADERS += trace-dtrace.h |
37 | 250b086e | Lluís Vilanova | endif |
38 | 250b086e | Lluís Vilanova | GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h |
39 | 19ac36b5 | Lluís Vilanova | GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c trace.c |
40 | 250b086e | Lluís Vilanova | |
41 | d9ace8b3 | Juan Quintela | # Don't try to regenerate Makefile or configure |
42 | d9ace8b3 | Juan Quintela | # We don't generate any of them |
43 | d9ace8b3 | Juan Quintela | Makefile: ; |
44 | d9ace8b3 | Juan Quintela | configure: ; |
45 | d9ace8b3 | Juan Quintela | |
46 | 818220f5 | aliguori | .PHONY: all clean cscope distclean dvi html info install install-doc \ |
47 | 34bb443e | Anthony Liguori | pdf recurse-all speed test dist |
48 | 0cb3fb1e | pbrook | |
49 | fec90ff0 | Paolo Bonzini | $(call set-vpath, $(SRC_PATH)) |
50 | 8c462f8f | pbrook | |
51 | 3e2e0e6b | Juan Quintela | LIBS+=-lz $(LIBS_TOOLS) |
52 | 67c0f08d | Juan Quintela | |
53 | 7b93fadf | Corey Bryant | HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) |
54 | 7b93fadf | Corey Bryant | |
55 | cc8ae6de | pbrook | ifdef BUILD_DOCS |
56 | b40292e7 | Jan Kiszka | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt |
57 | 983eef5a | Meador Inge | ifdef CONFIG_VIRTFS |
58 | a2d8f1be | M. Mohan Kumar | DOCS+=fsdev/virtfs-proxy-helper.1 |
59 | 983eef5a | Meador Inge | endif |
60 | cc8ae6de | pbrook | else |
61 | cc8ae6de | pbrook | DOCS= |
62 | cc8ae6de | pbrook | endif |
63 | aa05ae6f | bellard | |
64 | 388d4758 | Lluís Vilanova | SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) |
65 | 1f3d3c8f | Juan Quintela | SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) |
66 | bd9141bb | Paul Brook | SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %/config-devices.mak.d, $(TARGET_DIRS)) |
67 | 1f3d3c8f | Juan Quintela | |
68 | 8bdd3d49 | Stefan Weil | ifeq ($(SUBDIR_DEVICES_MAK),) |
69 | 8bdd3d49 | Stefan Weil | config-all-devices.mak: |
70 | 8bdd3d49 | Stefan Weil | $(call quiet-command,echo '# no devices' > $@," GEN $@") |
71 | 8bdd3d49 | Stefan Weil | else |
72 | 1f3d3c8f | Juan Quintela | config-all-devices.mak: $(SUBDIR_DEVICES_MAK) |
73 | 01d86a85 | Stefan Weil | $(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@," GEN $@") |
74 | 8bdd3d49 | Stefan Weil | endif |
75 | 1f3d3c8f | Juan Quintela | |
76 | bd9141bb | Paul Brook | -include $(SUBDIR_DEVICES_MAK_DEP) |
77 | bd9141bb | Paul Brook | |
78 | a992fe3d | Paul Brook | %/config-devices.mak: default-configs/%.mak |
79 | 4c3b5a48 | Blue Swirl | $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, " GEN $@") |
80 | 012f0879 | Stefan Weil | @if test -f $@; then \ |
81 | 904fe1fb | Blue Swirl | if cmp -s $@.old $@; then \ |
82 | bd9141bb | Paul Brook | mv $@.tmp $@; \ |
83 | bd9141bb | Paul Brook | cp -p $@ $@.old; \ |
84 | 012f0879 | Stefan Weil | else \ |
85 | 012f0879 | Stefan Weil | if test -f $@.old; then \ |
86 | 012f0879 | Stefan Weil | echo "WARNING: $@ (user modified) out of date.";\ |
87 | 012f0879 | Stefan Weil | else \ |
88 | 012f0879 | Stefan Weil | echo "WARNING: $@ out of date.";\ |
89 | 012f0879 | Stefan Weil | fi; \ |
90 | 012f0879 | Stefan Weil | echo "Run \"make defconfig\" to regenerate."; \ |
91 | 012f0879 | Stefan Weil | rm $@.tmp; \ |
92 | 012f0879 | Stefan Weil | fi; \ |
93 | a992fe3d | Paul Brook | else \ |
94 | 012f0879 | Stefan Weil | mv $@.tmp $@; \ |
95 | 012f0879 | Stefan Weil | cp -p $@ $@.old; \ |
96 | a992fe3d | Paul Brook | fi |
97 | a992fe3d | Paul Brook | |
98 | a992fe3d | Paul Brook | defconfig: |
99 | a992fe3d | Paul Brook | rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) |
100 | a992fe3d | Paul Brook | |
101 | 1f3d3c8f | Juan Quintela | -include config-all-devices.mak |
102 | 1215c6e7 | Juan Quintela | |
103 | 8f67aa82 | Stefan Weil | all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all |
104 | b9dea4fb | pbrook | |
105 | 1215c6e7 | Juan Quintela | config-host.h: config-host.h-timestamp |
106 | 1215c6e7 | Juan Quintela | config-host.h-timestamp: config-host.mak |
107 | e14056ad | Blue Swirl | qemu-options.def: $(SRC_PATH)/qemu-options.hx |
108 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") |
109 | 1215c6e7 | Juan Quintela | |
110 | cec7d0b6 | pbrook | SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) |
111 | cec7d0b6 | pbrook | |
112 | 4115852b | Paolo Bonzini | subdir-%: |
113 | 0087375e | Paul Brook | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) |
114 | 4aa42531 | pbrook | |
115 | b88bc808 | Stefan Weil | ifneq ($(wildcard config-host.mak),) |
116 | 0e8c9214 | Andreas Färber | include $(SRC_PATH)/Makefile.objs |
117 | b88bc808 | Stefan Weil | endif |
118 | 0e8c9214 | Andreas Färber | |
119 | 41a74826 | Anthony Liguori | subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o |
120 | 6774e44a | Paolo Bonzini | |
121 | e2134eb9 | Gerd Hoffmann | subdir-pixman: pixman/Makefile |
122 | e2134eb9 | Gerd Hoffmann | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,) |
123 | e2134eb9 | Gerd Hoffmann | |
124 | e2134eb9 | Gerd Hoffmann | pixman/Makefile: $(SRC_PATH)/pixman/configure |
125 | c28fa5a0 | Gerd Hoffmann | (cd pixman; CFLAGS="$(CFLAGS) -fPIC" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static) |
126 | e2134eb9 | Gerd Hoffmann | |
127 | e2134eb9 | Gerd Hoffmann | $(SRC_PATH)/pixman/configure: |
128 | e2134eb9 | Gerd Hoffmann | (cd $(SRC_PATH)/pixman; autoreconf -v --install) |
129 | e2134eb9 | Gerd Hoffmann | |
130 | ee20477d | Paolo Bonzini | $(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis |
131 | c05ac895 | Paul Brook | |
132 | 4115852b | Paolo Bonzini | $(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser |
133 | add16157 | Blue Swirl | |
134 | c05ac895 | Paul Brook | ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) |
135 | c05ac895 | Paul Brook | romsubdir-%: |
136 | c05ac895 | Paul Brook | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",) |
137 | c05ac895 | Paul Brook | |
138 | c05ac895 | Paul Brook | ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) |
139 | c05ac895 | Paul Brook | |
140 | c05ac895 | Paul Brook | recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) |
141 | 83f64091 | bellard | |
142 | 98b068a9 | Juan Quintela | audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS) |
143 | 0e22fd2f | Juan Quintela | |
144 | a558ee17 | Juan Quintela | QEMU_CFLAGS+=$(CURL_CFLAGS) |
145 | 769ce76d | Alexander Graf | |
146 | 2f28d2ff | Anthony Liguori | QEMU_CFLAGS += -I$(SRC_PATH)/include |
147 | 2f28d2ff | Anthony Liguori | |
148 | 3e230dd2 | Corentin Chary | ui/cocoa.o: ui/cocoa.m |
149 | 4fb240a4 | bellard | |
150 | 3d5a3f9a | Paolo Bonzini | ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o hw/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) |
151 | 0483755a | aliguori | |
152 | 3e230dd2 | Corentin Chary | ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS) |
153 | fb599c9a | balrog | |
154 | a558ee17 | Juan Quintela | bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) |
155 | 4fb240a4 | bellard | |
156 | 7948a665 | Blue Swirl | version.o: $(SRC_PATH)/version.rc config-host.h |
157 | 9fe6de94 | Blue Swirl | $(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@") |
158 | 9fe6de94 | Blue Swirl | |
159 | 9fe6de94 | Blue Swirl | version-obj-$(CONFIG_WIN32) += version.o |
160 | 4fb240a4 | bellard | ###################################################################### |
161 | 44dc0ca3 | Alon Levy | # Support building shared library libcacard |
162 | 44dc0ca3 | Alon Levy | |
163 | 44dc0ca3 | Alon Levy | .PHONY: libcacard.la install-libcacard |
164 | 44dc0ca3 | Alon Levy | ifeq ($(LIBTOOL),) |
165 | 44dc0ca3 | Alon Levy | libcacard.la: |
166 | 44dc0ca3 | Alon Levy | @echo "libtool is missing, please install and rerun configure"; exit 1 |
167 | 44dc0ca3 | Alon Levy | |
168 | 44dc0ca3 | Alon Levy | install-libcacard: |
169 | 44dc0ca3 | Alon Levy | @echo "libtool is missing, please install and rerun configure"; exit 1 |
170 | 44dc0ca3 | Alon Levy | else |
171 | 4115852b | Paolo Bonzini | libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y))) |
172 | 44dc0ca3 | Alon Levy | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,) |
173 | 44dc0ca3 | Alon Levy | |
174 | 44dc0ca3 | Alon Levy | install-libcacard: libcacard.la |
175 | 44dc0ca3 | Alon Levy | $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,) |
176 | 44dc0ca3 | Alon Levy | endif |
177 | 00c705fb | Paolo Bonzini | |
178 | 44dc0ca3 | Alon Levy | ###################################################################### |
179 | 4fb240a4 | bellard | |
180 | 3c089e15 | Juan Quintela | qemu-img.o: qemu-img-cmds.h |
181 | 153859be | Stuart Brady | |
182 | cbcfa041 | Paolo Bonzini | tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \ |
183 | 136594f1 | Paolo Bonzini | main-loop.o iohandler.o error.o |
184 | cbcfa041 | Paolo Bonzini | tools-obj-$(CONFIG_POSIX) += compatfd.o |
185 | 0e8c9214 | Andreas Färber | |
186 | 69758c22 | Paolo Bonzini | qemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y) |
187 | 4ab328d6 | Paolo Bonzini | qemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y) $(block-obj-y) |
188 | 4ab328d6 | Paolo Bonzini | qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y) |
189 | 0a8e1acd | aliguori | |
190 | 7b93fadf | Corey Bryant | qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o |
191 | 7b93fadf | Corey Bryant | |
192 | 136594f1 | Paolo Bonzini | vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) libcacard/vscclient.o |
193 | adb696f3 | Corey Bryant | $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@") |
194 | adb696f3 | Corey Bryant | |
195 | ea75fc4e | M. Mohan Kumar | fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y) |
196 | 17bff52b | M. Mohan Kumar | fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap |
197 | 17bff52b | M. Mohan Kumar | |
198 | 153859be | Stuart Brady | qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx |
199 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") |
200 | 153859be | Stuart Brady | |
201 | 957f1f99 | Michael Roth | qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) |
202 | 54c2e502 | Dunrong Huang | qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated |
203 | 640e5404 | Michael Roth | |
204 | 19bf7c87 | Avi Kivity | gen-out-type = $(subst .,-,$(suffix $@)) |
205 | 8d3bc517 | Avi Kivity | |
206 | e454e2e2 | Andreas Färber | ifneq ($(wildcard config-host.mak),) |
207 | dbfe06c6 | Anthony Liguori | include $(SRC_PATH)/tests/Makefile |
208 | e454e2e2 | Andreas Färber | endif |
209 | 640e5404 | Michael Roth | |
210 | 0521d375 | Stefan Hajnoczi | qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py |
211 | 0521d375 | Stefan Hajnoczi | |
212 | 54c2e502 | Dunrong Huang | qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\ |
213 | 0521d375 | Stefan Hajnoczi | $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) |
214 | 54c2e502 | Dunrong Huang | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") |
215 | 54c2e502 | Dunrong Huang | qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\ |
216 | 0521d375 | Stefan Hajnoczi | $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) |
217 | 54c2e502 | Dunrong Huang | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") |
218 | 54c2e502 | Dunrong Huang | qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\ |
219 | 0521d375 | Stefan Hajnoczi | $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) |
220 | 54c2e502 | Dunrong Huang | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") |
221 | e3d4d252 | Michael Roth | |
222 | 599825c5 | Michael S. Tsirkin | qapi-types.c qapi-types.h :\ |
223 | 0521d375 | Stefan Hajnoczi | $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) |
224 | 8d3bc517 | Avi Kivity | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@") |
225 | 599825c5 | Michael S. Tsirkin | qapi-visit.c qapi-visit.h :\ |
226 | 0521d375 | Stefan Hajnoczi | $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) |
227 | 8d3bc517 | Avi Kivity | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@") |
228 | 599825c5 | Michael S. Tsirkin | qmp-commands.h qmp-marshal.c :\ |
229 | 0521d375 | Stefan Hajnoczi | $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) |
230 | 8d3bc517 | Avi Kivity | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@") |
231 | e3193601 | Anthony Liguori | |
232 | 54c2e502 | Dunrong Huang | QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h) |
233 | 4115852b | Paolo Bonzini | $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) |
234 | 957f1f99 | Michael Roth | |
235 | 136594f1 | Paolo Bonzini | qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(oslib-obj-y) $(trace-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) |
236 | 48ff7a62 | Michael Roth | |
237 | c9159fe9 | Stefan Weil | QEMULIBS=libuser libdis libdis-user |
238 | 111a38b0 | Robert Relyea | |
239 | 31e31b8a | bellard | clean: |
240 | 2d80ae89 | bellard | # avoid old build problems by removing potentially incorrect old files |
241 | 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 |
242 | df2943ba | Michael S. Tsirkin | rm -f qemu-options.def |
243 | e743ccec | Peter Maydell | find . -name '*.[od]' -exec rm -f {} + |
244 | e743ccec | Peter Maydell | rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ |
245 | 44dc0ca3 | Alon Levy | rm -Rf .libs |
246 | 07b44ce9 | Blue Swirl | rm -f qemu-img-cmds.h |
247 | b3d08c02 | Daniel P. Berrange | rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp |
248 | 19ac36b5 | Lluís Vilanova | @# May not be present in GENERATED_HEADERS |
249 | b3d08c02 | Daniel P. Berrange | rm -f trace-dtrace.h trace-dtrace.h-timestamp |
250 | 19ac36b5 | Lluís Vilanova | rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) |
251 | 19ac36b5 | Lluís Vilanova | rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) |
252 | 8f0e5c6b | Stefan Weil | rm -rf qapi-generated |
253 | 54c2e502 | Dunrong Huang | rm -rf qga/qapi-generated |
254 | c09015dd | Anthony Liguori | $(MAKE) -C tests/tcg clean |
255 | 111a38b0 | Robert Relyea | for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \ |
256 | fc8e320e | Magnus Damm | if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ |
257 | df2943ba | Michael S. Tsirkin | rm -f $$d/qemu-options.def; \ |
258 | 626df76a | bellard | done |
259 | 31e31b8a | bellard | |
260 | 34bb443e | Anthony Liguori | VERSION ?= $(shell cat VERSION) |
261 | 34bb443e | Anthony Liguori | |
262 | 34bb443e | Anthony Liguori | dist: qemu-$(VERSION).tar.bz2 |
263 | 34bb443e | Anthony Liguori | |
264 | 34bb443e | Anthony Liguori | qemu-%.tar.bz2: |
265 | 34bb443e | Anthony Liguori | $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" |
266 | 34bb443e | Anthony Liguori | |
267 | 7d13299d | bellard | distclean: clean |
268 | 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 |
269 | a992fe3d | Paul Brook | rm -f config-all-devices.mak |
270 | fc8e320e | Magnus Damm | rm -f roms/seabios/config.mak roms/vgabios/config.mak |
271 | 7a734b8f | Brad Hards | rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi |
272 | 7a734b8f | Brad Hards | rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys |
273 | 7a734b8f | Brad Hards | rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp |
274 | 7a734b8f | Brad Hards | rm -f qemu-doc.vr |
275 | 793553ac | Alexandre Raymond | rm -f config.log |
276 | 67ed96f9 | Peter Maydell | rm -f linux-headers/asm |
277 | 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 |
278 | 111a38b0 | Robert Relyea | for d in $(TARGET_DIRS) $(QEMULIBS); do \ |
279 | bc1b050d | bellard | rm -rf $$d || exit 1 ; \ |
280 | 76bc6838 | bellard | done |
281 | feb33ea7 | Gerd Hoffmann | test -f pixman/config.log && make -C pixman distclean |
282 | 7d13299d | bellard | |
283 | fed4a9ad | bellard | KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ |
284 | fed4a9ad | bellard | ar de en-us fi fr-be hr it lv nl pl ru th \ |
285 | 471fbf4a | Frédéric Boiteux | common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ |
286 | 471fbf4a | Frédéric Boiteux | bepo |
287 | fed4a9ad | bellard | |
288 | 77755340 | ths | ifdef INSTALL_BLOBS |
289 | 6329866f | Paolo Bonzini | BLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ |
290 | 7943a2fa | Gerd Hoffmann | vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \ |
291 | 3b3d448e | Gerd Hoffmann | ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \ |
292 | 5ee8ad71 | Alex Williamson | pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ |
293 | 5ee8ad71 | Alex Williamson | pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ |
294 | 94b26294 | Stefan Weil | qemu-icon.bmp \ |
295 | 00914b7d | Michal Simek | bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ |
296 | 2a2af967 | Jan Kiszka | multiboot.bin linuxboot.bin kvmvapic.bin \ |
297 | 39ac8455 | David Gibson | s390-zipl.rom \ |
298 | 753d11f2 | Richard Henderson | spapr-rtas.bin slof.bin \ |
299 | 753d11f2 | Richard Henderson | palcode-clipper |
300 | 77755340 | ths | else |
301 | 77755340 | ths | BLOBS= |
302 | 77755340 | ths | endif |
303 | 77755340 | ths | |
304 | 38954dca | pbrook | install-doc: $(DOCS) |
305 | d7dd65ba | Eduardo Habkost | $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" |
306 | d7dd65ba | Eduardo Habkost | $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)" |
307 | 0cd23fcc | Bruce Rogers | $(INSTALL_DATA) QMP/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" |
308 | 96d409eb | Juan Quintela | ifdef CONFIG_POSIX |
309 | 58f8aead | aliguori | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" |
310 | 58f8aead | aliguori | $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
311 | 58f8aead | aliguori | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" |
312 | 58f8aead | aliguori | $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" |
313 | 38954dca | pbrook | endif |
314 | a2d8f1be | M. Mohan Kumar | ifdef CONFIG_VIRTFS |
315 | a2d8f1be | M. Mohan Kumar | $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" |
316 | a2d8f1be | M. Mohan Kumar | $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1" |
317 | a2d8f1be | M. Mohan Kumar | endif |
318 | e2d87bff | Eduardo Habkost | |
319 | e2d87bff | Eduardo Habkost | install-datadir: |
320 | e2d87bff | Eduardo Habkost | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" |
321 | e2d87bff | Eduardo Habkost | |
322 | e2d87bff | Eduardo Habkost | install-confdir: |
323 | 80465e80 | Eduardo Habkost | $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" |
324 | e2d87bff | Eduardo Habkost | |
325 | e2d87bff | Eduardo Habkost | install-sysconfig: install-datadir install-confdir |
326 | 80465e80 | Eduardo Habkost | $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" |
327 | b5ec5ce0 | john cooper | |
328 | e2d87bff | Eduardo Habkost | install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir |
329 | 58f8aead | aliguori | $(INSTALL_DIR) "$(DESTDIR)$(bindir)" |
330 | 932a79df | ths | ifneq ($(TOOLS),) |
331 | 58f8aead | aliguori | $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" |
332 | 932a79df | ths | endif |
333 | 7b93fadf | Corey Bryant | ifneq ($(HELPERS-y),) |
334 | 7b93fadf | Corey Bryant | $(INSTALL_DIR) "$(DESTDIR)$(libexecdir)" |
335 | 7b93fadf | Corey Bryant | $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)" |
336 | 7b93fadf | Corey Bryant | endif |
337 | 77755340 | ths | ifneq ($(BLOBS),) |
338 | 77755340 | ths | set -e; for x in $(BLOBS); do \ |
339 | 6aae2a2e | Eduardo Habkost | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ |
340 | ad064840 | pbrook | done |
341 | 77755340 | ths | endif |
342 | 6aae2a2e | Eduardo Habkost | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" |
343 | 18be8d77 | blueswir1 | set -e; for x in $(KEYMAPS); do \ |
344 | 6aae2a2e | Eduardo Habkost | $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ |
345 | ad064840 | pbrook | done |
346 | 626df76a | bellard | for d in $(TARGET_DIRS); do \ |
347 | 7d3505c5 | bellard | $(MAKE) -C $$d $@ || exit 1 ; \ |
348 | 626df76a | bellard | done |
349 | 612384d7 | bellard | |
350 | 367e86e8 | bellard | # various test targets |
351 | 9b0b8203 | bellard | test speed: all |
352 | c09015dd | Anthony Liguori | $(MAKE) -C tests/tcg $@ |
353 | 31e31b8a | bellard | |
354 | 21d4e8e3 | Alexandre Bique | .PHONY: TAGS |
355 | 5fafdf24 | ths | TAGS: |
356 | 21d4e8e3 | Alexandre Bique | find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags |
357 | 31e31b8a | bellard | |
358 | 6688bc6d | bellard | cscope: |
359 | 6688bc6d | bellard | rm -f ./cscope.* |
360 | 45b75ae4 | Alexandre Raymond | find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files |
361 | 6688bc6d | bellard | cscope -b |
362 | 6688bc6d | bellard | |
363 | 3ef693a0 | bellard | # documentation |
364 | 01668d98 | Stefan Weil | MAKEINFO=makeinfo |
365 | 01668d98 | Stefan Weil | MAKEINFOFLAGS=--no-headers --no-split --number-sections |
366 | 20cc9997 | Stefan Weil | TEXIFLAG=$(if $(V),,--quiet) |
367 | 20cc9997 | Stefan Weil | %.dvi: %.texi |
368 | 20cc9997 | Stefan Weil | $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@") |
369 | 20cc9997 | Stefan Weil | |
370 | 1f673135 | bellard | %.html: %.texi |
371 | 952ef67c | Stefan Weil | $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \ |
372 | 01668d98 | Stefan Weil | " GEN $@") |
373 | 3ef693a0 | bellard | |
374 | f3548328 | bellard | %.info: %.texi |
375 | 01668d98 | Stefan Weil | $(call quiet-command,$(MAKEINFO) $< -o $@," GEN $@") |
376 | f3548328 | bellard | |
377 | 20cc9997 | Stefan Weil | %.pdf: %.texi |
378 | 20cc9997 | Stefan Weil | $(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@") |
379 | 5824d651 | blueswir1 | |
380 | 5824d651 | blueswir1 | qemu-options.texi: $(SRC_PATH)/qemu-options.hx |
381 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") |
382 | f3548328 | bellard | |
383 | acd0a093 | Luiz Capitulino | qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx |
384 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") |
385 | 2313086a | Blue Swirl | |
386 | 82a56f0d | Luiz Capitulino | QMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx |
387 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@") |
388 | b40292e7 | Jan Kiszka | |
389 | 153859be | Stuart Brady | qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx |
390 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") |
391 | 153859be | Stuart Brady | |
392 | 2313086a | Blue Swirl | qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi |
393 | 0d00e563 | aliguori | $(call quiet-command, \ |
394 | 4c3b5a48 | Blue Swirl | perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ |
395 | 3179d694 | Michael Tokarev | $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \ |
396 | 0d00e563 | aliguori | " GEN $@") |
397 | 5a67135a | bellard | |
398 | 153859be | Stuart Brady | qemu-img.1: qemu-img.texi qemu-img-cmds.texi |
399 | 0d00e563 | aliguori | $(call quiet-command, \ |
400 | 4c3b5a48 | Blue Swirl | perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \ |
401 | 3179d694 | Michael Tokarev | $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \ |
402 | 0d00e563 | aliguori | " GEN $@") |
403 | acd935ef | bellard | |
404 | a2d8f1be | M. Mohan Kumar | fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi |
405 | a2d8f1be | M. Mohan Kumar | $(call quiet-command, \ |
406 | a2d8f1be | M. Mohan Kumar | perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \ |
407 | 3179d694 | Michael Tokarev | $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \ |
408 | a2d8f1be | M. Mohan Kumar | " GEN $@") |
409 | a2d8f1be | M. Mohan Kumar | |
410 | 7a5ca864 | bellard | qemu-nbd.8: qemu-nbd.texi |
411 | 0d00e563 | aliguori | $(call quiet-command, \ |
412 | 4c3b5a48 | Blue Swirl | perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \ |
413 | 3179d694 | Michael Tokarev | $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \ |
414 | 0d00e563 | aliguori | " GEN $@") |
415 | 7a5ca864 | bellard | |
416 | 0cb3fb1e | pbrook | dvi: qemu-doc.dvi qemu-tech.dvi |
417 | 0cb3fb1e | pbrook | html: qemu-doc.html qemu-tech.html |
418 | 20cc9997 | Stefan Weil | info: qemu-doc.info qemu-tech.info |
419 | 20cc9997 | Stefan Weil | pdf: qemu-doc.pdf qemu-tech.pdf |
420 | 0cb3fb1e | pbrook | |
421 | 20cc9997 | Stefan Weil | qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ |
422 | 20cc9997 | Stefan Weil | qemu-img.texi qemu-nbd.texi qemu-options.texi \ |
423 | 20cc9997 | Stefan Weil | qemu-monitor.texi qemu-img-cmds.texi |
424 | 818220f5 | aliguori | |
425 | cb5fc67d | Anthony Liguori | # Add a dependency on the generated files, so that they are always |
426 | cb5fc67d | Anthony Liguori | # rebuilt before other object files |
427 | 7748b8cb | Mike Frysinger | ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) |
428 | cb5fc67d | Anthony Liguori | Makefile: $(GENERATED_HEADERS) |
429 | 7748b8cb | Mike Frysinger | endif |
430 | cb5fc67d | Anthony Liguori | |
431 | 4fb240a4 | bellard | # Include automatically generated dependency files |
432 | 1435ddb8 | Paolo Bonzini | # Dependencies in Makefile.objs files come from our recursive subdir rules |
433 | 1435ddb8 | Paolo Bonzini | -include $(wildcard *.d tests/*.d) |