blob: 4c8698ccc46a7ab24b9630f6307592a75729a3ba [file] [log] [blame]
Brian Paula70ad912004-03-26 15:16:35 +00001# Default/template configuration
2
3# This is included by other config files which may override some
4# of these variables.
Brian Paul0e794a12006-06-22 22:50:48 +00005# Think of this as a base class from which configs are derived.
6
Brian Paula70ad912004-03-26 15:16:35 +00007
8CONFIG_NAME = default
9
10# Version info
Briane371a5f2007-04-27 17:01:23 -060011MESA_MAJOR=7
Brian Paul019b9522008-08-26 15:59:06 -060012MESA_MINOR=3
Briane371a5f2007-04-27 17:01:23 -060013MESA_TINY=0
Dan Nicholson00994ac2008-04-30 15:06:00 -070014MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
Brian Paula70ad912004-03-26 15:16:35 +000015
Adam Jackson8fcd1e02005-08-19 20:20:03 +000016# external projects. This should be useless now that we use libdrm.
Jon Smirl78be0b52005-07-02 21:28:01 +000017DRM_SOURCE_PATH=$(TOP)/../drm
Brian Paula70ad912004-03-26 15:16:35 +000018
19# Compiler and flags
20CC = cc
21CXX = CC
Ian Romanickb3492a22008-01-03 15:08:53 -080022HOST_CC = $(CC)
Brian Paula70ad912004-03-26 15:16:35 +000023CFLAGS = -O
24CXXFLAGS = -O
Dan Nicholson2a3e3382007-09-28 18:42:21 -060025LDFLAGS =
Brian Paula70ad912004-03-26 15:16:35 +000026GLU_CFLAGS =
Brian Paul9f4ccd82004-04-07 23:15:26 +000027
Brian Paul90c93bb2008-09-11 11:00:54 -060028# Compiler for building demos/tests/etc
29APP_CC = $(CC)
30APP_CXX = $(CXX)
31
Brian Paul9f4ccd82004-04-07 23:15:26 +000032# Misc tools and flags
Dan Nicholson9eee7f22008-07-08 07:44:58 -070033SHELL = /bin/sh
Dan Nicholsondb072ba2008-07-11 13:54:48 -070034MKLIB = $(SHELL) $(TOP)/bin/mklib
Brian Paula70ad912004-03-26 15:16:35 +000035MKLIB_OPTIONS =
Brian Paul9f4ccd82004-04-07 23:15:26 +000036MKDEP = makedepend
Keith Whitwellfc236722004-12-08 15:16:36 +000037MKDEP_OPTIONS = -fdepend
Eric Anholt2fb5d152004-06-01 00:06:14 +000038MAKE = make
Dan Nicholson4f5d97e2008-07-08 07:49:31 -070039INSTALL = $(SHELL) $(TOP)/bin/minstall
Brian Paula70ad912004-03-26 15:16:35 +000040
Dan Nicholson817af9b2008-01-15 09:52:17 -080041# Tools for regenerating glapi (generally only needed by the developers)
Brian Paulf4f1c292005-07-01 01:27:00 +000042PYTHON2 = python
43PYTHON_FLAGS = -t -O -O
Dan Nicholson817af9b2008-01-15 09:52:17 -080044INDENT = indent
45INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
Brian Paulf4f1c292005-07-01 01:27:00 +000046
Brian Paula70ad912004-03-26 15:16:35 +000047# Library names (base name)
48GL_LIB = GL
49GLU_LIB = GLU
50GLUT_LIB = glut
José Fonseca57d00012009-01-23 12:32:35 +000051GLEW_LIB = GLEW
Brian Paula70ad912004-03-26 15:16:35 +000052GLW_LIB = GLw
53OSMESA_LIB = OSMesa
54
55
56# Library names (actual file names)
Brian Paul05bbafa2005-03-23 02:12:21 +000057GL_LIB_NAME = lib$(GL_LIB).so
58GLU_LIB_NAME = lib$(GLU_LIB).so
59GLUT_LIB_NAME = lib$(GLUT_LIB).so
José Fonsecafcf93532009-01-24 16:54:59 +000060GLEW_LIB_NAME = lib$(GLEW_LIB).a
Brian Paul05bbafa2005-03-23 02:12:21 +000061GLW_LIB_NAME = lib$(GLW_LIB).so
Brian Paul4417d4c2005-06-07 15:25:08 +000062OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
Brian Paula70ad912004-03-26 15:16:35 +000063
Jeremy Huddleston98e7c1c2008-08-12 10:59:40 -070064# globs used to install the lib and all symlinks
65GL_LIB_GLOB = $(GL_LIB_NAME)*
66GLU_LIB_GLOB = $(GLU_LIB_NAME)*
67GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
68GLW_LIB_GLOB = $(GLW_LIB_NAME)*
69OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
Brian Paula70ad912004-03-26 15:16:35 +000070
71# Optional assembly language optimization files for libGL
José Fonseca90b2beb2008-02-19 13:27:13 +090072MESA_ASM_SOURCES =
Brian Paula70ad912004-03-26 15:16:35 +000073
Brian Paul9408fe02004-07-20 20:43:24 +000074# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
75# order to build the Motif widget too)
Brian Paul533befc2004-03-26 21:48:09 +000076GLW_SOURCES = GLwDrawA.c
Dan Nicholson776c60d2008-07-18 07:40:41 -070077MOTIF_CFLAGS = -I/usr/include/Motif1.2
Brian Paula70ad912004-03-26 15:16:35 +000078
79
Brian Paul0e794a12006-06-22 22:50:48 +000080# Directories to build
Brian Paul883f9892006-07-13 02:50:27 +000081LIB_DIR = lib
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +010082SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
Brian Paula70ad912004-03-26 15:16:35 +000083GLU_DIRS = sgi
Jakob Bornecrantz767b1ac2009-02-10 17:43:25 +010084DRIVER_DIRS = x11 osmesa
Brian Paulcb34c112005-05-05 13:08:06 +000085# Which subdirs under $(TOP)/progs/ to enter:
Brian5dba9962007-04-08 15:50:31 -060086PROGRAM_DIRS = demos redbook samples glsl xdemos
Brian Paula70ad912004-03-26 15:16:35 +000087
Jakob Bornecrantze59086a2008-07-13 18:04:49 +020088# EGL directories
89EGL_DRIVERS_DIRS = demo
Zack Rusind76a7b62007-10-24 08:34:01 -040090
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +010091# Gallium directories and
Jakob Bornecrantz43e62722009-02-10 16:23:02 +010092GALLIUM_DIRS = auxiliary drivers state_trackers
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +010093GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices
94GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
95GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace
96GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
97GALLIUM_WINSYS_DIRS = xlib egl_xlib
Jakob Bornecrantz43e62722009-02-10 16:23:02 +010098GALLIUM_WINSYS_DRM_DIRS =
99GALLIUM_STATE_TRACKERS_DIRS = glx
José Fonsecabfd59162008-02-18 14:25:04 +0900100
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +0100101
102# Library dependencies
Brian Paul2216aac2006-09-06 13:56:26 +0000103#EXTRA_LIB_PATH ?=
Ian Romanickffcb4d82008-01-03 14:59:14 -0800104GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
105OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
106GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
107GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
108GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
109APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
Dan Nicholson9ef1d9f2007-10-29 09:04:30 -0600110
111# Program dependencies - specific GL/glut libraries added in Makefiles
112APP_LIB_DEPS = -lm
Brian Paul0e794a12006-06-22 22:50:48 +0000113
Brian Paul0e794a12006-06-22 22:50:48 +0000114
115# Installation directories (for make install)
Brian Paul79b5d3e2006-10-19 20:11:15 +0000116INSTALL_DIR = /usr/local
Dan Nicholson11ac5b22008-07-03 09:17:44 -0700117INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
118INSTALL_INC_DIR = $(INSTALL_DIR)/include
119DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
Brian Paul883f9892006-07-13 02:50:27 +0000120
121# Where libGL will look for DRI hardware drivers
122DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
123
Dan Nicholson71e208b2008-11-24 11:01:57 -0800124# pkg-config substitutions
125GL_PC_REQ_PRIV =
126GL_PC_LIB_PRIV =
127GL_PC_CFLAGS =
128DRI_PC_REQ_PRIV =
129GLU_PC_REQ = gl
130GLU_PC_REQ_PRIV =
Dan Nicholson71e208b2008-11-24 11:01:57 -0800131GLU_PC_LIB_PRIV =
132GLU_PC_CFLAGS =
133GLUT_PC_REQ_PRIV =
134GLUT_PC_LIB_PRIV =
135GLUT_PC_CFLAGS =
136GLW_PC_REQ_PRIV =
137GLW_PC_LIB_PRIV =
138GLW_PC_CFLAGS =
Dan Nicholson8be02fc2008-12-14 09:35:29 -0800139OSMESA_PC_REQ =
140OSMESA_PC_LIB_PRIV =