Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 1 | # Default/template configuration |
| 2 | |
| 3 | # This is included by other config files which may override some |
| 4 | # of these variables. |
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 5 | # Think of this as a base class from which configs are derived. |
| 6 | |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 7 | |
| 8 | CONFIG_NAME = default |
| 9 | |
| 10 | # Version info |
Brian | e371a5f | 2007-04-27 17:01:23 -0600 | [diff] [blame] | 11 | MESA_MAJOR=7 |
Brian Paul | 019b952 | 2008-08-26 15:59:06 -0600 | [diff] [blame] | 12 | MESA_MINOR=3 |
Brian | e371a5f | 2007-04-27 17:01:23 -0600 | [diff] [blame] | 13 | MESA_TINY=0 |
Dan Nicholson | 00994ac | 2008-04-30 15:06:00 -0700 | [diff] [blame] | 14 | MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 15 | |
Adam Jackson | 8fcd1e0 | 2005-08-19 20:20:03 +0000 | [diff] [blame] | 16 | # external projects. This should be useless now that we use libdrm. |
Jon Smirl | 78be0b5 | 2005-07-02 21:28:01 +0000 | [diff] [blame] | 17 | DRM_SOURCE_PATH=$(TOP)/../drm |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 18 | |
| 19 | # Compiler and flags |
| 20 | CC = cc |
| 21 | CXX = CC |
Ian Romanick | b3492a2 | 2008-01-03 15:08:53 -0800 | [diff] [blame] | 22 | HOST_CC = $(CC) |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 23 | CFLAGS = -O |
| 24 | CXXFLAGS = -O |
Dan Nicholson | 2a3e338 | 2007-09-28 18:42:21 -0600 | [diff] [blame] | 25 | LDFLAGS = |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 26 | GLU_CFLAGS = |
Brian Paul | 9f4ccd8 | 2004-04-07 23:15:26 +0000 | [diff] [blame] | 27 | |
Brian Paul | 90c93bb | 2008-09-11 11:00:54 -0600 | [diff] [blame] | 28 | # Compiler for building demos/tests/etc |
| 29 | APP_CC = $(CC) |
| 30 | APP_CXX = $(CXX) |
| 31 | |
Brian Paul | 9f4ccd8 | 2004-04-07 23:15:26 +0000 | [diff] [blame] | 32 | # Misc tools and flags |
Dan Nicholson | 9eee7f2 | 2008-07-08 07:44:58 -0700 | [diff] [blame] | 33 | SHELL = /bin/sh |
Dan Nicholson | db072ba | 2008-07-11 13:54:48 -0700 | [diff] [blame] | 34 | MKLIB = $(SHELL) $(TOP)/bin/mklib |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 35 | MKLIB_OPTIONS = |
Brian Paul | 9f4ccd8 | 2004-04-07 23:15:26 +0000 | [diff] [blame] | 36 | MKDEP = makedepend |
Keith Whitwell | fc23672 | 2004-12-08 15:16:36 +0000 | [diff] [blame] | 37 | MKDEP_OPTIONS = -fdepend |
Eric Anholt | 2fb5d15 | 2004-06-01 00:06:14 +0000 | [diff] [blame] | 38 | MAKE = make |
Dan Nicholson | 4f5d97e | 2008-07-08 07:49:31 -0700 | [diff] [blame] | 39 | INSTALL = $(SHELL) $(TOP)/bin/minstall |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 40 | |
Dan Nicholson | 817af9b | 2008-01-15 09:52:17 -0800 | [diff] [blame] | 41 | # Tools for regenerating glapi (generally only needed by the developers) |
Brian Paul | f4f1c29 | 2005-07-01 01:27:00 +0000 | [diff] [blame] | 42 | PYTHON2 = python |
| 43 | PYTHON_FLAGS = -t -O -O |
Dan Nicholson | 817af9b | 2008-01-15 09:52:17 -0800 | [diff] [blame] | 44 | INDENT = indent |
| 45 | INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool |
Brian Paul | f4f1c29 | 2005-07-01 01:27:00 +0000 | [diff] [blame] | 46 | |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 47 | # Library names (base name) |
| 48 | GL_LIB = GL |
| 49 | GLU_LIB = GLU |
| 50 | GLUT_LIB = glut |
José Fonseca | 57d0001 | 2009-01-23 12:32:35 +0000 | [diff] [blame] | 51 | GLEW_LIB = GLEW |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 52 | GLW_LIB = GLw |
| 53 | OSMESA_LIB = OSMesa |
| 54 | |
| 55 | |
| 56 | # Library names (actual file names) |
Brian Paul | 05bbafa | 2005-03-23 02:12:21 +0000 | [diff] [blame] | 57 | GL_LIB_NAME = lib$(GL_LIB).so |
| 58 | GLU_LIB_NAME = lib$(GLU_LIB).so |
| 59 | GLUT_LIB_NAME = lib$(GLUT_LIB).so |
José Fonseca | fcf9353 | 2009-01-24 16:54:59 +0000 | [diff] [blame] | 60 | GLEW_LIB_NAME = lib$(GLEW_LIB).a |
Brian Paul | 05bbafa | 2005-03-23 02:12:21 +0000 | [diff] [blame] | 61 | GLW_LIB_NAME = lib$(GLW_LIB).so |
Brian Paul | 4417d4c | 2005-06-07 15:25:08 +0000 | [diff] [blame] | 62 | OSMESA_LIB_NAME = lib$(OSMESA_LIB).so |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 63 | |
Jeremy Huddleston | 98e7c1c | 2008-08-12 10:59:40 -0700 | [diff] [blame] | 64 | # globs used to install the lib and all symlinks |
| 65 | GL_LIB_GLOB = $(GL_LIB_NAME)* |
| 66 | GLU_LIB_GLOB = $(GLU_LIB_NAME)* |
| 67 | GLUT_LIB_GLOB = $(GLUT_LIB_NAME)* |
| 68 | GLW_LIB_GLOB = $(GLW_LIB_NAME)* |
| 69 | OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)* |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 70 | |
| 71 | # Optional assembly language optimization files for libGL |
José Fonseca | 90b2beb | 2008-02-19 13:27:13 +0900 | [diff] [blame] | 72 | MESA_ASM_SOURCES = |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 73 | |
Brian Paul | 9408fe0 | 2004-07-20 20:43:24 +0000 | [diff] [blame] | 74 | # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in |
| 75 | # order to build the Motif widget too) |
Brian Paul | 533befc | 2004-03-26 21:48:09 +0000 | [diff] [blame] | 76 | GLW_SOURCES = GLwDrawA.c |
Dan Nicholson | 776c60d | 2008-07-18 07:40:41 -0700 | [diff] [blame] | 77 | MOTIF_CFLAGS = -I/usr/include/Motif1.2 |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 78 | |
| 79 | |
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 80 | # Directories to build |
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 81 | LIB_DIR = lib |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 82 | SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 83 | GLU_DIRS = sgi |
Jakob Bornecrantz | 767b1ac | 2009-02-10 17:43:25 +0100 | [diff] [blame^] | 84 | DRIVER_DIRS = x11 osmesa |
Brian Paul | cb34c11 | 2005-05-05 13:08:06 +0000 | [diff] [blame] | 85 | # Which subdirs under $(TOP)/progs/ to enter: |
Brian | 5dba996 | 2007-04-08 15:50:31 -0600 | [diff] [blame] | 86 | PROGRAM_DIRS = demos redbook samples glsl xdemos |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 87 | |
Jakob Bornecrantz | e59086a | 2008-07-13 18:04:49 +0200 | [diff] [blame] | 88 | # EGL directories |
| 89 | EGL_DRIVERS_DIRS = demo |
Zack Rusin | d76a7b6 | 2007-10-24 08:34:01 -0400 | [diff] [blame] | 90 | |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 91 | # Gallium directories and |
Jakob Bornecrantz | 43e6272 | 2009-02-10 16:23:02 +0100 | [diff] [blame] | 92 | GALLIUM_DIRS = auxiliary drivers state_trackers |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 93 | GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices |
| 94 | GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) |
| 95 | GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace |
| 96 | GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) |
| 97 | GALLIUM_WINSYS_DIRS = xlib egl_xlib |
Jakob Bornecrantz | 43e6272 | 2009-02-10 16:23:02 +0100 | [diff] [blame] | 98 | GALLIUM_WINSYS_DRM_DIRS = |
| 99 | GALLIUM_STATE_TRACKERS_DIRS = glx |
José Fonseca | bfd5916 | 2008-02-18 14:25:04 +0900 | [diff] [blame] | 100 | |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 101 | |
| 102 | # Library dependencies |
Brian Paul | 2216aac | 2006-09-06 13:56:26 +0000 | [diff] [blame] | 103 | #EXTRA_LIB_PATH ?= |
Ian Romanick | ffcb4d8 | 2008-01-03 14:59:14 -0800 | [diff] [blame] | 104 | GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread |
| 105 | OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) |
| 106 | GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm |
| 107 | GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm |
| 108 | GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11 |
| 109 | APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm |
Dan Nicholson | 9ef1d9f | 2007-10-29 09:04:30 -0600 | [diff] [blame] | 110 | |
| 111 | # Program dependencies - specific GL/glut libraries added in Makefiles |
| 112 | APP_LIB_DEPS = -lm |
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 113 | |
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 114 | |
| 115 | # Installation directories (for make install) |
Brian Paul | 79b5d3e | 2006-10-19 20:11:15 +0000 | [diff] [blame] | 116 | INSTALL_DIR = /usr/local |
Dan Nicholson | 11ac5b2 | 2008-07-03 09:17:44 -0700 | [diff] [blame] | 117 | INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR) |
| 118 | INSTALL_INC_DIR = $(INSTALL_DIR)/include |
| 119 | DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri |
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 120 | |
| 121 | # Where libGL will look for DRI hardware drivers |
| 122 | DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) |
| 123 | |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 124 | # pkg-config substitutions |
| 125 | GL_PC_REQ_PRIV = |
| 126 | GL_PC_LIB_PRIV = |
| 127 | GL_PC_CFLAGS = |
| 128 | DRI_PC_REQ_PRIV = |
| 129 | GLU_PC_REQ = gl |
| 130 | GLU_PC_REQ_PRIV = |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 131 | GLU_PC_LIB_PRIV = |
| 132 | GLU_PC_CFLAGS = |
| 133 | GLUT_PC_REQ_PRIV = |
| 134 | GLUT_PC_LIB_PRIV = |
| 135 | GLUT_PC_CFLAGS = |
| 136 | GLW_PC_REQ_PRIV = |
| 137 | GLW_PC_LIB_PRIV = |
| 138 | GLW_PC_CFLAGS = |
Dan Nicholson | 8be02fc | 2008-12-14 09:35:29 -0800 | [diff] [blame] | 139 | OSMESA_PC_REQ = |
| 140 | OSMESA_PC_LIB_PRIV = |