ARCHOPT=""
NOPREFIX=0
EXPORTS=""
-
+ID=""
#
# Parse arguments
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
;;
shift 1;
EXPORTS=$1
;;
+ '-id')
+ shift 1;
+ ID=$1
+ ;;
-*)
echo "mklib: Unknown option: " $1 ;
exit 1
echo PATCH is $PATCH
echo DEPS are $DEPS
echo "EXPORTS in" $EXPORTS
+ echo ID is $ID
echo "-----------------"
fi
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}"
$(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)
--- /dev/null
+_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
$(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)
$(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)
$(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
$(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)
$(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)
@ $(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)