Enable builds on AIX 64-bit
authorKarl Schultz <kschultz@freedesktop.org>
Fri, 1 Oct 2004 13:33:26 +0000 (13:33 +0000)
committerKarl Schultz <kschultz@freedesktop.org>
Fri, 1 Oct 2004 13:33:26 +0000 (13:33 +0000)
Makefile
bin/mklib
configs/aix-64 [new file with mode: 0644]

index 1140204e0038b6228b25ab2eeb0a8a1bf682c941..8348fb2e6621513249838c89d137dc8553a827fe 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,7 @@ $(TOP)/configs/current:
 
 # Rules to set/install a specific build configuration
 aix \
+aix-64 \
 aix-gcc \
 aix-static \
 beos \
index e48ca582d060f9386f0b270fada9f251e7b645e9..59dd0096f4c90317aa47f773d9cf4f2f1e61e154 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -372,7 +372,30 @@ case $ARCH in
             ar -X64 -ruv ${LIBNAME} ${OBJECTS}
             FINAL_LIBS=${LIBNAME}
         else
-            echo "mklib: PROBLEM: AIX64 shared libs not supported!!!"
+           EXPFILE="lib${LIBNAME}.exp"
+           OFILE=shr.o  #Want to be consistent with the IBM libGL.a
+           LIBNAME="lib${LIBNAME}.a"  # shared objects are still stored in the .a libraries
+           OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64"
+           rm -f ${EXPFILE} ${OFILE}
+           NM="/bin/nm -eC -X64"
+           echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
+           ${NM} ${OBJECTS} | awk '{
+           if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
+           && ( substr($1,1,1) != ".")) {
+                   if (substr ($1, 1, 7) != "__sinit" &&
+                           substr ($1, 1, 7) != "__sterm") {
+                           if (substr ($1, 1, 5) == "__tf1")
+                               print (substr ($1, 7))
+                           else if (substr ($1, 1, 5) == "__tf9")
+                               print (substr ($1, 15))
+                           else
+                               print $1
+                       }
+               }
+           }' | sort -u >> ${EXPFILE}
+           cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
+           ar -X64 -r ${LIBNAME} ${OFILE}
+            FINAL_LIBS="${LIBNAME}"
         fi
         ;;
 
diff --git a/configs/aix-64 b/configs/aix-64
new file mode 100644 (file)
index 0000000..98bb255
--- /dev/null
@@ -0,0 +1,28 @@
+# Configuration for AIX, dynamic libs
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = aix
+
+# Compiler and flags
+CC = xlc
+CXX = xlC
+
+CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3
+CXXFLAGS = -O -DAIXV3
+MKLIB_OPTIONS = -arch AIX64
+
+# Library names (actual file names)
+GL_LIB_NAME = libGL.a
+GLU_LIB_NAME = libGLU.a
+GLUT_LIB_NAME = libglut.a
+GLW_LIB_NAME = libGLw.a
+OSMESA_LIB_NAME = libOSMesa.a
+
+GL_LIB_DEPS = -lX11 -lXext -lm
+GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC
+GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
+GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11
+OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB)
+APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
+