summaryrefslogtreecommitdiff
path: root/arch/xtensa/Makefile
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2009-04-02 16:58:53 -0700
committerChris Zankel <chris@zankel.net>2009-04-03 00:06:45 -0700
commitf1933189b89da2b34fc37e6737737c8c9bf01139 (patch)
treee72eb72eb1ec8bd5c59828f7629fd40b8d99c187 /arch/xtensa/Makefile
parent06a7476be78c58a5ee0f4b4cc4acf43800087d52 (diff)
xtensa: only build platform or variant if they contain a Makefile
We only add the platform or variant directory to core-y if it contains a Makefile. Consequently, we can remove the Makefiles for the dc232b and fsf processor variants. Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/Makefile')
-rw-r--r--arch/xtensa/Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index d0a8ba4b12c..4caffac3ca2 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