summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/aix-648
-rw-r--r--configs/aix-64-static4
-rw-r--r--configs/aix-gcc6
-rw-r--r--configs/aix-static2
-rw-r--r--configs/beos6
-rw-r--r--configs/darwin6
-rw-r--r--configs/darwin-x86ppc6
-rw-r--r--configs/default16
-rw-r--r--configs/freebsd2
-rw-r--r--configs/freebsd-dri4
-rw-r--r--configs/hpux102
-rw-r--r--configs/hpux10-gcc2
-rw-r--r--configs/hpux10-static4
-rw-r--r--configs/hpux11-328
-rw-r--r--configs/hpux11-32-static2
-rw-r--r--configs/hpux11-6410
-rw-r--r--configs/hpux11-64-static4
-rw-r--r--configs/hpux11-ia648
-rw-r--r--configs/hpux11-ia64-static4
-rw-r--r--configs/hpux92
-rw-r--r--configs/hpux9-gcc2
-rw-r--r--configs/irix6-644
-rw-r--r--configs/irix6-64-static4
-rw-r--r--configs/irix6-n324
-rw-r--r--configs/irix6-n32-static4
-rw-r--r--configs/irix6-o324
-rw-r--r--configs/irix6-o32-static4
-rw-r--r--configs/linux-alpha6
-rw-r--r--configs/linux-alpha-static6
-rw-r--r--configs/linux-directfb4
-rw-r--r--configs/linux-dri-x86-642
-rw-r--r--configs/linux-glide6
-rw-r--r--configs/linux-ia64-icc8
-rw-r--r--configs/linux-ia64-icc-static2
-rw-r--r--configs/linux-icc4
-rw-r--r--configs/linux-icc-static2
-rw-r--r--configs/linux-osmesa2
-rw-r--r--configs/linux-osmesa162
-rw-r--r--configs/linux-osmesa322
-rw-r--r--configs/linux-profile6
-rw-r--r--configs/linux-solo8
-rw-r--r--configs/linux-sparc4
-rw-r--r--configs/linux-sparc54
-rw-r--r--configs/linux-ultrasparc6
-rw-r--r--configs/linux-x86-642
-rw-r--r--configs/linux-x86-64-static2
-rw-r--r--configs/linux-x86-glide6
-rw-r--r--configs/linux-x86-static2
-rw-r--r--configs/netbsd2
-rw-r--r--configs/openbsd6
-rw-r--r--configs/osf16
-rw-r--r--configs/osf1-static2
-rw-r--r--configs/solaris-x862
-rw-r--r--configs/solaris-x86-gcc6
-rw-r--r--configs/solaris-x86-gcc-static6
-rw-r--r--configs/sunos42
-rw-r--r--configs/sunos4-gcc2
-rw-r--r--configs/sunos4-static2
-rw-r--r--configs/sunos58
-rw-r--r--configs/sunos5-gcc4
-rw-r--r--configs/sunos5-smp8
-rw-r--r--configs/sunos5-v88
-rw-r--r--configs/sunos5-v8-static2
-rw-r--r--configs/sunos5-v910
-rw-r--r--configs/sunos5-v9-static4
-rw-r--r--configs/ultrix-gcc2
66 files changed, 152 insertions, 148 deletions
diff --git a/configs/aix-64 b/configs/aix-64
index bd19594753..5d2edc5876 100644
--- a/configs/aix-64
+++ b/configs/aix-64
@@ -10,7 +10,7 @@ CXX = xlC
CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -DPTHREADS
CXXFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -DPTHREADS
-LIB_DIR=$(TOP)/lib64
+LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
@@ -20,8 +20,8 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lC
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXm -lXt -lX11
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lC
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXm -lXt -lX11
APP_LIB_DEPS = -L$(TOP)/lib64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lpthread -lC
diff --git a/configs/aix-64-static b/configs/aix-64-static
index d1bfe1e5b6..6910e890d7 100644
--- a/configs/aix-64-static
+++ b/configs/aix-64-static
@@ -11,7 +11,7 @@ CXX = xlC
CFLAGS = -q64 -O -DAIXV3 -DPTHREADS
CXXFLAGS = -q64 -O -DAIXV3 -DPTHREADS
MKLIB_OPTIONS = -static
-LIB_DIR=$(TOP)/lib64
+LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
@@ -20,6 +20,6 @@ GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
-APP_LIB_DEPS = -q64 -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
+APP_LIB_DEPS = -q64 -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
-lX11 -lXext -lXmu -lXi -lm -lpthread -lC
diff --git a/configs/aix-gcc b/configs/aix-gcc
index cc55551050..81467082a7 100644
--- a/configs/aix-gcc
+++ b/configs/aix-gcc
@@ -13,7 +13,7 @@ CXXFLAGS = -O2 -DAIXV3
MKLIB_OPTIONS = -arch aix-gcc
GL_LIB_DEPS = -lX11 -lXext -lm
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu
-APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi
diff --git a/configs/aix-static b/configs/aix-static
index 323284201f..563184344c 100644
--- a/configs/aix-static
+++ b/configs/aix-static
@@ -19,7 +19,7 @@ GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
-lX11 -lXext -lXmu -lXi -lm -lpthread -lC
diff --git a/configs/beos b/configs/beos
index 007a929f88..f07973d0c7 100644
--- a/configs/beos
+++ b/configs/beos
@@ -93,8 +93,8 @@ PROGRAM_DIRS = beos samples redbook demos tests
# Library/program dependencies
GL_LIB_DEPS =
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
+OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS =
-GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -l$(GL_LIB)
-APP_LIB_DEPS = -lbe -L$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
+GLUT_LIB_DEPS = -lgame -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+APP_LIB_DEPS = -lbe -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
diff --git a/configs/darwin b/configs/darwin
index 0c8a6ec47a..7826ecc605 100644
--- a/configs/darwin
+++ b/configs/darwin
@@ -18,9 +18,9 @@ GLW_LIB_NAME = libGLw.dylib
OSMESA_LIB_NAME = libOSMesa.dylib
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
+OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
diff --git a/configs/darwin-x86ppc b/configs/darwin-x86ppc
index 6006af2340..13172327a7 100644
--- a/configs/darwin-x86ppc
+++ b/configs/darwin-x86ppc
@@ -22,9 +22,9 @@ GLW_LIB_NAME = libGLw.dylib
OSMESA_LIB_NAME = libOSMesa.dylib
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
+OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
diff --git a/configs/default b/configs/default
index ec44c8af2b..3eaa74aa07 100644
--- a/configs/default
+++ b/configs/default
@@ -59,7 +59,7 @@ GLW_SOURCES = GLwDrawA.c
# Directories to build
-LIB_DIR = $(TOP)/lib
+LIB_DIR = lib
SRC_DIRS = mesa glu glut/glx glw
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
@@ -70,14 +70,18 @@ PROGRAM_DIRS = demos redbook samples xdemos
# Library/program dependencies
EXTRA_LIB_PATH ?=
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
# Installation directories (for make install)
INSTALL_DIR = /usr/local
DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri
+
+# Where libGL will look for DRI hardware drivers
+DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
+
diff --git a/configs/freebsd b/configs/freebsd
index 782e0c3219..f7f967169b 100644
--- a/configs/freebsd
+++ b/configs/freebsd
@@ -26,4 +26,4 @@ CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES)
GLUT_CFLAGS = -fexceptions
EXTRA_LIB_PATH = -L/usr/X11R6/lib
-APP_LIB_DEPS = -L$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index 9734aff5a7..10b136f1e2 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -28,8 +28,8 @@ LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB)
-GLUT_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11
# Directories
diff --git a/configs/hpux10 b/configs/hpux10
index e17c8b6813..2406e50940 100644
--- a/configs/hpux10
+++ b/configs/hpux10
@@ -11,4 +11,4 @@ CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
-APP_LIB_DEPS = -$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
+APP_LIB_DEPS = -$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/hpux10-gcc b/configs/hpux10-gcc
index 107a99a85c..10a9ad5cd5 100644
--- a/configs/hpux10-gcc
+++ b/configs/hpux10-gcc
@@ -12,5 +12,5 @@ CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/incl
CXXFLAGS = -ansi -O3 -D_HPUX_SOURCE
GLUT_CFLAGS = -fexceptions
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/hpux10-static b/configs/hpux10-static
index 38a1313e69..c8a43c847a 100644
--- a/configs/hpux10-static
+++ b/configs/hpux10-static
@@ -26,5 +26,5 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++
diff --git a/configs/hpux11-32 b/configs/hpux11-32
index 59cc0918b2..3904e4d3ff 100644
--- a/configs/hpux11-32
+++ b/configs/hpux11-32
@@ -23,8 +23,8 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
GL_LIB_DEPS = -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXt -lXi -lX11 -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
diff --git a/configs/hpux11-32-static b/configs/hpux11-32-static
index 7dc7608e5f..9bd42a0abc 100644
--- a/configs/hpux11-32-static
+++ b/configs/hpux11-32-static
@@ -23,5 +23,5 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl
diff --git a/configs/hpux11-64 b/configs/hpux11-64
index 8b28f261c9..4b175a32ee 100644
--- a/configs/hpux11-64
+++ b/configs/hpux11-64
@@ -14,7 +14,7 @@ CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include
MKLIB_OPTIONS =
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
@@ -24,8 +24,8 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
GL_LIB_DEPS = -L/usr/lib/X11R6/pa20_64 -L/usr/contrib/X11R6/lib/pa20_64 -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
diff --git a/configs/hpux11-64-static b/configs/hpux11-64-static
index e2b23ce8ae..4ec8a11c1f 100644
--- a/configs/hpux11-64-static
+++ b/configs/hpux11-64-static
@@ -14,7 +14,7 @@ CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X1
MKLIB_OPTIONS = -static
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
@@ -24,4 +24,4 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/pa20_64 -L/usr/contrib/X11R6/lib/pa20_64 -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/pa20_64 -L/usr/contrib/X11R6/lib/pa20_64 -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl
diff --git a/configs/hpux11-ia64 b/configs/hpux11-ia64
index dc1291b8b5..58fa45d9df 100644
--- a/configs/hpux11-ia64
+++ b/configs/hpux11-ia64
@@ -14,7 +14,7 @@ CXXFLAGS = +z -Aa +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/u
MKLIB_OPTIONS =
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.so
@@ -25,6 +25,6 @@ OSMESA_LIB_NAME = libOSMesa.so
# Library/program dependencies
GL_LIB_DEPS = -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
diff --git a/configs/hpux11-ia64-static b/configs/hpux11-ia64-static
index 407aa9630c..44de7750f9 100644
--- a/configs/hpux11-ia64-static
+++ b/configs/hpux11-ia64-static
@@ -14,7 +14,7 @@ CXXFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/
MKLIB_OPTIONS = -static
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
@@ -24,4 +24,4 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lXt -lX11 -lpthread -lm -lCsup -lcl
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lXt -lX11 -lpthread -lm -lCsup -lcl
diff --git a/configs/hpux9 b/configs/hpux9
index 0373817576..ee2a84b2d0 100644
--- a/configs/hpux9
+++ b/configs/hpux9
@@ -12,5 +12,5 @@ CXX = c++
CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
CXXFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/hpux9-gcc b/configs/hpux9-gcc
index 47d579ea56..cc82a0a56c 100644
--- a/configs/hpux9-gcc
+++ b/configs/hpux9-gcc
@@ -11,4 +11,4 @@ CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/irix6-64 b/configs/irix6-64
index a794627ba9..aae6d78eae 100644
--- a/configs/irix6-64
+++ b/configs/irix6-64
@@ -12,6 +12,6 @@ CXXFLAGS = -64 -O3 -ansi -woff 1174 -DPTHREADS
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
-APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lpthread -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -64 -rpath $(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lpthread -lm
diff --git a/configs/irix6-64-static b/configs/irix6-64-static
index 8e264412b8..ea9dabcc0c 100644
--- a/configs/irix6-64-static
+++ b/configs/irix6-64-static
@@ -13,9 +13,9 @@ MKLIB_OPTIONS = -static
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
-APP_LIB_DEPS = -L$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/irix6-n32 b/configs/irix6-n32
index d42aa77484..8a7817343f 100644
--- a/configs/irix6-n32
+++ b/configs/irix6-n32
@@ -12,6 +12,6 @@ CXXFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1552 -DPTHREADS
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
-LIB_DIR = $(TOP)/lib32
+LIB_DIR = lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lpthread -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -n32 -rpath $(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lpthread -lm
diff --git a/configs/irix6-n32-static b/configs/irix6-n32-static
index 74db411216..fe47ccdcbe 100644
--- a/configs/irix6-n32-static
+++ b/configs/irix6-n32-static
@@ -13,9 +13,9 @@ MKLIB_OPTIONS = -static
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
-LIB_DIR = $(TOP)/lib32
+LIB_DIR = lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/irix6-o32 b/configs/irix6-o32
index f26c988a99..1e4c8c53ea 100644
--- a/configs/irix6-o32
+++ b/configs/irix6-o32
@@ -12,7 +12,7 @@ CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
-LIB_DIR = $(TOP)/lib32
+LIB_DIR = lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -32 -rpath $(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
diff --git a/configs/irix6-o32-static b/configs/irix6-o32-static
index 468f67489d..2d265df98c 100644
--- a/configs/irix6-o32-static
+++ b/configs/irix6-o32-static
@@ -13,9 +13,9 @@ MKLIB_OPTIONS = -static
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
-LIB_DIR = $(TOP)/lib32
+LIB_DIR = lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/linux-alpha b/configs/linux-alpha
index 507c808451..d69aabb730 100644
--- a/configs/linux-alpha
+++ b/configs/linux-alpha
@@ -12,7 +12,7 @@ CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/linux-alpha-static b/configs/linux-alpha-static
index 7b7ee07ebb..2a30af9b68 100644
--- a/configs/linux-alpha-static
+++ b/configs/linux-alpha-static
@@ -22,6 +22,6 @@ OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -L/usr/X11R6/lib -lX11 -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -L/usr/X11R6/lib -lX11 -lm
diff --git a/configs/linux-directfb b/configs/linux-directfb
index 8e20a62265..09332f4808 100644
--- a/configs/linux-directfb
+++ b/configs/linux-directfb
@@ -29,6 +29,6 @@ PROGRAM_DIRS = demos directfb
# Library/program dependencies
GL_LIB_DEPS = -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB)
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB) -l$(GLUT_LIB)
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB)
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB) -l$(GLUT_LIB)
diff --git a/configs/linux-dri-x86-64 b/configs/linux-dri-x86-64
index 23a8fc695b..4fbd0a0876 100644
--- a/configs/linux-dri-x86-64
+++ b/configs/linux-dri-x86-64
@@ -11,7 +11,7 @@ ASM_FLAGS = -DUSE_X86_64_ASM
ASM_SOURCES = $(X86-64_SOURCES)
ASM_API = $(X86-64_API)
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
diff --git a/configs/linux-glide b/configs/linux-glide
index d3e0dc32d5..0a40521e1b 100644
--- a/configs/linux-glide
+++ b/configs/linux-glide
@@ -15,6 +15,6 @@ GLUT_CFLAGS = -fexceptions
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
diff --git a/configs/linux-ia64-icc b/configs/linux-ia64-icc
index 4eeb178340..bd11897757 100644
--- a/configs/linux-ia64-icc
+++ b/configs/linux-ia64-icc
@@ -13,9 +13,9 @@ GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -arch icc-istatic
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
diff --git a/configs/linux-ia64-icc-static b/configs/linux-ia64-icc-static
index 981ad5a53d..ce8daf1d7c 100644
--- a/configs/linux-ia64-icc-static
+++ b/configs/linux-ia64-icc-static
@@ -23,5 +23,5 @@ GL_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -i-static -cxxlib-icc -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lpthread -lm -lcxa -lunwind
+APP_LIB_DEPS = -i-static -cxxlib-icc -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lpthread -lm -lcxa -lunwind
diff --git a/configs/linux-icc b/configs/linux-icc
index 1d51d6e697..978a45af70 100644
--- a/configs/linux-icc
+++ b/configs/linux-icc
@@ -13,8 +13,8 @@ GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -arch icc
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
diff --git a/configs/linux-icc-static b/configs/linux-icc-static
index 9404ae2280..0c957568c2 100644
--- a/configs/linux-icc-static
+++ b/configs/linux-icc-static
@@ -21,7 +21,7 @@ OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS =
GLUT_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -lpthread -lcxa -lunwind
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -lpthread -lcxa -lunwind
ASM_SOURCES = $(X86_SOURCES)
ASM_API = $(X86_API)
diff --git a/configs/linux-osmesa b/configs/linux-osmesa
index 72408d4fce..cc1fbbd109 100644
--- a/configs/linux-osmesa
+++ b/configs/linux-osmesa
@@ -21,5 +21,5 @@ PROGRAM_DIRS = osdemos
# Dependencies
OSMESA_LIB_DEPS = -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(OSMESA_LIB)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU
diff --git a/configs/linux-osmesa16 b/configs/linux-osmesa16
index 5e06f38d47..1fb0186d31 100644
--- a/configs/linux-osmesa16
+++ b/configs/linux-osmesa16
@@ -24,5 +24,5 @@ PROGRAM_DIRS =
# Dependencies
OSMESA_LIB_DEPS = -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(OSMESA_LIB)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa16
diff --git a/configs/linux-osmesa32 b/configs/linux-osmesa32
index 4b15eefd36..a1e5a358d6 100644
--- a/configs/linux-osmesa32
+++ b/configs/linux-osmesa32
@@ -24,5 +24,5 @@ PROGRAM_DIRS =
# Dependencies
OSMESA_LIB_DEPS = -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(OSMESA_LIB)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa32
diff --git a/configs/linux-profile b/configs/linux-profile
index 80788dc39f..75b245779a 100644
--- a/configs/linux-profile
+++ b/configs/linux-profile
@@ -16,8 +16,8 @@ GLUT_CFLAGS = -fexceptions
# Need to have -L/usr/X11R6/lib in these:
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
# Need to make static libs for profiling:
MKLIB_OPTIONS = -static
@@ -26,4 +26,4 @@ GLU_LIB_NAME = lib$(GLU_LIB).a
GLUT_LIB_NAME = lib$(GLUT_LIB).a
GLW_LIB_NAME = lib$(GLW_LIB).a
OSMESA_LIB_NAME = lib$(OSMesa).a
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
diff --git a/configs/linux-solo b/configs/linux-solo
index dead8a09a5..112cdd2864 100644
--- a/configs/linux-solo
+++ b/configs/linux-solo
@@ -28,11 +28,11 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
ASM_SOURCES =
# Library/program dependencies
-DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR)
+DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(TOP)/$(LIB_DIR)
GL_LIB_DEPS = -lm -lpthread -ldl
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
# Directories
SRC_DIRS = glx/mini mesa glu glut/mini
diff --git a/configs/linux-sparc b/configs/linux-sparc
index 15e0b6d4bb..e3bc9eb3d6 100644
--- a/configs/linux-sparc
+++ b/configs/linux-sparc
@@ -26,5 +26,5 @@ GLUT_CFLAGS = -fexceptions
EXTRA_LIB_PATH=-L/usr/X11R6/lib
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
diff --git a/configs/linux-sparc5 b/configs/linux-sparc5
index aa9461af76..b55fffcca8 100644
--- a/configs/linux-sparc5
+++ b/configs/linux-sparc5
@@ -12,6 +12,6 @@ CXXFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
diff --git a/configs/linux-ultrasparc b/configs/linux-ultrasparc
index e235b56def..cffdd7e417 100644
--- a/configs/linux-ultrasparc
+++ b/configs/linux-ultrasparc
@@ -12,6 +12,6 @@ CXXFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BS
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/linux-x86-64 b/configs/linux-x86-64
index a89c47eb93..67c0391836 100644
--- a/configs/linux-x86-64
+++ b/configs/linux-x86-64
@@ -10,5 +10,5 @@ ASM_SOURCES = $(X86-64_SOURCES)
ASM_API = $(X86-64_API)
ASM_FLAGS = -DUSE_X86_64_ASM
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
EXTRA_LIB_PATH = -L/usr/X11R6/lib64
diff --git a/configs/linux-x86-64-static b/configs/linux-x86-64-static
index d88cf54479..02574303a9 100644
--- a/configs/linux-x86-64-static
+++ b/configs/linux-x86-64-static
@@ -19,5 +19,5 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
$(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
diff --git a/configs/linux-x86-glide b/configs/linux-x86-glide
index 1397bdc015..f2f8aeea60 100644
--- a/configs/linux-x86-glide
+++ b/configs/linux-x86-glide
@@ -20,6 +20,6 @@ ASM_API = $(X86_API)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
diff --git a/configs/linux-x86-static b/configs/linux-x86-static
index c838a84012..9915987da3 100644
--- a/configs/linux-x86-static
+++ b/configs/linux-x86-static
@@ -19,5 +19,5 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
$(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
diff --git a/configs/netbsd b/configs/netbsd
index 104daae0dd..f5a61a8957 100644
--- a/configs/netbsd
+++ b/configs/netbsd
@@ -10,5 +10,5 @@ CXX = g++
CFLAGS = -O2 -fPIC -DUSE_XSHM -I/usr/X11R6/include -DHZ=100
CXXFLAGS = -O2 -fPIC
GLUT_CFLAGS = -fexceptions
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/openbsd b/configs/openbsd
index f769259a33..6ad6e2bd3d 100644
--- a/configs/openbsd
+++ b/configs/openbsd
@@ -12,7 +12,7 @@ CXXFLAGS = -O2 -fPIC -I/usr/X11R6/include -DHZ=100
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm
OSMESA_LIB_DEPS = -lm
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/osf1 b/configs/osf1
index 2d8d72fb99..88a2ecc735 100644
--- a/configs/osf1
+++ b/configs/osf1
@@ -11,6 +11,6 @@ CFLAGS = -O0 -std1 -ieee_with_no_inexact -DUSE_XSHM -DPTHREADS -D_REENTRANT
CXXFLAGS = -O2 -std ansi -ieee -DPTHREADS -D_REENTRANT
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm
diff --git a/configs/osf1-static b/configs/osf1-static
index 974718d400..e00f7ce014 100644
--- a/configs/osf1-static
+++ b/configs/osf1-static
@@ -14,4 +14,4 @@ MKLIB_OPTIONS = -static
GL_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
-APP_LIB_DEPS = -noso -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -so_archive -lX11 -lXext -lXmu -lXi -lpthread -lm -lcxx
+APP_LIB_DEPS = -noso -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -so_archive -lX11 -lXext -lXmu -lXi -lpthread -lm -lcxx
diff --git a/configs/solaris-x86 b/configs/solaris-x86
index 7a04417f0c..a5a7a63fa2 100644
--- a/configs/solaris-x86
+++ b/configs/solaris-x86
@@ -9,7 +9,7 @@ CC = cc
CFLAGS = -Xa -xO3 -xpentium -KPIC -I/usr/openwin/include -DUSE_XSHM
MKLIB_OPTIONS = -static
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm -lglut -lGLU -lGL
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm -lglut -lGLU -lGL
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/solaris-x86-gcc b/configs/solaris-x86-gcc
index 1f02ab2f51..5ec7237f99 100644
--- a/configs/solaris-x86-gcc
+++ b/configs/solaris-x86-gcc
@@ -12,6 +12,6 @@ CXXFLAGS = -O3 -march=i486 -fPIC
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXi -lXmu
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXi -lXmu
diff --git a/configs/solaris-x86-gcc-static b/configs/solaris-x86-gcc-static
index 6959ea3e25..be02735f02 100644
--- a/configs/solaris-x86-gcc-static
+++ b/configs/solaris-x86-gcc-static
@@ -13,9 +13,9 @@ GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXi -lXmu
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXi -lXmu
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/sunos4 b/configs/sunos4
index 483b9aa730..9e6627dc09 100644
--- a/configs/sunos4
+++ b/configs/sunos4
@@ -7,6 +7,6 @@ CONFIG_NAME = sunos4
# Compiler and flags
CC = acc
CFLAGS = -Kpic -O -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -lX11 -lXext -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R5 -lX11 -lXext -lXmu -lXi -lm
diff --git a/configs/sunos4-gcc b/configs/sunos4-gcc
index 8fb1414fa9..2022dd7e8e 100644
--- a/configs/sunos4-gcc
+++ b/configs/sunos4-gcc
@@ -11,5 +11,5 @@ CFLAGS = -fPIC -O3 -I/usr/openwin/include -I/usr/include/X11R5 -I/usr/include/X1
CXXFLAGS = -fPIC -O3 -I/usr/openwin/include -DSUNOS4
GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
diff --git a/configs/sunos4-static b/configs/sunos4-static
index 3e510e7514..9135fa7df6 100644
--- a/configs/sunos4-static
+++ b/configs/sunos4-static
@@ -22,4 +22,4 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm
diff --git a/configs/sunos5 b/configs/sunos5
index 9347fb842a..6dd7539c6a 100644
--- a/configs/sunos5
+++ b/configs/sunos5
@@ -12,7 +12,7 @@ CXXFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lCrun -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lCrun -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/sunos5-gcc b/configs/sunos5-gcc
index 8d6223cea8..77b293c545 100644
--- a/configs/sunos5-gcc
+++ b/configs/sunos5-gcc
@@ -32,5 +32,5 @@ GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
EXTRA_LIB_PATH=-L/usr/openwin/lib
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXi -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/sunos5-smp b/configs/sunos5-smp
index 633bced683..2740805906 100644
--- a/configs/sunos5-smp
+++ b/configs/sunos5-smp
@@ -12,8 +12,8 @@ CXXFLAGS = -KPIC -Xa -native -fast -xO5 -xlibmil -xsafe=mem -xdepend -I/usr/open
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lCrun
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lCrun
diff --git a/configs/sunos5-v8 b/configs/sunos5-v8
index cae109b58d..cdaf3eee73 100644
--- a/configs/sunos5-v8
+++ b/configs/sunos5-v8
@@ -12,7 +12,7 @@ CXXFLAGS = -xarch=v8 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREAD
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCstd -lCrun
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCstd -lCrun
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/sunos5-v8-static b/configs/sunos5-v8-static
index 3b9fcee7d7..5e428b1a58 100644
--- a/configs/sunos5-v8-static
+++ b/configs/sunos5-v8-static
@@ -13,4 +13,4 @@ CFLAGS = -xarch=v8 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM
CXXFLAGS = -xarch=v8 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -lXext -lXmu -lXi -lpthread -lm -lCstd -lCrun
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -lXext -lXmu -lXi -lpthread -lm -lCstd -lCrun
diff --git a/configs/sunos5-v9 b/configs/sunos5-v9
index 11f263a45b..ea2ab23e22 100644
--- a/configs/sunos5-v9
+++ b/configs/sunos5-v9
@@ -6,7 +6,7 @@ CONFIG_NAME = sunos5-v9
MKLIB_OPTIONS = -cplusplus
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
# Compiler and flags
CC = cc
@@ -16,8 +16,8 @@ CXXFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREAD
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCstd -lCrun
-GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCstd -lCrun
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/sunos5-v9-static b/configs/sunos5-v9-static
index 8cf4b63661..4919570c79 100644
--- a/configs/sunos5-v9-static
+++ b/configs/sunos5-v9-static
@@ -6,7 +6,7 @@ CONFIG_NAME = sunos5-v9-static
MKLIB_OPTIONS = -static -cplusplus
-LIB_DIR = $(TOP)/lib64
+LIB_DIR = lib64
# Compiler and flags
CC = cc
@@ -15,4 +15,4 @@ CFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM
CXXFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -lXext -lXmu -lXi -lpthread -lm -lCstd -lCrun
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -lXext -lXmu -lXi -lpthread -lm -lCstd -lCrun
diff --git a/configs/ultrix-gcc b/configs/ultrix-gcc
index c65e275825..5c0f22d7ae 100644
--- a/configs/ultrix-gcc
+++ b/configs/ultrix-gcc
@@ -18,4 +18,4 @@ GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
-APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXmu -lX11 -lXi -lm
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXmu -lX11 -lXi -lm