[Mesa-dev] [PATCH 4/4] glu: Fix build of static GLU libraries
Alexander von Gluck
kallisti5 at unixzen.com
Fri Dec 23 15:25:45 PST 2011
* 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:
-$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
+$(TOP)/$(LIB_DIR)/lib$(GLU_LIB).so: $(OBJECTS)
$(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)
+$(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)
+
+
clean:
-rm -f *.o */*.o */*/*.o
--
1.7.2.5
More information about the mesa-dev
mailing list