[U-Boot] [PATCH 3/3] Makefile: cosmetic: optimize usage of LIBS-y
Daniel Schwierzeck
daniel.schwierzeck at gmail.com
Thu Jun 28 18:45:21 CEST 2012
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
---
Makefile | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 2bde73c..cf3c56d 100644
--- a/Makefile
+++ b/Makefile
@@ -225,15 +225,15 @@ endif
OBJS := $(addprefix $(obj),$(OBJS))
+HAVE_VENDOR_COMMON_LIB := $(shell [ -f board/$(VENDOR)/common/Makefile ] \
+ && echo y || echo 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 +241,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 +286,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
--
1.7.11.1
More information about the U-Boot
mailing list