2 # Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
4 include $(TOP)/configs/default
6 CONFIG_NAME = linux-dri
12 #MKDEP = /usr/X11R6/bin/makedepend
14 #MKDEP_OPTIONS = -MF depend
19 # Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
22 DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
23 -D_BSD_SOURCE -D_GNU_SOURCE \
24 -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
25 -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
26 -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
28 X11_INCLUDES = -I/usr/X11R6/include
30 CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
31 $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
33 CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
36 # Work around aliasing bugs - developers should comment this out
37 CFLAGS += -fno-strict-aliasing
38 CXXFLAGS += -fno-strict-aliasing
42 # Library/program dependencies
43 EXTRA_LIB_PATH=-L/usr/X11R6/lib
45 MESA_MODULES = $(TOP)/src/mesa/libmesa.a
47 LIBDRM_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm)
48 LIBDRM_LIB = $(shell $(PKG_CONFIG) --libs libdrm)
49 DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
50 GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
51 -lm -lpthread -ldl $(LIBDRM_LIB)
55 SRC_DIRS := glx egl $(SRC_DIRS)
58 EGL_DRIVERS_DIRS = glx
61 GALLIUM_WINSYS_DIRS = sw sw/xlib drm/vmware drm/intel svga/drm
62 GALLIUM_TARGET_DIRS = dri-vmwgfx
63 GALLIUM_STATE_TRACKERS_DIRS = egl dri
65 DRI_DIRS = i915 i965 nouveau r200 radeon swrast
67 INTEL_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_intel)
68 INTEL_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_intel)
70 NOUVEAU_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_nouveau)
71 NOUVEAU_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_nouveau)
73 LIBDRM_RADEON_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_radeon)
74 LIBDRM_RADEON_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_radeon)
75 RADEON_CFLAGS = "-DHAVE_LIBDRM_RADEON=1 $(LIBDRM_RADEON_CFLAGS)"
76 RADEON_LDFLAGS = $(LIBDRM_RADEON_LIBS)