Reduces duplications, simplifying future changes. Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm-common/Kbuild | 20 ++++++++++++++++++++ hypervisor/arch/arm/Kbuild | 16 +++++----------- hypervisor/arch/arm64/Kbuild | 16 +++++----------- 3 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 hypervisor/arch/arm-common/Kbuild
diff --git a/hypervisor/arch/arm-common/Kbuild b/hypervisor/arch/arm-common/Kbuild new file mode 100644 index 0000000..42c3a9d --- /dev/null +++ b/hypervisor/arch/arm-common/Kbuild @@ -0,0 +1,20 @@ +# +# Jailhouse, a Linux-based partitioning hypervisor +# +# Copyright (c) Siemens AG, 2013-2016 +# +# Authors: +# Jan Kiszka <[email protected]> +# +# This work is licensed under the terms of the GNU GPL, version 2. See +# the COPYING file in the top-level directory. +# + +include $(CONFIG_MK) + +OBJS-y += dbg-write.o lib.o psci.o control.o paging.o mmu_cell.o +OBJS-y += irqchip.o gic-common.o +OBJS-$(CONFIG_ARM_GIC_V2) += gic-v2.o +OBJS-$(CONFIG_SERIAL_AMBA_PL011) += uart-pl011.o + +COMMON_OBJECTS = $(addprefix ../arm-common/,$(OBJS-y)) diff --git a/hypervisor/arch/arm/Kbuild b/hypervisor/arch/arm/Kbuild index f073926..9612f39 100644 --- a/hypervisor/arch/arm/Kbuild +++ b/hypervisor/arch/arm/Kbuild @@ -1,7 +1,7 @@ # # Jailhouse, a Linux-based partitioning hypervisor # -# Copyright (c) Siemens AG, 2013 +# Copyright (c) Siemens AG, 2013-2016 # # Authors: # Jan Kiszka <[email protected]> @@ -10,23 +10,17 @@ # the COPYING file in the top-level directory. # -include $(CONFIG_MK) +include $(src)/../arm-common/Kbuild KBUILD_AFLAGS := $(subst -include asm/unified.h,,$(KBUILD_AFLAGS)) always := built-in.o -COMMON := ../arm-common - -obj-y := entry.o exception.o setup.o control.o traps.o mmio.o +obj-y := $(COMMON_OBJECTS) +obj-y += entry.o exception.o setup.o control.o traps.o mmio.o obj-y += mmu_hyp.o caches.o smp-stubs.o -obj-y += $(COMMON)/dbg-write.o $(COMMON)/lib.o $(COMMON)/psci.o -obj-y += $(COMMON)/paging.o $(COMMON)/mmu_cell.o -obj-y += $(COMMON)/irqchip.o $(COMMON)/gic-common.o -obj-y += $(COMMON)/control.o -obj-$(CONFIG_ARM_GIC_V2) += $(COMMON)/gic-v2.o + obj-$(CONFIG_ARM_GIC_V3) += gic-v3.o -obj-$(CONFIG_SERIAL_AMBA_PL011) += $(COMMON)/uart-pl011.o obj-$(CONFIG_SERIAL_8250_DW) += uart-8250-dw.o obj-$(CONFIG_SERIAL_TEGRA) += uart-tegra.o obj-$(CONFIG_MACH_VEXPRESS) += smp-vexpress.o diff --git a/hypervisor/arch/arm64/Kbuild b/hypervisor/arch/arm64/Kbuild index 2d44cdd..91c2a91 100644 --- a/hypervisor/arch/arm64/Kbuild +++ b/hypervisor/arch/arm64/Kbuild @@ -2,26 +2,20 @@ # Jailhouse AArch64 support # # Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH +# Copyright (c) Siemens AG, 2016 # # Authors: # Antonios Motakis <[email protected]> +# Jan Kiszka <[email protected]> # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # -include $(CONFIG_MK) - -COMMON := ../arm-common +include $(src)/../arm-common/Kbuild always := built-in.o -obj-y := entry.o setup.o control.o mmio.o caches.o +obj-y := $(COMMON_OBJECTS) +obj-y += entry.o setup.o control.o mmio.o caches.o obj-y += exception.o traps.o -obj-y += $(COMMON)/dbg-write.o $(COMMON)/lib.o -obj-y += $(COMMON)/control.o $(COMMON)/psci.o -obj-y += $(COMMON)/mmu_cell.o $(COMMON)/paging.o -obj-y += $(COMMON)/irqchip.o $(COMMON)/gic-common.o - -obj-$(CONFIG_SERIAL_AMBA_PL011) += $(COMMON)/uart-pl011.o -obj-$(CONFIG_ARM_GIC_V2) += $(COMMON)/gic-v2.o -- 2.1.4 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
