OSDN Git Service

Make sure mklib sees the definition of CC and CXX. Make mklib respect
authorIan Romanick <idr@us.ibm.com>
Fri, 25 Jun 2004 22:51:39 +0000 (22:51 +0000)
committerIan Romanick <idr@us.ibm.com>
Fri, 25 Jun 2004 22:51:39 +0000 (22:51 +0000)
the definitions of CC and CXX on Linux.  This fixed build issues with
sunos5-gcc and build issues on GCC 2.x Linux when CC and CXX are set
to a GCC 3.x compiler.

bin/mklib
src/glu/sgi/Makefile
src/glut/glx/Makefile
src/glut/mini/Makefile
src/glw/Makefile
src/glx/mini/Makefile
src/mesa/Makefile
src/mesa/drivers/dri/fb/Makefile
src/mesa/drivers/dri/x11/Makefile

index a6e9a08..9c1e0cd 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -122,9 +122,9 @@ case $ARCH in
            #OPTS="-shared -Wl,-soname,${LIBNAME}"  # soname???
            OPTS="-shared"
             if [ $CPLUSPLUS = 1 ] ; then
-                LINK="g++"
+                LINK=$CXX
             else
-                LINK="gcc"
+                LINK=$CC
             fi
             rm -f ${LIBNAME}
 
@@ -158,9 +158,9 @@ case $ARCH in
             echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION}
 
             if [ $CPLUSPLUS = 1 ] ; then
-                LINK="g++"
+                LINK=$CXX
             else
-                LINK="gcc"
+                LINK=$CC
             fi
 
             # rm any old libs
index 940c149..f1d0d70 100644 (file)
@@ -128,7 +128,7 @@ default: $(LIB_DIR)/$(GLU_LIB_NAME)
 
 # Make the library:
 $(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
-       $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \
                -minor $(GLU_MINOR) -patch $(GLU_TINY) \
                -cplusplus $(MKLIB_OPTIONS) -install $(LIB_DIR) \
                $(GLU_LIB_DEPS) $(OBJECTS)
index 2d76fd5..e725048 100644 (file)
@@ -91,7 +91,7 @@ default: $(LIB_DIR)/$(GLUT_LIB_NAME)
 
 # Make the library
 $(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
-       $(TOP)/bin/mklib -o $(GLUT_LIB) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLUT_LIB) \
                -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
                -patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
                $(GLUT_LIB_DEPS) $(OBJECTS)
index ebb28d1..d2cb5c7 100644 (file)
@@ -55,7 +55,7 @@ default: depend $(LIB_DIR)/$(GLUT_LIB_NAME)
 
 # Make the library
 $(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
-       $(TOP)/bin/mklib -o $(GLUT_LIB) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLUT_LIB) \
                -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
                -patch $(GLUT_TINY) $(GLUT_LIB_DEPS) -install $(LIB_DIR) \
                $(MKLIB_OPTIONS) $(OBJECTS)
index 3af07a1..393f8c3 100644 (file)
@@ -33,7 +33,7 @@ clean:
 
 # Make the library
 $(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
-       $(TOP)/bin/mklib -o $(GLW_LIB) -major $(MAJOR) -minor $(MINOR) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLW_LIB) -major $(MAJOR) -minor $(MINOR) \
                -patch $(TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
                $(GLW_LIB_DEPS) $(OBJECTS)
 
index c030641..45bf6dd 100644 (file)
@@ -45,7 +45,7 @@ default: depend $(LIB_DIR)/$(GL_LIB_NAME)
 
 # Make libGL
 $(LIB_DIR)/$(GL_LIB_NAME):  $(OBJECTS) Makefile
-       $(TOP)/bin/mklib -o $(GL_LIB) -major 1 -minor 2 $(MKLIB_OPTIONS) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) -major 1 -minor 2 $(MKLIB_OPTIONS) \
                -install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
        rm -f $(LIB_DIR)/miniglx.conf
        install example.miniglx.conf $(LIB_DIR)/miniglx.conf
index ea844af..95ca042 100644 (file)
@@ -105,19 +105,19 @@ subdirs:
 
 # Make the GL library
 $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
-       $(TOP)/bin/mklib -o $(GL_LIB) -major $(GL_MAJOR) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) -major $(GL_MAJOR) \
                -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIB_DIR) \
                $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
 
 # Make the OSMesa library
 $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
        if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
-               $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \
+               CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \
                        -minor $(MESA_MINOR) -patch $(MESA_TINY) \
                        -install $(LIB_DIR) $(MKLIB_OPTIONS) \
                        $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
        else \
-               $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \
+               CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \
                        -minor $(MESA_MINOR) -patch $(GL_TINY) \
                        -install $(LIB_DIR) $(MKLIB_OPTIONS) \
                        $(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
index 578eeb9..d5fedac 100644 (file)
@@ -57,7 +57,7 @@ default: depend $(LIB_DIR)/$(LIBNAME)
 
 
 $(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
                $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
 
 
index a0334b1..4fe42a2 100644 (file)
@@ -67,7 +67,7 @@ default: depend $(LIB_DIR)/$(LIBNAME)
 
 
 $(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
-       $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
+       CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
                $(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES)