summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2005-08-19 20:20:03 +0000
committerAdam Jackson <[email protected]>2005-08-19 20:20:03 +0000
commit8fcd1e028750ec7669aa311dfd63d86767097feb (patch)
tree94877d24574a9fc54d85579bcd5834a64ef436ce
parent2ae5645115124ecc97bf4a0ba9f5542cf2409845 (diff)
Convert libGL and DRI drivers to require libdrm.
libdrm can be had from: http://people.freedesktop.org/~ajax/libdrm/
-rw-r--r--configs/default2
-rw-r--r--configs/freebsd-dri7
-rw-r--r--configs/linux-dri8
-rw-r--r--configs/linux-dri-ppc2
-rw-r--r--configs/linux-dri-x86-642
-rw-r--r--src/glx/x11/Makefile7
-rw-r--r--src/mesa/drivers/dri/Makefile.template5
7 files changed, 15 insertions, 18 deletions
diff --git a/configs/default b/configs/default
index edc76182e58..45efc810edc 100644
--- a/configs/default
+++ b/configs/default
@@ -10,7 +10,7 @@ MESA_MAJOR=6
MESA_MINOR=3
MESA_TINY=2
-# external projects
+# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
# Compiler and flags
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index b68d3cb15ca..dd6e6143e18 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -22,8 +22,9 @@ CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
ASM_SOURCES =
# Library/program dependencies
-DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat
-GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
+LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
+DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
+GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -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
@@ -39,6 +40,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
# ffb and gamma are missing because they have not been converted to use the new
# interface.
-DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
+DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis
diff --git a/configs/linux-dri b/configs/linux-dri
index 9817a0e762d..293f2e789d5 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -38,8 +38,10 @@ ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
-DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
-GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
+LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
+DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
+ $(LIBDRM_LIB)
# This is now 0 by default since it seems to confuse the hell out of people
@@ -62,5 +64,5 @@ WINDOW_SYSTEM=dri
# gamma are missing because they have not been converted to use the new
# interface.
-DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 r300 radeon s3v \
+DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon s3v \
savage sis tdfx trident unichrome ffb
diff --git a/configs/linux-dri-ppc b/configs/linux-dri-ppc
index ab9265cc7a1..fb87688065f 100644
--- a/configs/linux-dri-ppc
+++ b/configs/linux-dri-ppc
@@ -13,5 +13,5 @@ ASM_SOURCES = $(PPC_SOURCES)
# Build only the drivers for cards that exist on PowerPC. At some point MGA
# will be added, but not yet.
-DRI_DIRS = dri_client mach64 r128 r200 r300 radeon tdfx
+DRI_DIRS = mach64 r128 r200 r300 radeon tdfx
diff --git a/configs/linux-dri-x86-64 b/configs/linux-dri-x86-64
index 1d758d8967e..affbe2bc612 100644
--- a/configs/linux-dri-x86-64
+++ b/configs/linux-dri-x86-64
@@ -19,5 +19,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64
# the new interface. i810 and i830 are missing because there is no x86-64
# system where they could *ever* be used.
#
-DRI_DIRS = dri_client i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300
+DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
index 7cfd180e786..415ec02dd6b 100644
--- a/src/glx/x11/Makefile
+++ b/src/glx/x11/Makefile
@@ -8,10 +8,6 @@ C_SOURCES = \
$(TOP)/src/mesa/glapi/glthread.c \
$(TOP)/src/mesa/main/dispatch.c \
glcontextmodes.c \
- $(DRM_SOURCE_PATH)/libdrm/xf86drm.c \
- $(DRM_SOURCE_PATH)/libdrm/xf86drmHash.c \
- $(DRM_SOURCE_PATH)/libdrm/xf86drmRandom.c \
- $(DRM_SOURCE_PATH)/libdrm/xf86drmSL.c \
clientattrib.c \
compsize.c \
eval.c \
@@ -53,8 +49,7 @@ INCLUDES = -I. \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
-I$(TOP)/src/mesa/drivers/dri/common \
- -I$(DRM_SOURCE_PATH)/libdrm \
- -I$(DRM_SOURCE_PATH)/shared-core \
+ `pkg-config --cflags libdrm` \
$(X11_INCLUDES)
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index 7c21137ab69..9e22f9e82ec 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -13,11 +13,10 @@ COMMON_SOURCES = \
../common/drirenderbuffer.c
ifeq ($(WINDOW_SYSTEM),dri)
-WINOBJ=../dri_client/dri.a
+WINOBJ=
WINLIB=
INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES) \
- -I../dri_client \
- -I../dri_client/imports
+ `pkg-config --cflags libdrm`
OBJECTS = $(C_SOURCES:.c=.o) \
$(ASM_SOURCES:.S=.o)