[Mesa-dev] [PATCH 4/4] glu: Fix build of static GLU libraries
Brian Paul
brian.e.paul at gmail.com
Sat Dec 24 05:35:38 PST 2011
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".
> -$(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?
> $(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"
> +$(TOP)/$(LIB_DIR)/lib$(GLU_LIB).a: $(OBJECTS)
> + $(MKLIB) -o $(GLU_LIB) -static -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)
> +
> +
>
-Brian
More information about the mesa-dev
mailing list