Skip to content

Commit 37d9fe4

Browse files
Feng Wubonzini
authored andcommitted
virt: Add virt directory to the top Makefile
We need to build files in virt/lib/, which are now used by KVM and VFIO, so add virt directory to the top Makefile. Signed-off-by: Feng Wu <[email protected]> Acked-by: Michal Marek <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent f73f817 commit 37d9fe4

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ drivers-y := drivers/ sound/ firmware/
550550
net-y := net/
551551
libs-y := lib/
552552
core-y := usr/
553+
virt-y := virt/
553554
endif # KBUILD_EXTMOD
554555

555556
ifeq ($(dot-config),1)
@@ -882,10 +883,10 @@ core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
882883

883884
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
884885
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
885-
$(net-y) $(net-m) $(libs-y) $(libs-m)))
886+
$(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y)))
886887

887888
vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
888-
$(init-) $(core-) $(drivers-) $(net-) $(libs-))))
889+
$(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-))))
889890

890891
init-y := $(patsubst %/, %/built-in.o, $(init-y))
891892
core-y := $(patsubst %/, %/built-in.o, $(core-y))
@@ -894,14 +895,15 @@ net-y := $(patsubst %/, %/built-in.o, $(net-y))
894895
libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
895896
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
896897
libs-y := $(libs-y1) $(libs-y2)
898+
virt-y := $(patsubst %/, %/built-in.o, $(virt-y))
897899

898900
# Externally visible symbols (used by link-vmlinux.sh)
899901
export KBUILD_VMLINUX_INIT := $(head-y) $(init-y)
900-
export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y)
902+
export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(virt-y)
901903
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
902904
export LDFLAGS_vmlinux
903905
# used by scripts/pacmage/Makefile
904-
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt)
906+
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools)
905907

906908
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN)
907909

virt/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-y += lib/

0 commit comments

Comments
 (0)