summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-11 09:17:06 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-11 09:17:06 -0700
commitac0d19601caf1f3f86cb30cbafb9c000479e2b37 (patch)
treec59521328c9d45c23c83a7da98931b09b4686a1d
parent1724334d7c82abe55b6506dfe369df4facae6f06 (diff)
Apple: Cleaned up some linking and dylib ids issues
-rwxr-xr-xbin/mklib20
-rw-r--r--src/glu/sgi/Makefile2
-rw-r--r--src/glu/sgi/glu.exports.darwin59
-rw-r--r--src/glut/glx/Makefile1
-rw-r--r--src/glw/Makefile1
-rw-r--r--src/glx/x11/Makefile3
-rw-r--r--src/mesa/drivers/osmesa/Makefile2
-rw-r--r--src/mesa/drivers/x11/Makefile1
8 files changed, 83 insertions, 6 deletions
diff --git a/bin/mklib b/bin/mklib
index 69e82420a1..a25d5bfaeb 100755
--- 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}"
diff --git a/src/glu/sgi/Makefile b/src/glu/sgi/Makefile
index cd1354cc80..20c3bed0c9 100644
--- a/src/glu/sgi/Makefile
+++ b/src/glu/sgi/Makefile
@@ -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
index 0000000000..62d20ae1fb
--- /dev/null
+++ b/src/glu/sgi/glu.exports.darwin
@@ -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
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 307a6d2216..0dd438ea75 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -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)
diff --git a/src/glw/Makefile b/src/glw/Makefile
index 6a522eccba..63251efa97 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -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)
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
index 121f3dfac0..9d32539939 100644
--- a/src/glx/x11/Makefile
+++ b/src/glx/x11/Makefile
@@ -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
diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile
index 8b2feee6b0..d6a18b1d75 100644
--- a/src/mesa/drivers/osmesa/Makefile
+++ b/src/mesa/drivers/osmesa/Makefile
@@ -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)
diff --git a/src/mesa/drivers/x11/Makefile b/src/mesa/drivers/x11/Makefile
index b025246e63..d2780e62c9 100644
--- a/src/mesa/drivers/x11/Makefile
+++ b/src/mesa/drivers/x11/Makefile
@@ -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)