diff --git a/Makefile b/Makefile index 74f5c5fbc57ca83e1e40edfb17a088bed24475db..93fb7956b0e8d4d26d326d0c96d1857a82d5e7fd 100644 --- a/Makefile +++ b/Makefile @@ -406,5 +406,5 @@ tar: Makefile: $(GENERATED_HEADERS) # Include automatically generated dependency files --include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d) --include $(wildcard qga/*.d hw/*.d hw/usb/*.d) +# All subdir dependencies come automatically from our recursive subdir rules +-include $(wildcard *.d) diff --git a/Makefile.dis b/Makefile.dis index 3e1fcaf4b786a1218d15dbb76da6c6c0e9d0ea78..09060f0a1aa74f6926a706ce8c27b2342007b7ab 100644 --- a/Makefile.dis +++ b/Makefile.dis @@ -20,4 +20,4 @@ clean: rm -f *.o *.d *.a *~ # Include automatically generated dependency files --include $(wildcard *.d */*.d) +-include $(wildcard *.d) diff --git a/Makefile.target b/Makefile.target index 2907aad0c4e2dc9c167afe461c471952229e8dcd..550d8897a3b855e12ea08ba8b9418d2af87afe95 100644 --- a/Makefile.target +++ b/Makefile.target @@ -216,4 +216,4 @@ GENERATED_HEADERS += config-target.h Makefile: $(GENERATED_HEADERS) # Include automatically generated dependency files --include $(wildcard *.d */*.d) +-include $(wildcard *.d) diff --git a/Makefile.user b/Makefile.user index b71782040789ede74bf9bf5fb12cf95c7a3f0d1c..0ffefe813f211b8e05260d1a14d249e63e30beb3 100644 --- a/Makefile.user +++ b/Makefile.user @@ -23,4 +23,4 @@ clean: done # Include automatically generated dependency files --include $(wildcard *.d */*.d) +-include $(wildcard *.d) diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index d43f1df5f097c0e856a04931b5ea99e8deeefa1b..eb171b7c47a997686436d3d25e8365b65baad728 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -7,7 +7,7 @@ obj-y += debugcon.o multiboot.o obj-y += pc_piix.o obj-y += pc_sysfw.o obj-$(CONFIG_XEN) += xen_platform.o xen_apic.o -obj-$(CONFIG_KVM) += kvm/clock.o kvm/apic.o kvm/i8259.o kvm/ioapic.o kvm/i8254.o +obj-y += kvm/ obj-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o obj-y := $(addprefix ../,$(obj-y)) diff --git a/hw/kvm/Makefile.objs b/hw/kvm/Makefile.objs new file mode 100644 index 0000000000000000000000000000000000000000..226497a58fdd843a422275259c75606d36d3cc51 --- /dev/null +++ b/hw/kvm/Makefile.objs @@ -0,0 +1 @@ +obj-$(CONFIG_KVM) += clock.o apic.o i8259.o ioapic.o i8254.o diff --git a/rules.mak b/rules.mak index 4bc5e52fa3295b8388670b6d9e4fd94dade7f314..60f3e96541fc6f0763d6a0080ef63fa3e89c459c 100644 --- a/rules.mak +++ b/rules.mak @@ -94,6 +94,7 @@ define unnest-dir $(foreach var,$(nested-vars),$(call push-var,$(var),$1/)) $(eval obj := $(obj)/$1) $(eval include $(SRC_PATH)/$1/Makefile.objs) +$(eval -include $(wildcard $1/*.d)) $(eval obj := $(patsubst %/$1,%,$(obj))) $(foreach var,$(nested-vars),$(call pop-var,$(var),$1/)) endef