Revision 4115852b Makefile

b/Makefile
91 91

  
92 92
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
93 93

  
94
subdir-%: $(GENERATED_HEADERS)
94
subdir-%:
95 95
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
96 96

  
97 97
ifneq ($(wildcard config-host.mak),)
98 98
include $(SRC_PATH)/Makefile.objs
99 99
endif
100 100

  
101
$(universal-obj-y) $(common-obj-y): $(GENERATED_HEADERS)
102 101
subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
103 102

  
104 103
$(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) subdir-libdis
105 104

  
106
$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
105
$(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
107 106

  
108 107
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
109 108
romsubdir-%:
......
142 141
install-libcacard:
143 142
	@echo "libtool is missing, please install and rerun configure"; exit 1
144 143
else
145
libcacard.la: $(GENERATED_HEADERS) $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))
144
libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))
146 145
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,)
147 146

  
148 147
install-libcacard: libcacard.la
......
151 150
######################################################################
152 151

  
153 152
qemu-img.o: qemu-img-cmds.h
154
qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o qemu-ga.o: $(GENERATED_HEADERS)
155 153

  
156 154
tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \
157 155
	qemu-timer-common.o main-loop.o notify.o iohandler.o cutils.o async.o
......
162 160
qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y)
163 161

  
164 162
qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
165
qemu-bridge-helper.o: $(GENERATED_HEADERS)
166 163

  
167 164
fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
168 165
fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
......
170 167
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
171 168
	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"  GEN   $@")
172 169

  
173
$(qapi-obj-y): $(GENERATED_HEADERS)
174 170
qapi-dir := $(BUILD_DIR)/qapi-generated
175 171
qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
176 172
qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir)
......
203 199

  
204 200
QGALIB_OBJ=$(addprefix $(qapi-dir)/, qga-qapi-types.o qga-qapi-visit.o qga-qmp-marshal.o)
205 201
QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
206
$(QGALIB_OBJ): $(QGALIB_GEN) $(GENERATED_HEADERS)
207
$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) $(GENERATED_HEADERS)
202
$(QGALIB_OBJ): $(QGALIB_GEN)
203
$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
208 204

  
209 205
qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) $(QGALIB_OBJ)
210 206

  
......
399 395
	cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
400 396
	rm -rf /tmp/$(FILE)
401 397

  
398
# Add a dependency on the generated files, so that they are always
399
# rebuilt before other object files
400
Makefile: $(GENERATED_HEADERS)
401

  
402 402
# Include automatically generated dependency files
403 403
-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d)

Also available in: Unified diff