summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/aix10
-rw-r--r--configs/aix-gcc6
-rw-r--r--configs/beos6
-rw-r--r--configs/darwin2
-rw-r--r--configs/darwin-static2
-rw-r--r--configs/default10
-rw-r--r--configs/hpux10-static4
-rw-r--r--configs/irix6-642
-rw-r--r--configs/irix6-64-static2
-rw-r--r--configs/irix6-n322
-rw-r--r--configs/irix6-n32-static2
-rw-r--r--configs/irix6-o322
-rw-r--r--configs/irix6-o32-static2
-rw-r--r--configs/linux8
-rw-r--r--configs/linux-alpha7
-rw-r--r--configs/linux-alpha-static7
-rw-r--r--configs/linux-debug8
-rw-r--r--configs/linux-dri4
-rw-r--r--configs/linux-dri-x864
-rw-r--r--configs/linux-dri-x86-644
-rw-r--r--configs/linux-glide8
-rw-r--r--configs/linux-icc5
-rw-r--r--configs/linux-icc-static5
-rw-r--r--configs/linux-ppc7
-rw-r--r--configs/linux-ppc-static7
-rw-r--r--configs/linux-solo6
-rw-r--r--configs/linux-solo-ia645
-rw-r--r--configs/linux-solo-x865
-rw-r--r--configs/linux-sparc6
-rw-r--r--configs/linux-sparc56
-rw-r--r--configs/linux-static2
-rw-r--r--configs/linux-tcc9
-rw-r--r--configs/linux-ultrasparc7
-rw-r--r--configs/linux-x868
-rw-r--r--configs/linux-x86-648
-rw-r--r--configs/linux-x86-64-static2
-rw-r--r--configs/linux-x86-glide8
-rw-r--r--configs/linux-x86-static2
-rw-r--r--configs/openbsd6
-rw-r--r--configs/osf14
-rw-r--r--configs/solaris-x86-gcc6
-rw-r--r--configs/sunos4-static2
-rw-r--r--configs/sunos58
-rw-r--r--configs/sunos5-gcc8
-rw-r--r--configs/sunos5-smp8
-rw-r--r--configs/ultrix-gcc2
46 files changed, 108 insertions, 136 deletions
diff --git a/configs/aix b/configs/aix
index 1335f409df..fe8e48cd65 100644
--- a/configs/aix
+++ b/configs/aix
@@ -20,9 +20,9 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -lX11 -lXext -lm
-GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm -lC
-GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -lXi -lXmu -lX11 -lm
-GLW_LIB_DEPS = -L$(TOP)/lib -lGL -lXt -lX11
-OSMESA_LIB_DEPS = -L$(TOP)/lib -lGL
-APP_LIB_DEPS = -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm -lC
+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
diff --git a/configs/aix-gcc b/configs/aix-gcc
index 5f9bbe2f00..5f10bf25dc 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) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR -lGLU -lGL -lXi -lXmu
-APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -lglut -lGLU -lGL -lm -lX11 -lXext -lXmu -lXi
+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
diff --git a/configs/beos b/configs/beos
index 1e777e47dd..1d2eaa9599 100644
--- a/configs/beos
+++ b/configs/beos
@@ -92,8 +92,8 @@ PROGRAM_DIRS = beos samples redbook demos tests
# Library/program dependencies
GL_LIB_DEPS =
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
+OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS =
-GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -lGL
-APP_LIB_DEPS = -lbe -L$(LIB_DIR) -lGL -lglut
+GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -l$(GL_LIB)
+APP_LIB_DEPS = -lbe -L$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
diff --git a/configs/darwin b/configs/darwin
index c09b7eac28..aece55d6da 100644
--- a/configs/darwin
+++ b/configs/darwin
@@ -22,4 +22,4 @@ OSMESA_LIB_DEPS = $(TOP)/lib/GL.dylib
GLU_LIB_DEPS = $(TOP)/lib/GL.dylib
GLUT_LIB_DEPS =
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
-APP_LIB_DEPS = -L$(TOP)/lib -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+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-static b/configs/darwin-static
index b767e176aa..c7f9c5f06b 100644
--- a/configs/darwin-static
+++ b/configs/darwin-static
@@ -21,4 +21,4 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(TOP)/lib -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+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 ece16572d6..1ed4844e90 100644
--- a/configs/default
+++ b/configs/default
@@ -61,8 +61,8 @@ PROGRAM_DIRS = demos redbook samples xdemos
# Library/program dependencies
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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) -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/hpux10-static b/configs/hpux10-static
index 37a6801e22..38a1313e69 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) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++
+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++
diff --git a/configs/irix6-64 b/configs/irix6-64
index c4c8d92ab9..6c33d33ba9 100644
--- a/configs/irix6-64
+++ b/configs/irix6-64
@@ -15,4 +15,4 @@ GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = $(TOP)/lib64
-APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -lglut -lGLU -lGL -lX11 -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
diff --git a/configs/irix6-64-static b/configs/irix6-64-static
index 79c1f90aca..d66af5be87 100644
--- a/configs/irix6-64-static
+++ b/configs/irix6-64-static
@@ -15,7 +15,7 @@ GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = $(TOP)/lib64
-APP_LIB_DEPS = -L$(LIB_DIR) -64 -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/irix6-n32 b/configs/irix6-n32
index 5af15f51a8..4bf2964014 100644
--- a/configs/irix6-n32
+++ b/configs/irix6-n32
@@ -15,4 +15,4 @@ GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = $(TOP)/lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -lglut -lGLU -lGL -lX11 -lXmu -lXi -lfpe -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lm
diff --git a/configs/irix6-n32-static b/configs/irix6-n32-static
index 91f73f5645..b60de380c6 100644
--- a/configs/irix6-n32-static
+++ b/configs/irix6-n32-static
@@ -15,7 +15,7 @@ GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = $(TOP)/lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/irix6-o32 b/configs/irix6-o32
index 5dd5f0ac70..56a1979603 100644
--- a/configs/irix6-o32
+++ b/configs/irix6-o32
@@ -15,5 +15,5 @@ GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = $(TOP)/lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -32 -rpath $(LIB_DIR) -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -32 -rpath $(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 f1d88305be..ac3d6ee17a 100644
--- a/configs/irix6-o32-static
+++ b/configs/irix6-o32-static
@@ -15,7 +15,7 @@ GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = $(TOP)/lib32
-APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/linux b/configs/linux
index 3504d6b424..478947864b 100644
--- a/configs/linux
+++ b/configs/linux
@@ -14,9 +14,7 @@ GLUT_CFLAGS = -fexceptions
# Library/program dependencies
+# Need to have -L/usr/X11R6/lib in these:
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 -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-alpha b/configs/linux-alpha
index 7c151a69a2..507c808451 100644
--- a/configs/linux-alpha
+++ b/configs/linux-alpha
@@ -12,8 +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
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-alpha-static b/configs/linux-alpha-static
index efeb708607..7b7ee07ebb 100644
--- a/configs/linux-alpha-static
+++ b/configs/linux-alpha-static
@@ -22,7 +22,6 @@ OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm -L/usr/X11R6/lib -lX11 -lm
+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
diff --git a/configs/linux-debug b/configs/linux-debug
index 6dad6a3237..260f172e81 100644
--- a/configs/linux-debug
+++ b/configs/linux-debug
@@ -14,9 +14,7 @@ CXXFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-ma
GLUT_CFLAGS = -fexceptions
+# Need to have -L/usr/X11R6/lib in these:
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 -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -lXt -L/usr/X11R6/lib -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-dri b/configs/linux-dri
index 10b318c9eb..ac031d594e 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -20,8 +20,8 @@ ASM_SOURCES =
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
+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
# Directories
diff --git a/configs/linux-dri-x86 b/configs/linux-dri-x86
index 83dbe4d9bc..04fadb3691 100644
--- a/configs/linux-dri-x86
+++ b/configs/linux-dri-x86
@@ -18,8 +18,8 @@ ASM_SOURCES = $(X86_SOURCES)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
+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
# Directories
diff --git a/configs/linux-dri-x86-64 b/configs/linux-dri-x86-64
index dbb3d84d2d..1944e2784d 100644
--- a/configs/linux-dri-x86-64
+++ b/configs/linux-dri-x86-64
@@ -19,8 +19,8 @@ LIB_DIR = $(TOP)/lib64
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread -lexpat -ldl
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib64 -lXt -lX11
+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
# Directories
SRC_DIRS = mesa glu glut/glx glw
diff --git a/configs/linux-glide b/configs/linux-glide
index f7f1af834c..d3e0dc32d5 100644
--- a/configs/linux-glide
+++ b/configs/linux-glide
@@ -15,8 +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
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/local/glide/lib -lglide3x -lm
+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
diff --git a/configs/linux-icc b/configs/linux-icc
index 2b9d609029..0da3b836a7 100644
--- a/configs/linux-icc
+++ b/configs/linux-icc
@@ -13,9 +13,8 @@ GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -arch icc
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
diff --git a/configs/linux-icc-static b/configs/linux-icc-static
index e06c27f604..5c65f05618 100644
--- a/configs/linux-icc-static
+++ b/configs/linux-icc-static
@@ -20,9 +20,8 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
+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) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
MKLIB_OPTIONS = -arch icc
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
diff --git a/configs/linux-ppc b/configs/linux-ppc
index 3af3e39d24..319ae2a017 100644
--- a/configs/linux-ppc
+++ b/configs/linux-ppc
@@ -12,8 +12,7 @@ CXXFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funrol
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-ppc-static b/configs/linux-ppc-static
index f65c015e30..31e9000782 100644
--- a/configs/linux-ppc-static
+++ b/configs/linux-ppc-static
@@ -21,7 +21,6 @@ OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
+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/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
diff --git a/configs/linux-solo b/configs/linux-solo
index 387f764f37..a2c9dc0671 100644
--- a/configs/linux-solo
+++ b/configs/linux-solo
@@ -19,9 +19,9 @@ ASM_SOURCES = $(X86_SOURCES)
# Library/program dependencies
GL_LIB_DEPS = -lm -lpthread -lexpat -ldl
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm -lpthread
+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
# Directories
SRC_DIRS = mesa glx glu glut/mini
diff --git a/configs/linux-solo-ia64 b/configs/linux-solo-ia64
index dac4e62277..71ba82b512 100644
--- a/configs/linux-solo-ia64
+++ b/configs/linux-solo-ia64
@@ -17,9 +17,8 @@ CXXFLAGS = $(CCOMMON) -Wall -O3 -ansi -pedantic -fPIC
# Library/program dependencies
GL_LIB_DEPS = -lm -lpthread -lexpat -ldl
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm -lpthread
+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
# Directories
SRC_DIRS = mesa glx glu glut/mini
diff --git a/configs/linux-solo-x86 b/configs/linux-solo-x86
index ad1140aafa..5ab2b9f151 100644
--- a/configs/linux-solo-x86
+++ b/configs/linux-solo-x86
@@ -19,9 +19,8 @@ ASM_SOURCES = $(X86_SOURCES)
# Library/program dependencies
GL_LIB_DEPS = -lm -lpthread -lexpat -ldl
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm -lpthread
+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
# Directories
SRC_DIRS = mesa glx glu glut/mini
diff --git a/configs/linux-sparc b/configs/linux-sparc
index 3d28242f44..564c5ba7f6 100644
--- a/configs/linux-sparc
+++ b/configs/linux-sparc
@@ -12,7 +12,5 @@ CXXFLAGS = -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-sparc5 b/configs/linux-sparc5
index 60e65ab309..aa9461af76 100644
--- a/configs/linux-sparc5
+++ b/configs/linux-sparc5
@@ -12,8 +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
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-static b/configs/linux-static
index 82177b23b6..3b152e8c43 100644
--- a/configs/linux-static
+++ b/configs/linux-static
@@ -27,4 +27,4 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -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/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
diff --git a/configs/linux-tcc b/configs/linux-tcc
index 4cfd5534ce..57afb746a5 100644
--- a/configs/linux-tcc
+++ b/configs/linux-tcc
@@ -17,9 +17,6 @@ CXXFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-ma
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L$(TCC_DIR) -ltcc -ldl
-
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -lXt -L/usr/X11R6/lib -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/linux-ultrasparc b/configs/linux-ultrasparc
index 8a1c47773d..e235b56def 100644
--- a/configs/linux-ultrasparc
+++ b/configs/linux-ultrasparc
@@ -12,7 +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
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR)-lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-x86 b/configs/linux-x86
index 830fcff356..3cfee035d0 100644
--- a/configs/linux-x86
+++ b/configs/linux-x86
@@ -19,8 +19,6 @@ ASM_SOURCES = $(X86_SOURCES) $(X86_API)
# Library/program dependencies
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 -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+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
diff --git a/configs/linux-x86-64 b/configs/linux-x86-64
index 032f10adc5..e3f58e6921 100644
--- a/configs/linux-x86-64
+++ b/configs/linux-x86-64
@@ -23,8 +23,6 @@ LIB_DIR = $(TOP)/lib64
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib64 -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/configs/linux-x86-64-static b/configs/linux-x86-64-static
index 9110462306..500b818c86 100644
--- a/configs/linux-x86-64-static
+++ b/configs/linux-x86-64-static
@@ -37,4 +37,4 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib64 -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/X11R6/lib64 -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
diff --git a/configs/linux-x86-glide b/configs/linux-x86-glide
index d5d4ee1b45..b874b923ff 100644
--- a/configs/linux-x86-glide
+++ b/configs/linux-x86-glide
@@ -19,8 +19,6 @@ ASM_SOURCES = $(X86_SOURCES) $(X86_API)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
-OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/local/glide/lib -lglide3x -lm
+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
diff --git a/configs/linux-x86-static b/configs/linux-x86-static
index a73e381211..01575f777b 100644
--- a/configs/linux-x86-static
+++ b/configs/linux-x86-static
@@ -34,4 +34,4 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
-APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -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/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
diff --git a/configs/openbsd b/configs/openbsd
index 94be39f216..f769259a33 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) -lGL
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lglut -lGLU -lGL -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
diff --git a/configs/osf1 b/configs/osf1
index d8b3044dd1..a738b2771d 100644
--- a/configs/osf1
+++ b/configs/osf1
@@ -11,8 +11,8 @@ CFLAGS = -O0 -std1 -ieee_with_no_inexact -DUSE_XSHM
CXXFLAGS = -O2 -std ansi -ieee
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
+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) -lX11 -lXext -lXmu -lXi -lm
diff --git a/configs/solaris-x86-gcc b/configs/solaris-x86-gcc
index 225d012b01..01f3d86d1d 100644
--- a/configs/solaris-x86-gcc
+++ b/configs/solaris-x86-gcc
@@ -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) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -lglut -lGLU -lGL -lm
+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
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/sunos4-static b/configs/sunos4-static
index 63a82e5c96..3e510e7514 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) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm
+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
diff --git a/configs/sunos5 b/configs/sunos5
index 38d3efe9d8..9347fb842a 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) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/openwin/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lCrun -lX11 -lglut -lGLU -lGL -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
diff --git a/configs/sunos5-gcc b/configs/sunos5-gcc
index 147f69dbcb..ba32c7e2d0 100644
--- a/configs/sunos5-gcc
+++ b/configs/sunos5-gcc
@@ -14,8 +14,8 @@ CXXFLAGS = -O3 -I/usr/openwin/include -fPIC -fomit-frame-pointer -D_REENTRANT -D
GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
-GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/openwin/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lglut -lGLU -lGL -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
diff --git a/configs/sunos5-smp b/configs/sunos5-smp
index f0f2ae9a10..633bced683 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) -lGL -lm
-GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
-GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/openwin/lib -lXt -lX11
-APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lglut -lGLU -lGL -lm -lCrun
+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
diff --git a/configs/ultrix-gcc b/configs/ultrix-gcc
index bf0fa5e7f4..c65e275825 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) -lglut -lGLU -lGL -lXmu -lX11 -lXi -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXmu -lX11 -lXi -lm