[Mesa-dev] [PATCH 05/12] r300g: share the source list

Chia-I Wu olvaffe at gmail.com
Fri Aug 26 08:07:41 PDT 2011


On Fri, Aug 26, 2011 at 10:52 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
[snip]
>> I don't really have a lot of insight into how the Android build system
>> works, but those files were originally added so that r300_dri.so would
>> link correctly for Gallium targets that didn't use GLSL, because without
>> GLSL those files weren't being built.  What will happen if someone tries
>> to build only the g3dvl target on Android (if this is even possible)?
> Ah, I see.  I wrongly assumed the only targets are r300_dri.so and the
> compiler tests.  Yes, that would be a problem for targets that do not
> link libmesagallium.a, such as g3dvl.
>
> But to correctly support r300g for non-GL targets with Android build
> system, I will need to create two more static libraries, consisting of
> ralloc.o and register_allocate.o respectively.  It seems to be an
> overkill.  I think it is better to leave Makefile and SConscript as
> is, which is already the case, and let Android.mk skip those two
> files.  I will update the comments and commit logs to reflect this.
I will add this to the commit log

    Note that

      $(TOP)/src/glsl/ralloc.c and
      $(TOP)/src/mesa/program/register_allocate.c

    are removed from C_SOURCES in Makefile.sources and added back in
    Makefile and SConscript.  The idea is that they are not part of r300g.
    But having them in libr300.a makes build non-GL targets such as the
    compiler tests or g3dvl much easier.  Also, for practical reason, TOP
    would be an undefined variable in Makefile.sources.

Does that look right to you?

>>>
>>> If they were to be added to Makefile.sources, we would need to define
>>> TOP in Makefile.sources as SCons parses only the file.  Also, Android
>>> build system, to be added in a latter patch, does not like source
>>> files from another directory.  I think it is best to leave them out
>>> from Makefile.sources.  I forgot to update the commit log when I later
>>> found out about this.  There is already a comment in Makefile about
>>> this.  Do you think it is sufficient that I update the commit log?
>>>
>>>
>>
>> I think the comment in the Makefile is OK.
I will also add non-GL targets such as g3dvl to it.
>> -Tom
>>
>>
>>
>>
>>
>
>
>
> --
> olv at LunarG.com
>



-- 
olv at LunarG.com


More information about the mesa-dev mailing list