]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Makefile: allow appending to LIB in sub-makefiles
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Thu, 28 Jun 2012 06:45:19 +0000 (06:45 +0000)
committerWolfgang Denk <wd@denx.de>
Fri, 10 Aug 2012 21:11:10 +0000 (23:11 +0200)
The top Makefile and the SPL Makefile have lines like those:

ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
LIBS += $(CPUDIR)/omap-common/libomap-common.o
endif

ifeq ($(SOC),mx5)
LIBS += $(CPUDIR)/imx-common/libimx-common.o
endif

This should be done in the arch/CPU/SoC specific sub-makefiles to
keep the top Makefiles clean. This patch also allows adding of new
arch/CPU/SoC specific libraries in the future without touching
the top Makefiles.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Makefile

index 73c8e39abc0e8afc548b9f1c99c779a5c872a6ad..cdc245352b3c7fca5af0b107c0d20ff683930d33 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -225,7 +225,7 @@ endif
 
 OBJS := $(addprefix $(obj),$(OBJS))
 
-LIBS  = lib/libgeneric.o
+LIBS += lib/libgeneric.o
 LIBS += lib/lzma/liblzma.o
 LIBS += lib/lzo/liblzo.o
 LIBS += lib/zlib/libz.o