Make sure mklib sees the definition of CC and CXX. Make mklib respect

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.
This commit is contained in:
Ian Romanick
2004-06-25 22:51:39 +00:00
parent 74b380b2ec
commit 9eecb03226
9 changed files with 14 additions and 14 deletions

View File

@@ -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

View 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)

View 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)

View 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)

View 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)

View 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

View 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) ; \

View 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)

View 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)