From 8b5f4eb3ab700046b9f41d53544791fa02852551 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 26 Jan 2021 08:16:55 +0900 Subject: net: move CONFIG_NET guard to top Makefile When CONFIG_NET is disabled, nothing under the net/ directory is compiled. Move the CONFIG_NET guard to the top Makefile so the net/ directory is entirely skipped. When Kbuild visits net/Makefile, CONFIG_NET is obvioulsy 'y' because CONFIG_NET is a bool option. Clean up net/Makefile. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210125231659.106201-1-masahiroy@kernel.org Signed-off-by: Jakub Kicinski --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b0e4767735dc..61357f7eb55f 100644 --- a/Makefile +++ b/Makefile @@ -649,7 +649,8 @@ ifeq ($(KBUILD_EXTMOD),) core-y := init/ usr/ drivers-y := drivers/ sound/ drivers-$(CONFIG_SAMPLES) += samples/ -drivers-y += net/ virt/ +drivers-$(CONFIG_NET) += net/ +drivers-y += virt/ libs-y := lib/ endif # KBUILD_EXTMOD -- cgit v1.2.3-70-g09d2