summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-07-13 02:50:27 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-07-13 02:50:27 +0000
commit883f9891cb203dd087843b830ab058d6c9e160dc (patch)
treeb1aec97f592e2ee8e2bd4c25a0123cf5ab95780b
parentd9eff8ba1943fbffb88562d84ba1fd9a56be07f0 (diff)
LIB_DIR is now just 'lib' or 'lib64'
Replaced $(LIB_DIR) with $(TOP)/$(LIB_DIR), use LIB_DIR in install targets. Patch by Hanno Böck.
-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
-rw-r--r--progs/demos/Makefile8
-rw-r--r--progs/directfb/Makefile2
-rw-r--r--progs/egl/Makefile20
-rw-r--r--progs/osdemos/Makefile8
-rw-r--r--progs/redbook/Makefile2
-rw-r--r--progs/samples/Makefile2
-rw-r--r--progs/slang/Makefile2
-rw-r--r--progs/xdemos/Makefile2
-rw-r--r--src/Makefile6
-rw-r--r--src/egl/drivers/demo/Makefile6
-rw-r--r--src/egl/drivers/dri/Makefile6
-rw-r--r--src/egl/main/Makefile6
-rw-r--r--src/glu/Makefile4
-rw-r--r--src/glu/mesa/Makefile10
-rw-r--r--src/glu/sgi/Makefile10
-rw-r--r--src/glut/beos/Makefile10
-rw-r--r--src/glut/directfb/Makefile6
-rw-r--r--src/glut/ggi/Makefile6
-rw-r--r--src/glut/glx/Makefile10
-rw-r--r--src/glut/mini/Makefile6
-rw-r--r--src/glw/Makefile10
-rw-r--r--src/glx/mini/Makefile12
-rw-r--r--src/glx/x11/Makefile10
-rw-r--r--src/mesa/Makefile20
-rw-r--r--src/mesa/drivers/beos/Makefile10
-rw-r--r--src/mesa/drivers/directfb/Makefile2
-rw-r--r--src/mesa/drivers/dri/Makefile6
-rw-r--r--src/mesa/drivers/dri/Makefile.template10
-rw-r--r--src/mesa/drivers/dri/glcore/Makefile6
95 files changed, 261 insertions, 257 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
diff --git a/progs/demos/Makefile b/progs/demos/Makefile
index 44b79c26f1..43d0f17c85 100644
--- a/progs/demos/Makefile
+++ b/progs/demos/Makefile
@@ -5,13 +5,13 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
-OSMESA_LIBS = -L$(LIB_DIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
+OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
-OSMESA16_LIBS = -L$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
+OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
-OSMESA32_LIBS = -L$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
+OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
-LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
PROGS = \
arbfplight \
diff --git a/progs/directfb/Makefile b/progs/directfb/Makefile
index a541c8ff9a..53b100a18d 100644
--- a/progs/directfb/Makefile
+++ b/progs/directfb/Makefile
@@ -6,7 +6,7 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include -I$(TOP)/progs
-LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
CFLAGS += $(shell pkg-config --cflags directfb)
APP_LIB_DEPS += $(shell pkg-config --libs directfb)
diff --git a/progs/egl/Makefile b/progs/egl/Makefile
index 41cadf97d2..33447a9d57 100644
--- a/progs/egl/Makefile
+++ b/progs/egl/Makefile
@@ -24,36 +24,36 @@ PROGRAMS = \
default: $(PROGRAMS)
-demo1: demo1.o $(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) demo1.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
+demo1: demo1.o $(TOP)/$(LIB_DIR)/libEGL.so
+ $(CC) $(CFLAGS) demo1.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
demo1.o: demo1.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo1.c
-demo2: demo2.o $(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) demo2.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
+demo2: demo2.o $(TOP)/$(LIB_DIR)/libEGL.so
+ $(CC) $(CFLAGS) demo2.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
demo2.o: demo2.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo2.c
-demo3: demo3.o $(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) demo3.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
+demo3: demo3.o $(TOP)/$(LIB_DIR)/libEGL.so
+ $(CC) $(CFLAGS) demo3.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
demo3.o: demo3.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo3.c
-eglinfo: eglinfo.o $(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) eglinfo.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
+eglinfo: eglinfo.o $(TOP)/$(LIB_DIR)/libEGL.so
+ $(CC) $(CFLAGS) eglinfo.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
eglinfo.o: eglinfo.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c
-eglgears: eglgears.o $(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) eglgears.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
+eglgears: eglgears.o $(TOP)/$(LIB_DIR)/libEGL.so
+ $(CC) $(CFLAGS) eglgears.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
eglgears.o: eglgears.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c
diff --git a/progs/osdemos/Makefile b/progs/osdemos/Makefile
index dbecfc6f54..f8cba9ee99 100644
--- a/progs/osdemos/Makefile
+++ b/progs/osdemos/Makefile
@@ -5,13 +5,13 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
-OSMESA_LIBS = -L$(LIB_DIR) -lOSMesa $(APP_LIB_DEPS)
+OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lOSMesa $(APP_LIB_DEPS)
-OSMESA16_LIBS = -L$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
+OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
-OSMESA32_LIBS = -L$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
+OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
-LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
PROGS = \
osdemo \
diff --git a/progs/redbook/Makefile b/progs/redbook/Makefile
index 4cfbb9aeac..febc74441b 100644
--- a/progs/redbook/Makefile
+++ b/progs/redbook/Makefile
@@ -5,7 +5,7 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
-LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
PROGS = aaindex aapoly aargb accanti accpersp alpha alpha3D anti \
bezcurve bezmesh checker clip colormat cube depthcue dof \
diff --git a/progs/samples/Makefile b/progs/samples/Makefile
index f14b7dfc00..063008dccf 100644
--- a/progs/samples/Makefile
+++ b/progs/samples/Makefile
@@ -5,7 +5,7 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
-LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
font line logo nurb olympic overlay point prim quad select \
diff --git a/progs/slang/Makefile b/progs/slang/Makefile
index 90debd186a..70d60594d2 100644
--- a/progs/slang/Makefile
+++ b/progs/slang/Makefile
@@ -6,7 +6,7 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
-LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
#
# targets
diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile
index 37b9504e55..4ca8b107a2 100644
--- a/progs/xdemos/Makefile
+++ b/progs/xdemos/Makefile
@@ -6,7 +6,7 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
-LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
PROGS = glthreads \
glxdemo \
diff --git a/src/Makefile b/src/Makefile
index c6082e8519..f52a06a3c9 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -7,7 +7,7 @@ include $(TOP)/configs/current
SUBDIRS = $(SRC_DIRS)
-default: message $(LIB_DIR) subdirs
+default: message $(TOP)/$(LIB_DIR) subdirs
message:
@@ -28,8 +28,8 @@ install:
fi \
done
-$(LIB_DIR):
- -mkdir $(LIB_DIR)
+$(TOP)/$(LIB_DIR):
+ -mkdir $(TOP)/$(LIB_DIR)
clean:
diff --git a/src/egl/drivers/demo/Makefile b/src/egl/drivers/demo/Makefile
index fd587b79e2..5c05633df5 100644
--- a/src/egl/drivers/demo/Makefile
+++ b/src/egl/drivers/demo/Makefile
@@ -17,12 +17,12 @@ OBJECTS = $(SOURCES:.c=.o)
-default: $(LIB_DIR)/demodriver.so
+default: $(TOP)/$(LIB_DIR)/demodriver.so
-$(LIB_DIR)/demodriver.so: $(OBJECTS)
+$(TOP)/$(LIB_DIR)/demodriver.so: $(OBJECTS)
$(TOP)/bin/mklib -o demodriver.so -noprefix \
- -install $(LIB_DIR) $(OBJECTS)
+ -install $(TOP)/$(LIB_DIR) $(OBJECTS)
diff --git a/src/egl/drivers/dri/Makefile b/src/egl/drivers/dri/Makefile
index 86f189cd38..cb11971c64 100644
--- a/src/egl/drivers/dri/Makefile
+++ b/src/egl/drivers/dri/Makefile
@@ -39,11 +39,11 @@ default: depend library Makefile
# EGLdri Library
-library: $(LIB_DIR)/libEGLdri.so
+library: $(TOP)/$(LIB_DIR)/libEGLdri.so
-$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
+$(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
$(TOP)/bin/mklib -o EGLdri -major 1 -minor 0 \
- -install $(LIB_DIR) -ldl $(OBJECTS)
+ -install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
clean:
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
index 45a4fb39b8..431eda4197 100644
--- a/src/egl/main/Makefile
+++ b/src/egl/main/Makefile
@@ -43,11 +43,11 @@ default: depend library
# EGL Library
-library: $(LIB_DIR)/libEGL.so
+library: $(TOP)/$(LIB_DIR)/libEGL.so
-$(LIB_DIR)/libEGL.so: $(OBJECTS)
+$(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
$(TOP)/bin/mklib -o EGL -major 1 -minor 0 \
- -install $(LIB_DIR) -ldl $(OBJECTS)
+ -install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
diff --git a/src/glu/Makefile b/src/glu/Makefile
index a7b8e2b724..ca9ad39442 100644
--- a/src/glu/Makefile
+++ b/src/glu/Makefile
@@ -14,8 +14,8 @@ default: $(TOP)/configs/current
done
install:
- $(INSTALL) -d $(INSTALL_DIR)/lib
- $(COPY_LIBS) $(LIB_DIR)/libGLU.* $(INSTALL_DIR)/lib
+ $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
+ $(COPY_LIBS) $(TOP)/$(LIB_DIR)/libGLU.* $(INSTALL_DIR)/$(LIB_DIR)
clean:
@for dir in $(SUBDIRS) ; do \
diff --git a/src/glu/mesa/Makefile b/src/glu/mesa/Makefile
index 69a4ea88cf..47f95ef024 100644
--- a/src/glu/mesa/Makefile
+++ b/src/glu/mesa/Makefile
@@ -37,17 +37,17 @@ default:
echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \
exit 0 ; \
else \
- $(MAKE) "${LIB_DIR}/${GLU_LIB_NAME}" ; \
+ $(MAKE) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) ; \
fi
-$(LIB_DIR):
- -mkdir $(LIB_DIR)
+$(TOP)/$(LIB_DIR):
+ -mkdir $(TOP)/$(LIB_DIR)
# Make the library:
-$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
@ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
- $(MKLIB_OPTIONS) -install $(LIB_DIR) \
+ $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)
clean:
diff --git a/src/glu/sgi/Makefile b/src/glu/sgi/Makefile
index 46dafe999e..2ce6ac0430 100644
--- a/src/glu/sgi/Makefile
+++ b/src/glu/sgi/Makefile
@@ -128,17 +128,17 @@ default:
echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \
exit 0 ; \
else \
- $(MAKE) "${LIB_DIR}/${GLU_LIB_NAME}" ; \
+ $(MAKE) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) ; \
fi
-$(LIB_DIR):
- -mkdir $(LIB_DIR)
+$(TOP)/$(LIB_DIR):
+ -mkdir $(TOP)/$(LIB_DIR)
# Make the library:
-$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
$(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
- -cplusplus $(MKLIB_OPTIONS) -install $(LIB_DIR) \
+ -cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)
diff --git a/src/glut/beos/Makefile b/src/glut/beos/Makefile
index d9cf32565c..3ff928bfd7 100644
--- a/src/glut/beos/Makefile
+++ b/src/glut/beos/Makefile
@@ -75,16 +75,16 @@ INCLUDES = \
# ---- TARGETS
-default: $(LIB_DIR) $(LIB_DIR)/$(GLUT_LIB_NAME)
+default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Create the lib directory if missing
-$(LIB_DIR):
- mkdir $(LIB_DIR)
+$(TOP)/$(LIB_DIR):
+ mkdir $(TOP)/$(LIB_DIR)
# Make the library
-$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
@$(TOP)/bin/mklib -o $(GLUT_LIB) -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
- -install $(LIB_DIR) $(MKLIB_OPTIONS) $(GLUT_LIB_DEPS) \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(GLUT_LIB_DEPS) \
$(OBJECTS)
clean:
diff --git a/src/glut/directfb/Makefile b/src/glut/directfb/Makefile
index 9e3caaa5c2..3791b16df8 100644
--- a/src/glut/directfb/Makefile
+++ b/src/glut/directfb/Makefile
@@ -56,14 +56,14 @@ OBJECTS = $(SOURCES:.c=.o)
##### TARGETS #####
-default: depend $(LIB_DIR)/$(GLUT_LIB_NAME)
+default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
-$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
- $(GLUT_LIB_DEPS) -install $(LIB_DIR) \
+ $(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
diff --git a/src/glut/ggi/Makefile b/src/glut/ggi/Makefile
index 61cfceeb25..1bef6c23a3 100644
--- a/src/glut/ggi/Makefile
+++ b/src/glut/ggi/Makefile
@@ -27,14 +27,14 @@ OBJECTS = $(SOURCES:.c=.o)
##### TARGETS #####
-default: $(LIB_DIR)/$(GLUT_LIB_NAME)
+default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
-$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
- -patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
+ -patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLUT_LIB_DEPS) $(OBJECTS)
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 534d7a7ad5..6fac92fa0c 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -85,22 +85,22 @@ OBJECTS = $(SOURCES:.c=.o)
##### TARGETS #####
-default: $(LIB_DIR)/$(GLUT_LIB_NAME)
+default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
-$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
- $(MKLIB_OPTIONS) -install $(LIB_DIR) \
+ $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLUT_LIB_DEPS) $(OBJECTS)
install:
$(INSTALL) -d $(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(INSTALL_DIR)/lib
+ $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(INSTALL_DIR)/include/GL
- $(COPY_LIBS) $(LIB_DIR)/libglut* $(INSTALL_DIR)/lib
+ $(COPY_LIBS) $(TOP)/$(LIB_DIR)/libglut* $(INSTALL_DIR)/$(LIB_DIR)
clean:
diff --git a/src/glut/mini/Makefile b/src/glut/mini/Makefile
index cb82384941..177bfe2d2b 100644
--- a/src/glut/mini/Makefile
+++ b/src/glut/mini/Makefile
@@ -50,14 +50,14 @@ OBJECTS = $(SOURCES:.c=.o)
##### TARGETS #####
-default: depend $(LIB_DIR)/$(GLUT_LIB_NAME)
+default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
-$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
- $(GLUT_LIB_DEPS) -install $(LIB_DIR) \
+ $(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
diff --git a/src/glw/Makefile b/src/glw/Makefile
index dbe64c9566..356351a1ce 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -23,13 +23,13 @@ OBJECTS = $(GLW_SOURCES:.c=.o)
##### TARGETS #####
-default: $(LIB_DIR)/$(GLW_LIB_NAME)
+default: $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME)
install:
$(INSTALL) -d $(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(INSTALL_DIR)/lib
+ $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 *.h $(INSTALL_DIR)/include/GL
- $(COPY_LIBS) $(LIB_DIR)/libGLw.* $(INSTALL_DIR)/lib
+ $(COPY_LIBS) $(TOP)/$(LIB_DIR)/libGLw.* $(INSTALL_DIR)/$(LIB_DIR)
clean:
-rm depend depend.bak
@@ -37,10 +37,10 @@ clean:
# Make the library
-$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
$(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' \
-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
- $(MKLIB_OPTIONS) -install $(LIB_DIR) \
+ $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLW_LIB_DEPS) $(OBJECTS)
diff --git a/src/glx/mini/Makefile b/src/glx/mini/Makefile
index 9503192274..217b8a76ec 100644
--- a/src/glx/mini/Makefile
+++ b/src/glx/mini/Makefile
@@ -46,16 +46,16 @@ INCLUDE_DIRS = \
##### TARGETS #####
-default: depend $(LIB_DIR)/$(GL_LIB_NAME)
+default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
# Make libGL
-$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
+$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
- -install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS) `/usr/bin/pkg-config --libs libdrm` `/usr/bin/pkg-config --libs pciaccess`
- rm -f $(LIB_DIR)/miniglx.conf
- install example.miniglx.conf $(LIB_DIR)/miniglx.conf
+ -install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS) `/usr/bin/pkg-config --libs libdrm` `/usr/bin/pkg-config --libs pciaccess`
+ rm -f $(TOP)/$(LIB_DIR)/miniglx.conf
+ install example.miniglx.conf $(TOP)/$(LIB_DIR)/miniglx.conf
drmtest: xf86drm.o drmtest.o
@@ -75,7 +75,7 @@ tags:
# Remove .o and backup files
clean:
- -rm -f drmtest $(LIB_DIR)/libGL.so*
+ -rm -f drmtest $(TOP)/$(LIB_DIR)/libGL.so*
-rm -f *.o *~
-rm -f depend
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
index b33a84e94b..3ecb744179 100644
--- a/src/glx/x11/Makefile
+++ b/src/glx/x11/Makefile
@@ -2,7 +2,7 @@ TOP = ../../..
include $(TOP)/configs/current
EXTRA_DEFINES = -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER \
- -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_INSTALL_DIR)\"
+ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
SOURCES = \
glcontextmodes.c \
@@ -61,16 +61,16 @@ INCLUDES = -I. \
##### TARGETS #####
-default: depend $(LIB_DIR)/$(GL_LIB_NAME)
+default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
glcontextmodes.c:
ln -s $(TOP)/src/mesa/drivers/dri/common/glcontextmodes.c .
# Make libGL
-$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
+$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
- -install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
+ -install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_ASM_API) Makefile
@@ -88,7 +88,7 @@ install:
# Remove .o and backup files
clean:
- -rm -f $(LIB_DIR)/libGL.so*
+ -rm -f $(TOP)/$(LIB_DIR)/libGL.so*
-rm -f *.o *~
-rm -f depend
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 652cb44907..bf600e0578 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -66,7 +66,7 @@ linux-solo: depend subdirs libmesa.a
libgl-core: $(CORE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
- -install $(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) $(GL_LIB_DEPS)
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) $(GL_LIB_DEPS)
directfb: depend subdirs libgl-core
cd drivers/directfb; $(MAKE)
@@ -96,30 +96,30 @@ OSMESA16_OBJECTS = \
$(OSMESA_DRIVER_OBJECTS)
-stand-alone: depend subdirs $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(OSMESA_LIB_NAME)
+stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
-osmesa-only: depend subdirs $(LIB_DIR)/$(OSMESA_LIB_NAME)
+osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
# Make the GL library
-$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
+$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
- -install $(LIB_DIR) \
+ -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
# Make the OSMesa library
-$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
+$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) \
-minor $(MESA_MINOR) -patch $(MESA_TINY) \
- -install $(LIB_DIR) $(MKLIB_OPTIONS) \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
else \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) \
-minor $(MESA_MINOR) -patch $(GL_TINY) \
- -install $(LIB_DIR) $(MKLIB_OPTIONS) \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
fi
@@ -150,9 +150,9 @@ subdirs:
install: default
$(INSTALL) -d $(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(INSTALL_DIR)/lib
+ $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
- $(COPY_LIBS) $(LIB_DIR)/libGL.* $(INSTALL_DIR)/lib
+ $(COPY_LIBS) $(TOP)/$(LIB_DIR)/libGL.* $(INSTALL_DIR)/$(LIB_DIR)
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
cd drivers/dri ; $(MAKE) install ; \
fi
diff --git a/src/mesa/drivers/beos/Makefile b/src/mesa/drivers/beos/Makefile
index 41aa3a65c1..1897d6aa3e 100644
--- a/src/mesa/drivers/beos/Makefile
+++ b/src/mesa/drivers/beos/Makefile
@@ -167,7 +167,7 @@ OBJECTS := $(DRIVER_OBJECTS:.cpp=.o)
$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
-default: depend $(LIB_DIR) $(LIB_DIR)/$(GL_LIB_NAME)
+default: depend $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
$(MESA_MODULES):
cd $(TOP)/src/mesa; $(MAKE) mesa.a ;
@@ -175,11 +175,11 @@ $(MESA_MODULES):
$(GLU_MODULES):
cd $(GLU_DIR); $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ;
-$(LIB_DIR):
- mkdir $(LIB_DIR)
+$(TOP)/$(LIB_DIR):
+ mkdir $(TOP)/$(LIB_DIR)
-$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
- @$(TOP)/bin/mklib -o $(GL_LIB) -install $(LIB_DIR) -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
+$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
+ @$(TOP)/bin/mklib -o $(GL_LIB) -install $(TOP)/$(LIB_DIR) -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
# $(GLU_OBJECTS):
diff --git a/src/mesa/drivers/directfb/Makefile b/src/mesa/drivers/directfb/Makefile
index 2184b1e3cc..c515785b2a 100644
--- a/src/mesa/drivers/directfb/Makefile
+++ b/src/mesa/drivers/directfb/Makefile
@@ -34,7 +34,7 @@ default: directfbgl_mesa
# Mesa DirectFBGL module
directfbgl_mesa: $(DIRECTFBGL_MESA_OBJECTS)
$(CC) -shared $(CFLAGS) $(DIRECTFBGL_MESA_OBJECTS) -o $(DIRECTFBGL_MESA) \
- -Wl,-soname -Wl,$(DIRECTFBGL_MESA) -L$(LIB_DIR) -lGL -lm
+ -Wl,-soname -Wl,$(DIRECTFBGL_MESA) -L$(TOP)/$(LIB_DIR) -lGL -lm
install:
diff --git a/src/mesa/drivers/dri/Makefile b/src/mesa/drivers/dri/Makefile
index a49de0f0fa..1db878bab7 100644
--- a/src/mesa/drivers/dri/Makefile
+++ b/src/mesa/drivers/dri/Makefile
@@ -6,11 +6,11 @@ include $(TOP)/configs/current
-default: $(LIB_DIR) subdirs
+default: $(TOP)/$(LIB_DIR) subdirs
-$(LIB_DIR):
- -mkdir $(LIB_DIR)
+$(TOP)/$(LIB_DIR):
+ -mkdir $(TOP)/$(LIB_DIR)
subdirs:
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index e802dd545e..58912730fd 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -62,12 +62,12 @@ SHARED_INCLUDES = \
##### TARGETS #####
-default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME)
+default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
-#$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
+#$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
# @echo BUILDING FOR: $(WINDOW_SYSTEM)
-# $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
+# $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(TOP)/$(LIB_DIR) \
# $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
@@ -75,8 +75,8 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/driver
$(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
-$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
- $(INSTALL) $(LIBNAME) $(LIB_DIR)
+$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
+ $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)
diff --git a/src/mesa/drivers/dri/glcore/Makefile b/src/mesa/drivers/dri/glcore/Makefile
index 744b528c35..a9e96970fa 100644
--- a/src/mesa/drivers/dri/glcore/Makefile
+++ b/src/mesa/drivers/dri/glcore/Makefile
@@ -57,11 +57,11 @@ OBJECTS = $(C_SOURCES:.c=.o) \
##### TARGETS #####
-default: depend $(LIB_DIR)/$(LIBNAME)
+default: depend $(TOP)/$(LIB_DIR)/$(LIBNAME)
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
- CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
+$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
+ CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(TOP)/$(LIB_DIR) \
$(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES)