From patchwork Tue Sep 22 12:23:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Feng" X-Patchwork-Id: 7238401 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 35D3EBEEC1 for ; Tue, 22 Sep 2015 12:37:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DFDD20687 for ; Tue, 22 Sep 2015 12:37:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65F3E20703 for ; Tue, 22 Sep 2015 12:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757823AbbIVMhf (ORCPT ); Tue, 22 Sep 2015 08:37:35 -0400 Received: from mga11.intel.com ([192.55.52.93]:39980 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757711AbbIVMhf (ORCPT ); Tue, 22 Sep 2015 08:37:35 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 22 Sep 2015 05:37:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,573,1437462000"; d="scan'208";a="810363660" Received: from feng-bdw-de-pi.bj.intel.com ([10.238.154.58]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2015 05:37:34 -0700 From: Feng Wu To: pbonzini@redhat.com, alex.williamson@redhat.com, mmarek@suse.com Cc: eric.auger@linaro.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Feng Wu Subject: [PATCH v2] Add virt directory to the top Makefile Date: Tue, 22 Sep 2015 20:23:34 +0800 Message-Id: <1442924614-16833-1-git-send-email-feng.wu@intel.com> X-Mailer: git-send-email 2.1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We need to build files in virt/lib/, so add virt directory to the top Makefile. Signed-off-by: Feng Wu Acked-by: Michal Marek --- v2: - Remove the explicit 'virt' entry in the KBUILD_ALLDIRS assignment - Remove './' in virt/Makefile Makefile | 10 ++++++---- arch/x86/kvm/Makefile | 3 --- virt/Makefile | 1 + 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 virt/Makefile diff --git a/Makefile b/Makefile index 35b4c19..0e60876 100644 --- a/Makefile +++ b/Makefile @@ -550,6 +550,7 @@ drivers-y := drivers/ sound/ firmware/ net-y := net/ libs-y := lib/ core-y := usr/ +virt-y := virt/ endif # KBUILD_EXTMOD ifeq ($(dot-config),1) @@ -890,10 +891,10 @@ core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ - $(net-y) $(net-m) $(libs-y) $(libs-m))) + $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y))) vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ - $(init-) $(core-) $(drivers-) $(net-) $(libs-)))) + $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-)))) init-y := $(patsubst %/, %/built-in.o, $(init-y)) core-y := $(patsubst %/, %/built-in.o, $(core-y)) @@ -902,14 +903,15 @@ net-y := $(patsubst %/, %/built-in.o, $(net-y)) libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) libs-y := $(libs-y1) $(libs-y2) +virt-y := $(patsubst %/, %/built-in.o, $(virt-y)) # Externally visible symbols (used by link-vmlinux.sh) export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) -export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) +export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(virt-y) export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds export LDFLAGS_vmlinux # used by scripts/pacmage/Makefile -export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt) +export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools) vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) diff --git a/arch/x86/kvm/Makefile b/arch/x86/kvm/Makefile index 05cc2d7..67d215c 100644 --- a/arch/x86/kvm/Makefile +++ b/arch/x86/kvm/Makefile @@ -6,9 +6,6 @@ CFLAGS_svm.o := -I. CFLAGS_vmx.o := -I. KVM := ../../../virt/kvm -LIB := ../../../virt/lib - -obj-$(CONFIG_IRQ_BYPASS_MANAGER) += $(LIB)/ kvm-y += $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \ $(KVM)/eventfd.o $(KVM)/irqchip.o $(KVM)/vfio.o diff --git a/virt/Makefile b/virt/Makefile new file mode 100644 index 0000000..be78347 --- /dev/null +++ b/virt/Makefile @@ -0,0 +1 @@ +obj-y += lib/