[Mesa-dev] [PATCH 4/4] glu: Fix build of static GLU libraries

Alexander von Gluck kallisti5 at unixzen.com
Sat Dec 24 09:15:40 PST 2011


On 24.12.2011 07:35, Brian Paul wrote:
> On Fri, Dec 23, 2011 at 4:25 PM, Alexander von Gluck
> <kallisti5 at unixzen.com> wrote:
>>
>> * Several platforms try to build static libGLU.a
>>  however, the libGLU makefile only will build a shared .so
>> * Haiku links libGLU into libGL, so this makes the process easier
>> ---
>>  configs/haiku        |    3 +++
>>  src/glu/sgi/Makefile |   10 +++++++++-
>>  2 files changed, 12 insertions(+), 1 deletions(-)
>>
>> diff --git a/configs/haiku b/configs/haiku
>> index 12f958e..93e51d7 100644
>> --- a/configs/haiku
>> +++ b/configs/haiku
>> @@ -45,6 +45,9 @@ else
>>        CFLAGS   += -O3
>>  endif
>>
>> +# GLU settings
>> +GLU_LIB_NAME = libGLU.a
>> +
>>  # Glut setings
>>  GLUT_CFLAGS = -fexceptions
>>
>> diff --git a/src/glu/sgi/Makefile b/src/glu/sgi/Makefile
>> index 94427e2..9d5143d 100644
>> --- a/src/glu/sgi/Makefile
>> +++ b/src/glu/sgi/Makefile
>> @@ -130,13 +130,21 @@ $(TOP)/$(LIB_DIR):
>>        -mkdir $(TOP)/$(LIB_DIR)
>>
>>  # Make the library:
>
> Maybe update the comment here to say "Make the shared library".

Ok, will redo Patch 4,3

>> -$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
>> +$(TOP)/$(LIB_DIR)/lib$(GLU_LIB).so: $(OBJECTS)
>
> Are you sure this change won't break other builds?

As far as I can tell, it shouldn't... but should be tested.

I was trying to pick up on the GLU_LIB_NAME's extension, but couldn't
figure out a way to do it in the makefile.

Maybe mklib would be a better spot for this? I was thinking touching
the glu makefile was less risk then touching the mklib that is used
for everything.

>>        $(MKLIB) -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
>>                -major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) 
>> \
>>                -cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
>>                -exports glu.exports -id
>> $(INSTALL_LIB_DIR)/lib$(GLU_LIB).$(GLU_MAJOR).dylib \
>>                $(GLU_LIB_DEPS) $(OBJECTS)
>>
>
> Add a comment here "Build static library"

Can-do


-- Alex



More information about the mesa-dev mailing list