9
0
Fork 0

Makefile.lib: introduce lwl-y for lowlevel code

The lowlevel code is expected to be present only ONCE

in PBL is enabled otherwise in barebox

This fix the module support with PBL and allow to reduce the size of barebox
by drop the lowlevell init in barebox as the compiler does not discard it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2013-02-20 13:56:15 +01:00 committed by Sascha Hauer
parent 6b005a6098
commit 488374c564
1 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,14 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
# o if we encounter foo/ in $(obj-m), remove it from $(obj-m)
# and add the directory to the list of dirs to descend into: $(subdir-m)
# lowlevel is present in the PBL if enabled
# otherwise in barebox
ifeq ($(CONFIG_PBL_IMAGE), y)
pbl-y += $(lwl-y)
else
obj-y += $(lwl-y)
endif
# for non dirs add pbl- prefix to the target
# so we recompile the source with custom flags and custom quiet
__pbl-y := $(notdir $(pbl-y))