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 | f78eafc | 2009-09-08 16:46:06 -0600 | [diff] [blame] | 12 | MESA_MINOR=7 |
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 = |
Dan Nicholson | 9c8b693 | 2009-09-12 09:27:01 -0700 | [diff] [blame] | 26 | HOST_CFLAGS = $(CFLAGS) |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 27 | GLU_CFLAGS = |
Brian Paul | 9f4ccd8 | 2004-04-07 23:15:26 +0000 | [diff] [blame] | 28 | |
Brian Paul | 90c93bb | 2008-09-11 11:00:54 -0600 | [diff] [blame] | 29 | # Compiler for building demos/tests/etc |
| 30 | APP_CC = $(CC) |
| 31 | APP_CXX = $(CXX) |
| 32 | |
Brian Paul | 9f4ccd8 | 2004-04-07 23:15:26 +0000 | [diff] [blame] | 33 | # Misc tools and flags |
Dan Nicholson | 9eee7f2 | 2008-07-08 07:44:58 -0700 | [diff] [blame] | 34 | SHELL = /bin/sh |
Dan Nicholson | db072ba | 2008-07-11 13:54:48 -0700 | [diff] [blame] | 35 | MKLIB = $(SHELL) $(TOP)/bin/mklib |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 36 | MKLIB_OPTIONS = |
Brian Paul | 9f4ccd8 | 2004-04-07 23:15:26 +0000 | [diff] [blame] | 37 | MKDEP = makedepend |
Keith Whitwell | fc23672 | 2004-12-08 15:16:36 +0000 | [diff] [blame] | 38 | MKDEP_OPTIONS = -fdepend |
Eric Anholt | 2fb5d15 | 2004-06-01 00:06:14 +0000 | [diff] [blame] | 39 | MAKE = make |
Dan Nicholson | bc302b2 | 2009-05-22 09:39:02 -0700 | [diff] [blame] | 40 | |
| 41 | # Use MINSTALL for installing libraries, INSTALL for everything else |
| 42 | MINSTALL = $(SHELL) $(TOP)/bin/minstall |
| 43 | INSTALL = $(MINSTALL) |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 44 | |
Dan Nicholson | 817af9b | 2008-01-15 09:52:17 -0800 | [diff] [blame] | 45 | # Tools for regenerating glapi (generally only needed by the developers) |
Brian Paul | f4f1c29 | 2005-07-01 01:27:00 +0000 | [diff] [blame] | 46 | PYTHON2 = python |
| 47 | PYTHON_FLAGS = -t -O -O |
Dan Nicholson | 817af9b | 2008-01-15 09:52:17 -0800 | [diff] [blame] | 48 | INDENT = indent |
| 49 | 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] | 50 | |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 51 | # Library names (base name) |
| 52 | GL_LIB = GL |
| 53 | GLU_LIB = GLU |
| 54 | GLUT_LIB = glut |
José Fonseca | 57d0001 | 2009-01-23 12:32:35 +0000 | [diff] [blame] | 55 | GLEW_LIB = GLEW |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 56 | GLW_LIB = GLw |
| 57 | OSMESA_LIB = OSMesa |
| 58 | |
| 59 | |
| 60 | # Library names (actual file names) |
Brian Paul | 05bbafa | 2005-03-23 02:12:21 +0000 | [diff] [blame] | 61 | GL_LIB_NAME = lib$(GL_LIB).so |
| 62 | GLU_LIB_NAME = lib$(GLU_LIB).so |
| 63 | GLUT_LIB_NAME = lib$(GLUT_LIB).so |
José Fonseca | fcf9353 | 2009-01-24 16:54:59 +0000 | [diff] [blame] | 64 | GLEW_LIB_NAME = lib$(GLEW_LIB).a |
Brian Paul | 05bbafa | 2005-03-23 02:12:21 +0000 | [diff] [blame] | 65 | GLW_LIB_NAME = lib$(GLW_LIB).so |
Brian Paul | 4417d4c | 2005-06-07 15:25:08 +0000 | [diff] [blame] | 66 | OSMESA_LIB_NAME = lib$(OSMESA_LIB).so |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 67 | |
Jeremy Huddleston | 98e7c1c | 2008-08-12 10:59:40 -0700 | [diff] [blame] | 68 | # globs used to install the lib and all symlinks |
| 69 | GL_LIB_GLOB = $(GL_LIB_NAME)* |
| 70 | GLU_LIB_GLOB = $(GLU_LIB_NAME)* |
| 71 | GLUT_LIB_GLOB = $(GLUT_LIB_NAME)* |
| 72 | GLW_LIB_GLOB = $(GLW_LIB_NAME)* |
| 73 | OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)* |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 74 | |
| 75 | # Optional assembly language optimization files for libGL |
José Fonseca | 90b2beb | 2008-02-19 13:27:13 +0900 | [diff] [blame] | 76 | MESA_ASM_SOURCES = |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 77 | |
Brian Paul | 9408fe0 | 2004-07-20 20:43:24 +0000 | [diff] [blame] | 78 | # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in |
| 79 | # order to build the Motif widget too) |
Brian Paul | 533befc | 2004-03-26 21:48:09 +0000 | [diff] [blame] | 80 | GLW_SOURCES = GLwDrawA.c |
Dan Nicholson | 776c60d | 2008-07-18 07:40:41 -0700 | [diff] [blame] | 81 | MOTIF_CFLAGS = -I/usr/include/Motif1.2 |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 82 | |
| 83 | |
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 84 | # Directories to build |
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 85 | LIB_DIR = lib |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 86 | SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 87 | GLU_DIRS = sgi |
Jakob Bornecrantz | 767b1ac | 2009-02-10 17:43:25 +0100 | [diff] [blame] | 88 | DRIVER_DIRS = x11 osmesa |
Brian Paul | cb34c11 | 2005-05-05 13:08:06 +0000 | [diff] [blame] | 89 | # Which subdirs under $(TOP)/progs/ to enter: |
Brian Paul | 24f31ab | 2009-10-01 13:11:25 -0600 | [diff] [blame^] | 90 | PROGRAM_DIRS = demos redbook samples glsl objviewer xdemos |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 91 | |
Jakob Bornecrantz | e59086a | 2008-07-13 18:04:49 +0200 | [diff] [blame] | 92 | # EGL directories |
| 93 | EGL_DRIVERS_DIRS = demo |
Zack Rusin | d76a7b6 | 2007-10-24 08:34:01 -0400 | [diff] [blame] | 94 | |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 95 | # Gallium directories and |
Jakob Bornecrantz | 43e6272 | 2009-02-10 16:23:02 +0100 | [diff] [blame] | 96 | GALLIUM_DIRS = auxiliary drivers state_trackers |
Younes Manton | f547472 | 2009-09-27 19:49:06 -0400 | [diff] [blame] | 97 | GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 98 | GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) |
Jakob Bornecrantz | d60b2c6 | 2009-06-24 02:42:41 +0200 | [diff] [blame] | 99 | GALLIUM_DRIVERS_DIRS = softpipe i915simple failover trace identity |
Jakob Bornecrantz | d67bd60 | 2009-02-20 11:03:18 +0000 | [diff] [blame] | 100 | GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 101 | GALLIUM_WINSYS_DIRS = xlib egl_xlib |
Jakob Bornecrantz | 43e6272 | 2009-02-10 16:23:02 +0100 | [diff] [blame] | 102 | GALLIUM_WINSYS_DRM_DIRS = |
| 103 | GALLIUM_STATE_TRACKERS_DIRS = glx |
José Fonseca | bfd5916 | 2008-02-18 14:25:04 +0900 | [diff] [blame] | 104 | |
Jakob Bornecrantz | b96d50d | 2009-02-10 13:59:35 +0100 | [diff] [blame] | 105 | |
| 106 | # Library dependencies |
Brian Paul | 2216aac | 2006-09-06 13:56:26 +0000 | [diff] [blame] | 107 | #EXTRA_LIB_PATH ?= |
Ian Romanick | ffcb4d8 | 2008-01-03 14:59:14 -0800 | [diff] [blame] | 108 | GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread |
Chia-I Wu | 5a459d5 | 2009-08-21 13:53:36 +0800 | [diff] [blame] | 109 | EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread |
Ian Romanick | ffcb4d8 | 2008-01-03 14:59:14 -0800 | [diff] [blame] | 110 | OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) |
| 111 | GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm |
| 112 | GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm |
| 113 | GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11 |
| 114 | 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] | 115 | |
| 116 | # Program dependencies - specific GL/glut libraries added in Makefiles |
| 117 | APP_LIB_DEPS = -lm |
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 118 | |
Brian Paul | 0e794a1 | 2006-06-22 22:50:48 +0000 | [diff] [blame] | 119 | |
| 120 | # Installation directories (for make install) |
Brian Paul | 79b5d3e | 2006-10-19 20:11:15 +0000 | [diff] [blame] | 121 | INSTALL_DIR = /usr/local |
Dan Nicholson | 11ac5b2 | 2008-07-03 09:17:44 -0700 | [diff] [blame] | 122 | INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR) |
| 123 | INSTALL_INC_DIR = $(INSTALL_DIR)/include |
| 124 | DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri |
Brian Paul | 883f989 | 2006-07-13 02:50:27 +0000 | [diff] [blame] | 125 | |
| 126 | # Where libGL will look for DRI hardware drivers |
| 127 | DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) |
| 128 | |
Joel Bosveld | 8acca48 | 2009-03-06 08:46:08 +0900 | [diff] [blame] | 129 | # Xorg driver install directory (for xorg state-tracker) |
| 130 | XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers |
| 131 | |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 132 | # pkg-config substitutions |
| 133 | GL_PC_REQ_PRIV = |
| 134 | GL_PC_LIB_PRIV = |
| 135 | GL_PC_CFLAGS = |
| 136 | DRI_PC_REQ_PRIV = |
| 137 | GLU_PC_REQ = gl |
| 138 | GLU_PC_REQ_PRIV = |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 139 | GLU_PC_LIB_PRIV = |
| 140 | GLU_PC_CFLAGS = |
| 141 | GLUT_PC_REQ_PRIV = |
| 142 | GLUT_PC_LIB_PRIV = |
| 143 | GLUT_PC_CFLAGS = |
| 144 | GLW_PC_REQ_PRIV = |
| 145 | GLW_PC_LIB_PRIV = |
| 146 | GLW_PC_CFLAGS = |
Dan Nicholson | 8be02fc | 2008-12-14 09:35:29 -0800 | [diff] [blame] | 147 | OSMESA_PC_REQ = |
| 148 | OSMESA_PC_LIB_PRIV = |