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
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
# 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
# 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
# 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
# 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
# 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
$(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 \
-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)
../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)