Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 1 | # -*-makefile-*- |
| 2 | # Configuration for freebsd-dri: FreeBSD DRI hardware drivers |
| 3 | |
| 4 | include $(TOP)/configs/freebsd |
| 5 | |
| 6 | CONFIG_NAME = freebsd-dri |
| 7 | |
| 8 | # Compiler and flags |
| 9 | CC = gcc |
| 10 | CXX = g++ |
| 11 | WARN_FLAGS = -Wall |
Eric Anholt | eecec25 | 2007-07-05 16:57:53 -0700 | [diff] [blame] | 12 | OPT_FLAGS = -O -g |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 13 | |
Eric Anholt | f054fa8 | 2005-05-28 20:17:06 +0000 | [diff] [blame] | 14 | EXPAT_INCLUDES = -I/usr/local/include |
Eric Anholt | ffa94e5 | 2007-09-28 13:51:13 -0700 | [diff] [blame] | 15 | X11_INCLUDES = -I/usr/local/include |
Ian Romanick | dc6e2c7 | 2005-07-29 17:25:50 +0000 | [diff] [blame] | 16 | DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ |
Ian Romanick | f3f51bc | 2006-10-11 22:37:14 +0000 | [diff] [blame] | 17 | -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \ |
Brian | 6fae667 | 2007-07-31 14:57:37 -0600 | [diff] [blame] | 18 | -DHAVE_ALIAS |
Brian Paul | 05529fe | 2006-04-06 16:50:38 +0000 | [diff] [blame] | 19 | |
Brian Paul | dc4bf43 | 2006-09-19 16:31:37 +0000 | [diff] [blame] | 20 | CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \ |
Brian Paul | 05529fe | 2006-04-06 16:50:38 +0000 | [diff] [blame] | 21 | $(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES) |
| 22 | |
Brian Paul | dc4bf43 | 2006-09-19 16:31:37 +0000 | [diff] [blame] | 23 | CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES) |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 24 | |
Dan Nicholson | 01b18ab | 2007-11-01 06:01:53 -0700 | [diff] [blame] | 25 | # Work around aliasing bugs - developers should comment this out |
| 26 | CFLAGS += -fno-strict-aliasing |
| 27 | CXXFLAGS += -fno-strict-aliasing |
| 28 | |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 29 | ASM_SOURCES = |
José Fonseca | 90b2beb | 2008-02-19 13:27:13 +0900 | [diff] [blame] | 30 | MESA_ASM_SOURCES = |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 31 | |
| 32 | # Library/program dependencies |
Brian Paul | 408ce7e | 2006-09-19 22:43:41 +0000 | [diff] [blame] | 33 | LIBDRM_CFLAGS = `pkg-config --cflags libdrm` |
Adam Jackson | 9542537 | 2006-03-30 19:20:25 +0000 | [diff] [blame] | 34 | LIBDRM_LIB = `pkg-config --libs libdrm` |
Eric Anholt | 1a413b4 | 2007-06-22 10:29:54 -0700 | [diff] [blame] | 35 | DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB) |
Eric Anholt | ffa94e5 | 2007-09-28 13:51:13 -0700 | [diff] [blame] | 36 | GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ |
Eric Anholt | 1a413b4 | 2007-06-22 10:29:54 -0700 | [diff] [blame] | 37 | -lm -pthread $(LIBDRM_LIB) |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 38 | |
Eric Anholt | ffa94e5 | 2007-09-28 13:51:13 -0700 | [diff] [blame] | 39 | GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm |
| 40 | GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11 |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 41 | |
| 42 | |
| 43 | # Directories |
José Fonseca | 57d0001 | 2009-01-23 12:32:35 +0000 | [diff] [blame] | 44 | SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 45 | DRIVER_DIRS = dri |
| 46 | PROGRAM_DIRS = |
| 47 | WINDOW_SYSTEM=dri |
| 48 | |
| 49 | DRM_SOURCE_PATH=$(TOP)/../drm |
| 50 | |
| 51 | # ffb and gamma are missing because they have not been converted to use the new |
| 52 | # interface. |
Eric Anholt | 8cf9085 | 2007-09-24 10:03:25 -0700 | [diff] [blame] | 53 | DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \ |
Eric Anholt | cc18221 | 2004-10-28 00:19:21 +0000 | [diff] [blame] | 54 | unichrome savage sis |
| 55 | |