blob: 0ec25f916ed24660e65509fc1b21bafae4e43ece [file] [log] [blame]
Eric Anholtcc182212004-10-28 00:19:21 +00001# -*-makefile-*-
2# Configuration for freebsd-dri: FreeBSD DRI hardware drivers
3
4include $(TOP)/configs/freebsd
5
6CONFIG_NAME = freebsd-dri
7
8# Compiler and flags
9CC = gcc
10CXX = g++
11WARN_FLAGS = -Wall
Eric Anholteecec252007-07-05 16:57:53 -070012OPT_FLAGS = -O -g
Eric Anholtcc182212004-10-28 00:19:21 +000013
Eric Anholtf054fa82005-05-28 20:17:06 +000014EXPAT_INCLUDES = -I/usr/local/include
Eric Anholtffa94e52007-09-28 13:51:13 -070015X11_INCLUDES = -I/usr/local/include
Ian Romanickdc6e2c72005-07-29 17:25:50 +000016DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
Ian Romanickf3f51bc2006-10-11 22:37:14 +000017 -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
Brian6fae6672007-07-31 14:57:37 -060018 -DHAVE_ALIAS
Brian Paul05529fe2006-04-06 16:50:38 +000019
Brian Pauldc4bf432006-09-19 16:31:37 +000020CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \
Brian Paul05529fe2006-04-06 16:50:38 +000021 $(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
22
Brian Pauldc4bf432006-09-19 16:31:37 +000023CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
Eric Anholtcc182212004-10-28 00:19:21 +000024
Dan Nicholson01b18ab2007-11-01 06:01:53 -070025# Work around aliasing bugs - developers should comment this out
26CFLAGS += -fno-strict-aliasing
27CXXFLAGS += -fno-strict-aliasing
28
Eric Anholtcc182212004-10-28 00:19:21 +000029ASM_SOURCES =
José Fonseca90b2beb2008-02-19 13:27:13 +090030MESA_ASM_SOURCES =
Eric Anholtcc182212004-10-28 00:19:21 +000031
32# Library/program dependencies
Brian Paul408ce7e2006-09-19 22:43:41 +000033LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
Adam Jackson95425372006-03-30 19:20:25 +000034LIBDRM_LIB = `pkg-config --libs libdrm`
Eric Anholt1a413b42007-06-22 10:29:54 -070035DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
Eric Anholtffa94e52007-09-28 13:51:13 -070036GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
Eric Anholt1a413b42007-06-22 10:29:54 -070037 -lm -pthread $(LIBDRM_LIB)
Eric Anholtcc182212004-10-28 00:19:21 +000038
Eric Anholtffa94e52007-09-28 13:51:13 -070039GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
40GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
Eric Anholtcc182212004-10-28 00:19:21 +000041
42
43# Directories
José Fonseca57d00012009-01-23 12:32:35 +000044SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
Eric Anholtcc182212004-10-28 00:19:21 +000045DRIVER_DIRS = dri
46PROGRAM_DIRS =
47WINDOW_SYSTEM=dri
48
49DRM_SOURCE_PATH=$(TOP)/../drm
50
51# ffb and gamma are missing because they have not been converted to use the new
52# interface.
Eric Anholt8cf90852007-09-24 10:03:25 -070053DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
Eric Anholtcc182212004-10-28 00:19:21 +000054 unichrome savage sis
55