Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 1 | # -*-makefile-*- |
| 2 | # Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others |
| 3 | |
| 4 | include $(TOP)/configs/default |
| 5 | |
| 6 | CONFIG_NAME = linux-dri-xcb |
| 7 | |
| 8 | # Compiler and flags |
| 9 | CC = gcc |
| 10 | CXX = g++ |
| 11 | |
| 12 | #MKDEP = /usr/X11R6/bin/makedepend |
| 13 | #MKDEP = gcc -M |
| 14 | #MKDEP_OPTIONS = -MF depend |
| 15 | |
| 16 | OPT_FLAGS = -g |
| 17 | PIC_FLAGS = -fPIC |
| 18 | |
| 19 | # Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. |
| 20 | ARCH_FLAGS ?= |
| 21 | |
| 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 \ |
Jeremy Kolb | 838a2a2 | 2007-04-20 21:53:38 -0400 | [diff] [blame] | 25 | -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \ |
| 26 | -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 27 | |
José Fonseca | 1d2ff45 | 2007-10-25 15:46:40 +0100 | [diff] [blame] | 28 | X11_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 Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 29 | |
| 30 | CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ |
| 31 | $(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math |
| 32 | |
| 33 | CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) |
| 34 | |
Dan Nicholson | 013dbcd | 2007-10-31 09:47:39 -0700 | [diff] [blame] | 35 | # Work around aliasing bugs - developers should comment this out |
| 36 | CFLAGS += -fno-strict-aliasing |
| 37 | CXXFLAGS += -fno-strict-aliasing |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 38 | |
José Fonseca | 90b2beb | 2008-02-19 13:27:13 +0900 | [diff] [blame] | 39 | MESA_ASM_SOURCES = |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 40 | |
| 41 | # Library/program dependencies |
José Fonseca | 1d2ff45 | 2007-10-25 15:46:40 +0100 | [diff] [blame] | 42 | EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11) |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 43 | |
José Fonseca | 1d2ff45 | 2007-10-25 15:46:40 +0100 | [diff] [blame] | 44 | LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) |
| 45 | LIBDRM_LIB = $(shell pkg-config --libs libdrm) |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 46 | DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) |
| 47 | GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ |
José Fonseca | 1d2ff45 | 2007-10-25 15:46:40 +0100 | [diff] [blame] | 48 | $(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx) |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 49 | |
| 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 | |
| 55 | USING_EGL=0 |
| 56 | |
| 57 | # Directories |
| 58 | ifeq ($(USING_EGL), 1) |
José Fonseca | 57d0001 | 2009-01-23 12:32:35 +0000 | [diff] [blame^] | 59 | SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 60 | PROGRAM_DIRS = egl |
| 61 | else |
José Fonseca | 57d0001 | 2009-01-23 12:32:35 +0000 | [diff] [blame^] | 62 | SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw |
Dan Nicholson | 06ca145 | 2007-10-29 11:21:37 -0700 | [diff] [blame] | 63 | PROGRAM_DIRS = xdemos |
Jeremy Kolb | fcbbdf9 | 2006-02-19 22:31:26 +0000 | [diff] [blame] | 64 | endif |
| 65 | |
| 66 | DRIVER_DIRS = dri |
| 67 | WINDOW_SYSTEM=dri |
| 68 | |
| 69 | # gamma are missing because they have not been converted to use the new |
| 70 | # interface. |
| 71 | DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \ |
Stephane Marchesin | 93115c4 | 2008-07-14 01:03:07 +0200 | [diff] [blame] | 72 | savage sis tdfx trident unichrome ffb |