summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPaolo Bonzini2020-02-03 11:42:03 +0100
committerPaolo Bonzini2020-08-21 12:30:17 +0200
commit2becc36a3e53dc9b8ed01c5288e21a2463f1f640 (patch)
treea9d1f784c47bc111897d41db50972c4628bf6607 /Makefile
parentmeson: convert target/s390x/gen-features.h (diff)
downloadqemu-2becc36a3e53dc9b8ed01c5288e21a2463f1f640.tar.gz
qemu-2becc36a3e53dc9b8ed01c5288e21a2463f1f640.tar.xz
qemu-2becc36a3e53dc9b8ed01c5288e21a2463f1f640.zip
meson: infrastructure for building emulators
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile74
1 files changed, 7 insertions, 67 deletions
diff --git a/Makefile b/Makefile
index 698bbdfcd3..19f167ba5f 100644
--- a/Makefile
+++ b/Makefile
@@ -121,8 +121,6 @@ include $(SRC_PATH)/rules.mak
# lor is defined in rules.mak
CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
-generated-files-y = config-host.h
-
generated-files-y += module_block.h
generated-files-y += target/s390x/gen-features.h
target/s390x/gen-features.h: Makefile.ninja
@@ -178,65 +176,6 @@ DOCS=
endif
SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
-SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(filter %-softmmu, $(TARGET_DIRS)))
-SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %.d, $(SUBDIR_DEVICES_MAK))
-
-ifeq ($(SUBDIR_DEVICES_MAK),)
-config-all-devices.mak: config-host.mak
- $(call quiet-command,echo '# no devices' > $@,"GEN","$@")
-else
-config-all-devices.mak: $(SUBDIR_DEVICES_MAK) config-host.mak
- $(call quiet-command, sed -n \
- 's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \
- $(SUBDIR_DEVICES_MAK) | sort -u > $@, \
- "GEN","$@")
-endif
-
--include $(SUBDIR_DEVICES_MAK_DEP)
-
-# This has to be kept in sync with Kconfig.host.
-MINIKCONF_ARGS = \
- $(CONFIG_MINIKCONF_MODE) \
- $@ $*/config-devices.mak.d $< $(SRC_PATH)/Kconfig \
- CONFIG_TCG=$(CONFIG_TCG) \
- CONFIG_KVM=$(CONFIG_KVM) \
- CONFIG_SPICE=$(CONFIG_SPICE) \
- CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
- CONFIG_TPM=$(CONFIG_TPM) \
- CONFIG_XEN=$(CONFIG_XEN) \
- CONFIG_OPENGL=$(CONFIG_OPENGL) \
- CONFIG_X11=$(CONFIG_X11) \
- CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
- CONFIG_VHOST_KERNEL=$(CONFIG_VHOST_KERNEL) \
- CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
- CONFIG_LINUX=$(CONFIG_LINUX) \
- CONFIG_PVRDMA=$(CONFIG_PVRDMA)
-
-MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py
-
-$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(SRC_PATH)/Kconfig $(BUILD_DIR)/config-host.mak
- $(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) \
- > $@.tmp, "GEN", "$@.tmp")
- $(call quiet-command, if test -f $@; then \
- if cmp -s $@.old $@; then \
- mv $@.tmp $@; \
- cp -p $@ $@.old; \
- else \
- if test -f $@.old; then \
- echo "WARNING: $@ (user modified) out of date.";\
- else \
- echo "WARNING: $@ out of date.";\
- fi; \
- echo "Run \"$(MAKE) defconfig\" to regenerate."; \
- rm $@.tmp; \
- fi; \
- else \
- mv $@.tmp $@; \
- cp -p $@ $@.old; \
- fi,"GEN","$@");
-
-defconfig:
- rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
ifneq ($(wildcard config-host.mak),)
include $(SRC_PATH)/Makefile.objs
@@ -279,10 +218,15 @@ $(SOFTMMU_FUZZ_RULES): $(io-obj-y)
$(SOFTMMU_FUZZ_RULES): config-all-devices.mak
$(SOFTMMU_FUZZ_RULES): $(edk2-decompressed)
+# meson: this is sub-optimal but going away after conversion
+TARGET_DEPS = $(patsubst %,%-config-target.h, $(TARGET_DIRS))
+TARGET_DEPS += $(patsubst %,%-config-devices.h, $(filter %-softmmu,$(TARGET_DIRS)))
+TARGET_DEPS += $(patsubst %,libqemu-%.fa, $(TARGET_DIRS))
+
.PHONY: $(TARGET_DIRS_RULES)
# The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
# $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal
-$(TARGET_DIRS_RULES):
+$(TARGET_DIRS_RULES): $(TARGET_DEPS)
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
# LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC
@@ -370,7 +314,6 @@ clean: recurse-clean ninja-clean clean-ctlist
-test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
- rm -f qemu-options.def
find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
@@ -379,8 +322,6 @@ clean: recurse-clean ninja-clean clean-ctlist
rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~
rm -f fsdev/*.pod scsi/*.pod
rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
- rm -f config-all-devices.mak
- rm -f $(SUBDIR_DEVICES_MAK)
VERSION ?= $(shell cat VERSION)
@@ -398,8 +339,7 @@ distclean: clean ninja-distclean
-test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean -g
rm -f config-host.mak config-host.h* $(DOCS)
rm -f tests/tcg/config-*.mak
- rm -f config-all-devices.mak config-all-disas.mak config.status
- rm -f $(SUBDIR_DEVICES_MAK)
+ rm -f config-all-disas.mak config.status
rm -f po/*.mo tests/qemu-iotests/common.env
rm -f roms/seabios/config.mak roms/vgabios/config.mak
rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols