2004-04-14 13:44:07 +01:00
|
|
|
# -*-makefile-*-
|
|
|
|
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
|
|
|
|
|
|
|
|
include $(TOP)/configs/default
|
|
|
|
|
|
|
|
CONFIG_NAME = linux-dri
|
|
|
|
|
|
|
|
# Compiler and flags
|
|
|
|
CC = gcc
|
|
|
|
CXX = g++
|
|
|
|
|
2006-01-18 20:57:02 +00:00
|
|
|
#MKDEP = /usr/X11R6/bin/makedepend
|
2004-12-09 08:42:19 +00:00
|
|
|
#MKDEP = gcc -M
|
|
|
|
#MKDEP_OPTIONS = -MF depend
|
|
|
|
|
2008-06-04 09:56:00 +01:00
|
|
|
OPT_FLAGS = -O2 -g
|
2005-04-06 22:34:34 +01:00
|
|
|
PIC_FLAGS = -fPIC
|
2005-04-13 21:59:15 +01:00
|
|
|
|
|
|
|
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
|
2005-04-06 22:34:34 +01:00
|
|
|
ARCH_FLAGS ?=
|
2004-09-25 08:11:12 +01:00
|
|
|
|
2004-12-08 15:16:36 +00:00
|
|
|
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
|
|
|
-D_BSD_SOURCE -D_GNU_SOURCE \
|
2005-07-29 18:25:50 +01:00
|
|
|
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
2006-10-11 23:37:14 +01:00
|
|
|
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
|
|
|
|
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
|
2004-12-08 15:16:36 +00:00
|
|
|
|
2005-08-15 16:01:39 +01:00
|
|
|
X11_INCLUDES = -I/usr/X11R6/include
|
|
|
|
|
2006-04-06 17:46:34 +01:00
|
|
|
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
|
|
|
|
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
|
2004-12-08 15:16:36 +00:00
|
|
|
|
2005-10-28 14:11:00 +01:00
|
|
|
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
2004-12-08 15:16:36 +00:00
|
|
|
|
2007-10-31 23:18:29 +00:00
|
|
|
GLUT_CFLAGS = -fexceptions
|
|
|
|
|
2007-10-31 16:47:39 +00:00
|
|
|
# Work around aliasing bugs - developers should comment this out
|
|
|
|
CFLAGS += -fno-strict-aliasing
|
|
|
|
CXXFLAGS += -fno-strict-aliasing
|
2004-04-14 13:44:07 +01:00
|
|
|
|
2008-02-19 04:27:13 +00:00
|
|
|
MESA_ASM_SOURCES =
|
2004-04-14 13:44:07 +01:00
|
|
|
|
|
|
|
# Library/program dependencies
|
2005-04-06 22:34:34 +01:00
|
|
|
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
2004-04-14 13:44:07 +01:00
|
|
|
|
2007-10-25 15:46:40 +01:00
|
|
|
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
|
|
|
|
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
|
2005-08-19 21:20:03 +01:00
|
|
|
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
2007-01-06 02:19:58 +00:00
|
|
|
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
2008-04-18 15:34:45 +01:00
|
|
|
-lm -lpthread -ldl $(LIBDRM_LIB)
|
2004-04-14 13:44:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Directories
|
2010-02-09 14:58:36 +00:00
|
|
|
SRC_DIRS := glx egl $(SRC_DIRS)
|
2008-11-13 19:38:18 +00:00
|
|
|
PROGRAM_DIRS := egl $(PROGRAM_DIRS)
|
2005-08-15 16:01:39 +01:00
|
|
|
|
2008-07-13 17:04:49 +01:00
|
|
|
# EGL directories
|
2010-01-22 07:07:58 +00:00
|
|
|
EGL_DRIVERS_DIRS = glx
|
2005-08-15 16:01:39 +01:00
|
|
|
|
2009-02-09 18:16:20 +00:00
|
|
|
DRIVER_DIRS = dri
|
2010-03-11 14:43:00 +00:00
|
|
|
GALLIUM_WINSYS_DIRS = null xlib drm
|
gallium: introduce target directory
Currently there are still at least two functions bundled up inside the
winsys concept:
a) that of a backend resource manager, sometimes capable of performing
present() operations,
b) the initialization code/routine for the whole driver stack.
The inclusion of (b) makes it difficult to share implementations of
(a) between different drivers. For instance, a clean xlib winsys
could be of use for software-rasterized VG, GLES, EGL, etc, stacks.
But that is only true as long as there is no dependency from the
winsys to higher level code, as would be the case when we include (b)
in this component.
This change creates a new gallium/targets subtree, specifically for
implementing the glue needed to build individual driver stacks, and
moves that code out of a single example winsys, namely xlib.
Other drivers continue to build unchanged, but hopefully can migrate
to this structure over time.
2010-03-08 19:11:35 +00:00
|
|
|
GALLIUM_TARGET_DIRS =
|
2009-12-21 19:18:41 +00:00
|
|
|
GALLIUM_WINSYS_DRM_DIRS = vmware intel i965
|
2010-01-22 08:31:43 +00:00
|
|
|
GALLIUM_STATE_TRACKERS_DIRS = egl
|
2004-04-14 13:44:07 +01:00
|
|
|
|
2009-12-21 19:21:09 +00:00
|
|
|
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
|
2010-03-04 03:03:45 +00:00
|
|
|
savage sis tdfx unichrome swrast
|
2010-01-06 15:13:56 +00:00
|
|
|
|
|
|
|
INTEL_LIBS = `pkg-config --libs libdrm_intel`
|
|
|
|
INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
|
|
|
|
|
|
|
|
RADEON_LIBS = `pkg-config --libs libdrm_radeon`
|
|
|
|
RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon`
|