blob: 6494a68aeb1a349422ff38ff67cd090f9058a3ca [file] [log] [blame]
Jakob Bornecrantz9395fb62008-05-22 16:24:51 +02001# -*-makefile-*-
2# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
3
4include $(TOP)/configs/default
5
6CONFIG_NAME = linux-dri
7
8# Compiler and flags
9CC = gcc
10CXX = g++
11
12#MKDEP = /usr/X11R6/bin/makedepend
13#MKDEP = gcc -M
14#MKDEP_OPTIONS = -MF depend
15
16OPT_FLAGS = -O -g
17PIC_FLAGS = -fPIC
18
19# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
20ARCH_FLAGS ?=
21
22DEFINES = -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
27
28X11_INCLUDES = -I/usr/X11R6/include
29
30CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
31 $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
32
33CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
34
35
36MESA_ASM_SOURCES =
37
38# Library/program dependencies
39EXTRA_LIB_PATH=-L/usr/X11R6/lib
40
41LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
42LIBDRM_LIB = $(shell pkg-config --libs libdrm)
43DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
44GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
45 -lm -lpthread -ldl \
46 $(LIBDRM_LIB)
47
48
Jakob Bornecrantz9395fb62008-05-22 16:24:51 +020049# Directories
50SRC_DIRS = gallium mesa gallium/winsys glu egl
51PROGRAM_DIRS = egl
52
53DRIVER_DIRS = dri
54WINDOW_SYSTEM = dri
55GALLIUM_WINSYS_DIRS = egl_drm
56
57# gamma are missing because they have not been converted to use the new
58# interface.
59DRI_DIRS = intel