blob: e9c15a82e4262f4a0f80a00173c24b364d2a6ca9 [file] [log] [blame]
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +00001# -*-makefile-*-
2# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
3
4include $(TOP)/configs/default
5
6CONFIG_NAME = linux-dri-xcb
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 = -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 \
Jeremy Kolb838a2a22007-04-20 21:53:38 -040025 -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
26 -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000027
José Fonseca1d2ff452007-10-25 15:46:40 +010028X11_INCLUDES = $(shell pkg-config --cflags-only-I x11) $(shell pkg-config --cflags-only-I xcb) $(shell pkg-config --cflags-only-I x11-xcb) $(shell pkg-config --cflags-only-I xcb-glx)
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000029
30CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
31 $(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
32
33CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
34
Dan Nicholson013dbcd2007-10-31 09:47:39 -070035# Work around aliasing bugs - developers should comment this out
36CFLAGS += -fno-strict-aliasing
37CXXFLAGS += -fno-strict-aliasing
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000038
José Fonseca90b2beb2008-02-19 13:27:13 +090039MESA_ASM_SOURCES =
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000040
41# Library/program dependencies
José Fonseca1d2ff452007-10-25 15:46:40 +010042EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11)
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000043
José Fonseca1d2ff452007-10-25 15:46:40 +010044LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
45LIBDRM_LIB = $(shell pkg-config --libs libdrm)
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000046DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
47GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
José Fonseca1d2ff452007-10-25 15:46:40 +010048 $(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000049
50
51# This is now 0 by default since it seems to confuse the hell out of people
52# and generate a lot of extra noise on bugzilla. If you need to build with
53# EGL, do 'make linux-dri USING_EGL=1'
54
55USING_EGL=0
56
57# Directories
58ifeq ($(USING_EGL), 1)
José Fonseca57d00012009-01-23 12:32:35 +000059SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000060PROGRAM_DIRS = egl
61else
José Fonseca57d00012009-01-23 12:32:35 +000062SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
Dan Nicholson06ca1452007-10-29 11:21:37 -070063PROGRAM_DIRS = xdemos
Jeremy Kolbfcbbdf92006-02-19 22:31:26 +000064endif
65
66DRIVER_DIRS = dri
67WINDOW_SYSTEM=dri
68
69# gamma are missing because they have not been converted to use the new
70# interface.
71DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
Stephane Marchesin93115c42008-07-14 01:03:07 +020072 savage sis tdfx trident unichrome ffb