Commit 8b5a02640adf77301f943e8754992c50df004e8a
Committed by
Wolfgang Denk
1 parent
f52d7b3529
Exists in
master
and in
54 other branches
Makefile: cosmetic: optimize usage of LIBS-y
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Showing 2 changed files with 7 additions and 13 deletions Side-by-side Diff
Makefile
... | ... | @@ -225,15 +225,14 @@ |
225 | 225 | |
226 | 226 | OBJS := $(addprefix $(obj),$(OBJS)) |
227 | 227 | |
228 | +HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile), y, n) | |
229 | + | |
228 | 230 | LIBS-y += lib/libgeneric.o |
229 | 231 | LIBS-y += lib/lzma/liblzma.o |
230 | 232 | LIBS-y += lib/lzo/liblzo.o |
231 | 233 | LIBS-y += lib/zlib/libz.o |
232 | -ifeq ($(CONFIG_TIZEN),y) | |
233 | -LIBS-y += lib/tizen/libtizen.o | |
234 | -endif | |
235 | -LIBS-y += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ | |
236 | - "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) | |
234 | +LIBS-$(CONFIG_TIZEN) += lib/tizen/libtizen.o | |
235 | +LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o | |
237 | 236 | LIBS-y += $(CPUDIR)/lib$(CPU).o |
238 | 237 | ifdef SOC |
239 | 238 | LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o |
... | ... | @@ -241,9 +240,7 @@ |
241 | 240 | ifeq ($(CPU),ixp) |
242 | 241 | LIBS-y += arch/arm/cpu/ixp/npe/libnpe.o |
243 | 242 | endif |
244 | -ifeq ($(CONFIG_OF_EMBED),y) | |
245 | -LIBS-y += dts/libdts.o | |
246 | -endif | |
243 | +LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o | |
247 | 244 | LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o |
248 | 245 | LIBS-y += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ |
249 | 246 | fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ |
... | ... | @@ -288,9 +285,7 @@ |
288 | 285 | endif |
289 | 286 | LIBS-y += drivers/rtc/librtc.o |
290 | 287 | LIBS-y += drivers/serial/libserial.o |
291 | -ifeq ($(CONFIG_GENERIC_LPC_TPM),y) | |
292 | -LIBS-y += drivers/tpm/libtpm.o | |
293 | -endif | |
288 | +LIBS-$(CONFIG_GENERIC_LPC_TPM) += drivers/tpm/libtpm.o | |
294 | 289 | LIBS-y += drivers/twserial/libtws.o |
295 | 290 | LIBS-y += drivers/usb/eth/libusb_eth.o |
296 | 291 | LIBS-y += drivers/usb/gadget/libusb_gadget.o |
spl/Makefile
... | ... | @@ -23,8 +23,7 @@ |
23 | 23 | # We want the final binaries in this directory |
24 | 24 | obj := $(OBJTREE)/spl/ |
25 | 25 | |
26 | -HAVE_VENDOR_COMMON_LIB := $(shell [ -f $(SRCTREE)/board/$(VENDOR)/common/Makefile ] \ | |
27 | - && echo y || echo n) | |
26 | +HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile), y, n) | |
28 | 27 | |
29 | 28 | ifdef CONFIG_SPL_START_S_PATH |
30 | 29 | START_PATH := $(subst ",,$(CONFIG_SPL_START_S_PATH)) |