aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/Makefile16
-rw-r--r--arch/xtensa/variants/dc232b/Makefile1
-rw-r--r--arch/xtensa/variants/fsf/Makefile1
3 files changed, 8 insertions, 10 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index d0a8ba4..4caffac 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -64,23 +64,23 @@ ifneq ($(VARIANT),)
endif
endif
-#
+# Only build variant and/or platform if it includes a Makefile
+
+buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
+buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)
+
+# Find libgcc.a
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
head-y := arch/xtensa/kernel/head.o
core-y += arch/xtensa/kernel/ arch/xtensa/mm/
-ifneq ($(VARIANT),)
-core-y += arch/xtensa/variants/$(VARIANT)/
-endif
-ifneq ($(PLATFORM),)
-core-y += arch/xtensa/platforms/$(PLATFORM)/
-endif
+core-y += $(buildvar) $(buildplf)
+
libs-y += arch/xtensa/lib/ $(LIBGCC)
boot := arch/xtensa/boot
-
all: zImage
bzImage : zImage
diff --git a/arch/xtensa/variants/dc232b/Makefile b/arch/xtensa/variants/dc232b/Makefile
deleted file mode 100644
index 3c8f268..0000000
--- a/arch/xtensa/variants/dc232b/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-# dc232b Makefile
diff --git a/arch/xtensa/variants/fsf/Makefile b/arch/xtensa/variants/fsf/Makefile
deleted file mode 100644
index 3fadcfd..0000000
--- a/arch/xtensa/variants/fsf/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-# fsf Makefile