kbuild: use SoC-specific CONFIG to descend into SoC directory
Use "obj-$(CONFIG_FOO) += foo/" where it is possible.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
diff --git a/arch/nds32/cpu/n1213/Makefile b/arch/nds32/cpu/n1213/Makefile
index be98c4a..8ab1fce 100644
--- a/arch/nds32/cpu/n1213/Makefile
+++ b/arch/nds32/cpu/n1213/Makefile
@@ -9,9 +9,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# necessary to create built-in.o
-obj- := __dummy__.o
-
extra-y = start.o
-obj-y += $(if $(SOC),$(SOC)/)
+obj-$(if $(filter ag101,$(SOC)),y) += ag101/
+obj-$(if $(filter ag102,$(SOC)),y) += ag102/