blob: 7b79cf2c1b366e954775988491fade6744dad375 [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
22CFLAGS = -O
23CXXFLAGS = -O
Dan Nicholson2a3e3382007-09-28 18:42:21 -060024LDFLAGS =
Brian Paula70ad912004-03-26 15:16:35 +000025GLU_CFLAGS =
Brian Paul9f4ccd82004-04-07 23:15:26 +000026
27# Misc tools and flags
Dan Nicholson9eee7f22008-07-08 07:44:58 -070028SHELL = /bin/sh
Dan Nicholsondb072ba2008-07-11 13:54:48 -070029MKLIB = $(SHELL) $(TOP)/bin/mklib
Brian Paula70ad912004-03-26 15:16:35 +000030MKLIB_OPTIONS =
Brian Paul9f4ccd82004-04-07 23:15:26 +000031MKDEP = makedepend
Keith Whitwellfc236722004-12-08 15:16:36 +000032MKDEP_OPTIONS = -fdepend
Eric Anholt2fb5d152004-06-01 00:06:14 +000033MAKE = make
Dan Nicholson4f5d97e2008-07-08 07:49:31 -070034INSTALL = $(SHELL) $(TOP)/bin/minstall
Brian Paula70ad912004-03-26 15:16:35 +000035
Dan Nicholson817af9b2008-01-15 09:52:17 -080036# Tools for regenerating glapi (generally only needed by the developers)
Brian Paulf4f1c292005-07-01 01:27:00 +000037PYTHON2 = python
38PYTHON_FLAGS = -t -O -O
Dan Nicholson817af9b2008-01-15 09:52:17 -080039INDENT = indent
40INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
Brian Paulf4f1c292005-07-01 01:27:00 +000041
Brian Paula70ad912004-03-26 15:16:35 +000042# Library names (base name)
43GL_LIB = GL
44GLU_LIB = GLU
45GLUT_LIB = glut
46GLW_LIB = GLw
47OSMESA_LIB = OSMesa
48
49
50# Library names (actual file names)
Brian Paul05bbafa2005-03-23 02:12:21 +000051GL_LIB_NAME = lib$(GL_LIB).so
52GLU_LIB_NAME = lib$(GLU_LIB).so
53GLUT_LIB_NAME = lib$(GLUT_LIB).so
54GLW_LIB_NAME = lib$(GLW_LIB).so
Brian Paul4417d4c2005-06-07 15:25:08 +000055OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
Brian Paula70ad912004-03-26 15:16:35 +000056
Jeremy Huddleston98e7c1c2008-08-12 10:59:40 -070057# globs used to install the lib and all symlinks
58GL_LIB_GLOB = $(GL_LIB_NAME)*
59GLU_LIB_GLOB = $(GLU_LIB_NAME)*
60GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
61GLW_LIB_GLOB = $(GLW_LIB_NAME)*
62OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
Brian Paula70ad912004-03-26 15:16:35 +000063
64# Optional assembly language optimization files for libGL
65ASM_SOURCES =
66
Brian Paul9408fe02004-07-20 20:43:24 +000067# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
68# order to build the Motif widget too)
Brian Paul533befc2004-03-26 21:48:09 +000069GLW_SOURCES = GLwDrawA.c
Dan Nicholson776c60d2008-07-18 07:40:41 -070070MOTIF_CFLAGS = -I/usr/include/Motif1.2
Brian Paula70ad912004-03-26 15:16:35 +000071
72
Brian Paul0e794a12006-06-22 22:50:48 +000073# Directories to build
Brian Paul883f9892006-07-13 02:50:27 +000074LIB_DIR = lib
Brian Paulf4044952004-03-26 15:46:53 +000075SRC_DIRS = mesa glu glut/glx glw
Brian Paula70ad912004-03-26 15:16:35 +000076GLU_DIRS = sgi
Brian Paul77497eb2008-07-21 09:01:21 -060077DRIVER_DIRS = x11 osmesa
Brian Paulcb34c112005-05-05 13:08:06 +000078# Which subdirs under $(TOP)/progs/ to enter:
Brian5dba9962007-04-08 15:50:31 -060079PROGRAM_DIRS = demos redbook samples glsl xdemos
Brian Paula70ad912004-03-26 15:16:35 +000080
81
Dan Nicholson9ef1d9f2007-10-29 09:04:30 -060082# Library dependencies
Brian Paul2216aac2006-09-06 13:56:26 +000083#EXTRA_LIB_PATH ?=
Ian Romanick9204e872005-07-02 07:38:40 +000084GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
Brian Paul883f9892006-07-13 02:50:27 +000085OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
86GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
Briance987792007-12-03 11:58:55 -070087GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXi -lm
Brian Paul883f9892006-07-13 02:50:27 +000088GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
Dan Nicholson9ef1d9f2007-10-29 09:04:30 -060089
90# Program dependencies - specific GL/glut libraries added in Makefiles
91APP_LIB_DEPS = -lm
Brian Paul0e794a12006-06-22 22:50:48 +000092
Brian Paul0e794a12006-06-22 22:50:48 +000093
94# Installation directories (for make install)
Brian Paul79b5d3e2006-10-19 20:11:15 +000095INSTALL_DIR = /usr/local
Dan Nicholson11ac5b22008-07-03 09:17:44 -070096INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
97INSTALL_INC_DIR = $(INSTALL_DIR)/include
98DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
Brian Paul883f9892006-07-13 02:50:27 +000099
100# Where libGL will look for DRI hardware drivers
101DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
102
Dan Nicholson71e208b2008-11-24 11:01:57 -0800103# pkg-config substitutions
104GL_PC_REQ_PRIV =
105GL_PC_LIB_PRIV =
106GL_PC_CFLAGS =
107DRI_PC_REQ_PRIV =
108GLU_PC_REQ = gl
109GLU_PC_REQ_PRIV =
Dan Nicholson71e208b2008-11-24 11:01:57 -0800110GLU_PC_LIB_PRIV =
111GLU_PC_CFLAGS =
112GLUT_PC_REQ_PRIV =
113GLUT_PC_LIB_PRIV =
114GLUT_PC_CFLAGS =
115GLW_PC_REQ_PRIV =
116GLW_PC_LIB_PRIV =
117GLW_PC_CFLAGS =
Dan Nicholson8be02fc2008-12-14 09:35:29 -0800118OSMESA_PC_REQ =
119OSMESA_PC_LIB_PRIV =