summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2012-07-19 13:39:58 +0000
committerWolfgang Denk <wd@denx.de>2012-08-10 23:17:43 +0200
commit8b5a02640adf77301f943e8754992c50df004e8a (patch)
tree6ef7698f5e0f97fc980bc70147792e853d74a405
parentf52d7b3529e84642e6a62f3deecb622d5a222261 (diff)
downloadtalos-obmc-uboot-8b5a02640adf77301f943e8754992c50df004e8a.tar.gz
talos-obmc-uboot-8b5a02640adf77301f943e8754992c50df004e8a.zip
Makefile: cosmetic: optimize usage of LIBS-y
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-rw-r--r--Makefile17
-rw-r--r--spl/Makefile3
2 files changed, 7 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 3c856b95a8..5ce5cc38e8 100644
--- a/Makefile
+++ b/Makefile
@@ -225,15 +225,14 @@ endif
OBJS := $(addprefix $(obj),$(OBJS))
+HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile), y, n)
+
LIBS-y += lib/libgeneric.o
LIBS-y += lib/lzma/liblzma.o
LIBS-y += lib/lzo/liblzo.o
LIBS-y += lib/zlib/libz.o
-ifeq ($(CONFIG_TIZEN),y)
-LIBS-y += lib/tizen/libtizen.o
-endif
-LIBS-y += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
- "board/$(VENDOR)/common/lib$(VENDOR).o"; fi)
+LIBS-$(CONFIG_TIZEN) += lib/tizen/libtizen.o
+LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o
LIBS-y += $(CPUDIR)/lib$(CPU).o
ifdef SOC
LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
@@ -241,9 +240,7 @@ endif
ifeq ($(CPU),ixp)
LIBS-y += arch/arm/cpu/ixp/npe/libnpe.o
endif
-ifeq ($(CONFIG_OF_EMBED),y)
-LIBS-y += dts/libdts.o
-endif
+LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o
LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
LIBS-y += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \
fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \
@@ -288,9 +285,7 @@ LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
endif
LIBS-y += drivers/rtc/librtc.o
LIBS-y += drivers/serial/libserial.o
-ifeq ($(CONFIG_GENERIC_LPC_TPM),y)
-LIBS-y += drivers/tpm/libtpm.o
-endif
+LIBS-$(CONFIG_GENERIC_LPC_TPM) += drivers/tpm/libtpm.o
LIBS-y += drivers/twserial/libtws.o
LIBS-y += drivers/usb/eth/libusb_eth.o
LIBS-y += drivers/usb/gadget/libusb_gadget.o
diff --git a/spl/Makefile b/spl/Makefile
index ea7d4750fb..e9ecb9b75b 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -23,8 +23,7 @@ include $(TOPDIR)/config.mk
# We want the final binaries in this directory
obj := $(OBJTREE)/spl/
-HAVE_VENDOR_COMMON_LIB := $(shell [ -f $(SRCTREE)/board/$(VENDOR)/common/Makefile ] \
- && echo y || echo n)
+HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile), y, n)
ifdef CONFIG_SPL_START_S_PATH
START_PATH := $(subst ",,$(CONFIG_SPL_START_S_PATH))
OpenPOWER on IntegriCloud