Apple: Cleaned up some linking and dylib ids issues
authorJeremy Huddleston <jeremyhu@freedesktop.org>
Mon, 11 Aug 2008 16:17:06 +0000 (09:17 -0700)
committerJeremy Huddleston <jeremyhu@freedesktop.org>
Mon, 11 Aug 2008 16:17:06 +0000 (09:17 -0700)
bin/mklib
src/glu/sgi/Makefile
src/glu/sgi/glu.exports.darwin [new file with mode: 0644]
src/glut/glx/Makefile
src/glw/Makefile
src/glx/x11/Makefile
src/mesa/drivers/osmesa/Makefile
src/mesa/drivers/x11/Makefile

index 69e82420a11521a850a9daa8cf12024d306b33e5..a25d5bfaeb2b7f31b72a6cc3424c42513b2e69a4 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -43,7 +43,7 @@ ARCH="auto"
 ARCHOPT=""
 NOPREFIX=0
 EXPORTS=""
-
+ID=""
 
 #
 # Parse arguments
@@ -75,6 +75,7 @@ do
            echo '  -altopts OPTS alternate options to override all others'
            echo "  -noprefix     don't prefix library name with 'lib' nor add any suffix"
            echo '  -exports FILE only export the symbols listed in FILE'
+           echo '  -id NAME      Sets the id of the dylib (Darwin)'
            echo '  -h, --help    display this information and exit'
            exit 1
            ;;
@@ -153,6 +154,10 @@ do
            shift 1;
            EXPORTS=$1
            ;;
+       '-id')
+           shift 1;
+           ID=$1
+           ;;
        -*)
            echo "mklib: Unknown option: " $1 ;
            exit 1
@@ -196,6 +201,7 @@ if [  ]  ; then
     echo PATCH is $PATCH
     echo DEPS are $DEPS
     echo "EXPORTS in" $EXPORTS
+    echo ID is $ID
     echo "-----------------"
 fi
 
@@ -630,13 +636,19 @@ case $ARCH in
                 LIBSUFFIX="bundle"
                 OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
             else
-               LIBSUFFIX="dylib"
-                OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+                LIBSUFFIX="dylib"
+                if [ -z "$ID" ] ; then
+                    ID="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+                fi
+                OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name ${ID}"
             fi
 
             if [ ${EXPORTS} ] ; then
+                if [ -f ${EXPORTS}".darwin" ] ; then
+                    EXPORTS=$EXPORTS".darwin"
+                fi
                 OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
-            fi 
+            fi
 
             LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
             LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
index cd1354cc80274d54e53ab0950ab1caebafe60d33..20c3bed0c9354ff4f9505c2f99f9f0b429f27e19 100644 (file)
@@ -139,7 +139,7 @@ $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(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 \
+               -exports glu.exports -id $(INSTALL_LIB_DIR)/lib$(GLU_LIB).$(GLU_MAJOR).dylib \
                $(GLU_LIB_DEPS) $(OBJECTS)
 
 
diff --git a/src/glu/sgi/glu.exports.darwin b/src/glu/sgi/glu.exports.darwin
new file mode 100644 (file)
index 0000000..62d20ae
--- /dev/null
@@ -0,0 +1,59 @@
+_gluBeginCurve
+_gluBeginPolygon
+_gluBeginSurface
+_gluBeginTrim
+_gluBuild1DMipmapLevels
+_gluBuild1DMipmaps
+_gluBuild2DMipmapLevels
+_gluBuild2DMipmaps
+_gluBuild3DMipmapLevels
+_gluBuild3DMipmaps
+_gluCheckExtension
+_gluCylinder
+_gluDeleteNurbsRenderer
+_gluDeleteQuadric
+_gluDeleteTess
+_gluDisk
+_gluEndCurve
+_gluEndPolygon
+_gluEndSurface
+_gluEndTrim
+_gluErrorString
+_gluGetNurbsProperty
+_gluGetString
+_gluGetTessProperty
+_gluLoadSamplingMatrices
+_gluLookAt
+_gluNewNurbsRenderer
+_gluNewQuadric
+_gluNewTess
+_gluNextContour
+_gluNurbsCallback
+_gluNurbsCallbackData
+_gluNurbsCallbackDataEXT
+_gluNurbsCurve
+_gluNurbsProperty
+_gluNurbsSurface
+_gluOrtho2D
+_gluPartialDisk
+_gluPerspective
+_gluPickMatrix
+_gluProject
+_gluPwlCurve
+_gluQuadricCallback
+_gluQuadricDrawStyle
+_gluQuadricNormals
+_gluQuadricOrientation
+_gluQuadricTexture
+_gluScaleImage
+_gluSphere
+_gluTessBeginContour
+_gluTessBeginPolygon
+_gluTessCallback
+_gluTessEndContour
+_gluTessEndPolygon
+_gluTessNormal
+_gluTessProperty
+_gluTessVertex
+_gluUnProject
+_gluUnProject4
index 307a6d221645c98262b3a670eafe9e4be573d1c8..0dd438ea7515fa77931d62246715b34b9f16a3d5 100644 (file)
@@ -94,6 +94,7 @@ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
        $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
                -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
                $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+               -id $(INSTALL_LIB_DIR)/lib$(GLUT_LIB).$(GLUT_MAJOR).dylib \
                $(GLUT_LIB_DEPS) $(OBJECTS)
 
 
index 6a522eccba598bbbc7291db008df23856e42860f..63251efa97af45535dffb151db8c210f74600c0a 100644 (file)
@@ -52,6 +52,7 @@ $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
        $(MKLIB) -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
                -major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
                $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+               -id $(INSTALL_LIB_DIR)/lib$(GLW_LIB).$(MAJOR).dylib \
                $(GLW_LIB_DEPS) $(OBJECTS)
 
 
index 121f3dfac008c6e85cabffb49691dd7d9330ffb1..9d32539939a64a6cddc8477f4ee29a8d2edb6cbd 100644 (file)
@@ -73,7 +73,8 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME):  $(OBJECTS) Makefile
        $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
                -major 1 -minor 2 $(MKLIB_OPTIONS) \
-               -install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
+               -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/libGL.1.dylib \
+               $(GL_LIB_DEPS) $(OBJECTS)
 
 
 depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_ASM_API) Makefile
index 8b2feee6b0ea54e4ce512d7edd7dc3d5495ab764..d6a18b1d755080861842f633c388c50e2de1a388 100644 (file)
@@ -48,6 +48,7 @@ $(TOP)/lib/$(OSMESA_LIB_NAME): $(OBJECTS)
        $(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
                -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
                -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+               -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
                $(OSMESA_LIB_DEPS) $(OBJECTS)
 
 
@@ -59,6 +60,7 @@ osmesa16: $(OBJECTS) $(CORE_MESA)
        $(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
                -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
                -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+               -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
                $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
 
 
index b025246e6343724e8ca8df3b6809fa8cff0e4318..d2780e62c979fa10f64587ce964c5f136712192d 100644 (file)
@@ -58,6 +58,7 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(CORE_MESA)
        @ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
                -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
                -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+               -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).$(GL_MAJOR).dylib \
                $(GL_LIB_DEPS) $(OBJECTS) $(CORE_MESA)