[U-Boot] [RFC PATCH 3/4] Add new folder and build system for SPL

Daniel Schwierzeck
2011-07-08T11:57:32Z

Dear Wolfgang,

On Fri, Jul 8, 2011 at 11:17 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Daniel Schwierzeck,
>
> In message <1309883182-12854-4-git-send-email-daniel.schwierzeck@googlemail.com> you wrote:
> ...
>> +# create 'spl/obj' within OBJTREE for spl
>> +OBJTREE := $(OBJTREE)/spl/obj
>> +LNDIR ? ? ? ?:= $(OBJTREE)
>> +
>> +include $(TOPDIR)/config.mk
>> +# We want the final binaries in this directory
>> +obj ?:= $(obj)../
>> +START ? ? ? ?= $(OBJTREE)/$(CPUDIR)/start.o
>
> I don't really like these "../" parts. ?Can we please try to omit
> these? ?We can use $(TOPDIR) and/or $(OBJTREE) instead to express the
> path names, can't we?
>
> I have to admit that I don't understand what the old and the new
> values of $(obj) are above...
>
> [The same applies to the "CPPFLAGS += -I$(OBJTREE)/../../include2
> -I$(OBJTREE)/../../include" part in the first patch.]
>

This was introduced by Aneesh. To support out-of-tree builds, those include
directories must be relative to OBJTREE because they contain auto-generated
header files. And with this SPL approach we get a second build directory
in TOPDIR/spl/obj. To build inside this directory we have to manipulate the
OBJTREE variable.

Another ideas:
- introducing an additional variable like SPLTREE (set to OBJTREE/spl/obj)
- using $(OBJTREE)$(SUBTREE)/include2" as Mike suggested.

What do you think?

Best regards,
Daniel