Assorted mklib tweaks.
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 15 Dec 2003 16:14:55 +0000 (16:14 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 15 Dec 2003 16:14:55 +0000 (16:14 +0000)
Added Intel icc support to mklib.

Make-config
bin/mklib
src/glu/sgi/Makefile.X11
src/glut/glx/Makefile.X11
src/glw/Makefile.X11

index 2abc9d806732fcfc06d985ff24f2e1724058834c..85d9b660000a111e652b1f00d3b3565c7ef48862 100644 (file)
@@ -461,7 +461,7 @@ linux-x86-sse:
        "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread" \
        "GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
        "GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
-       "APP_LIB_DEPS = -lm" \
+       "APP_LIB_DEPS = -lglut -lGLU -lGL -lm" \
        "ASM_SOURCES = $(X86_SOURCES)"
 
 linux-icc:
@@ -477,8 +477,9 @@ linux-icc:
        "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread" \
        "GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
        "GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
-       "APP_LIB_DEPS = -lm" \
-       "ASM_SOURCES = $(X86_SOURCES)"
+       "APP_LIB_DEPS = -lglut -lGLU -lGL -lm" \
+       "ASM_SOURCES = $(X86_SOURCES)" \
+       "MKLIB_OPTIONS = -arch icc"
 
 # Contributed by Uwe_Maurer@t-online.de
 linux-ggi:
index 327fd8ccf2276b9b74a9bde6973c159e7afe3dad..3dc4cd91c16825a3de1fe9a6bdb671770d85b610 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -335,6 +335,46 @@ case $ARCH in
        FINAL_LIBS="${LIBNAME}"
        ;;
 
+    'icc')
+       # Intel C compiler
+       LIBNAME="lib${LIBNAME}"     # prefix with "lib"
+
+        if [ $STATIC = 1 ] ; then
+            echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a
+            LINK="ar"
+            OPTS="-ruv"
+            # make lib
+            ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
+            # finish up
+            FINAL_LIBS="${LIBNAME}.a"
+        else
+            OPTS="-shared"
+            VERSION="${MAJOR}.${MINOR}.${PATCH}"
+
+            echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION}
+
+            if [ $CPLUSPLUS = 1 ] ; then
+                LINK="icc"
+            else
+                LINK="icc"
+            fi
+
+            # rm any old libs
+            rm -f ${LIBNAME}.so.${VERSION}
+            rm -f ${LIBNAME}.so.${MAJOR}
+            rm -f ${LIBNAME}.so
+
+            # make lib
+            ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+            # make usual symlinks
+            ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
+            ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
+            # finish up
+            FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
+        fi
+       ;;
+
+
     'example')
        # If you're adding support for a new architecture, you can
        # start with this:
index 7202aa84ffbce8b44013c0e57a12446c3e42aa31..5102528585fd51d1e25e5f59a2ed689193358259 100644 (file)
@@ -142,7 +142,8 @@ targets: $(LIBDIR)/$(GLU_LIB)
 $(LIBDIR)/$(GLU_LIB): $(OBJECTS)
        $(TOP)/bin/mklib -o $(GLU_LIB_NAME) -major $(GLU_MAJOR) \
                -minor $(GLU_MINOR) -patch $(GLU_TINY) \
-               $(GLU_LIB_DEPS) -cplusplus -install $(LIBDIR) $(OBJECTS)
+               $(GLU_LIB_DEPS) -cplusplus -install $(LIBDIR) \
+               $(MKLIB_OPTIONS) $(OBJECTS)
 
 
 
index 0ef132d451c89560a581b47b849a89fd3ae0f743..89b920bea9e0723239aff4be3f79ecade80fd7c4 100644 (file)
@@ -103,7 +103,7 @@ targets: $(LIBDIR)/$(GLUT_LIB)
 $(LIBDIR)/$(GLUT_LIB): $(OBJECTS)
        $(TOP)/bin/mklib -o glut -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
                -patch $(GLUT_TINY) $(GLUT_LIB_DEPS) -install $(LIBDIR) \
-               $(OBJECTS)
+               $(MKLIB_OPTIONS) $(OBJECTS)
 
 include $(TOP)/Make-config
 
index 888aebd52cd2d03554c800b81dd9f8339725e8e3..b38ef50d4c7edba676d71fd23f5928b535d51d5d 100644 (file)
@@ -46,7 +46,8 @@ targets: $(LIBDIR)/$(GLW_LIB) message
 # Make the library
 $(LIBDIR)/$(GLW_LIB): $(OBJECTS)
        $(TOP)/bin/mklib -o GLw -major $(MAJOR) -minor $(MINOR) \
-               -patch $(TINY) $(GLW_LIB_DEPS) -install $(LIBDIR) $(OBJECTS)
+               -patch $(TINY) $(GLW_LIB_DEPS) -install $(LIBDIR) \
+               $(MKLIB_OPTIONS) $(OBJECTS)
 
 
 message: