blob: 2ce725050dce88e0da4a1f2341ebf8c21f70347d [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 Paulf78eafc2009-09-08 16:46:06 -060012MESA_MINOR=7
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 =
Dan Nicholson9c8b6932009-09-12 09:27:01 -070026HOST_CFLAGS = $(CFLAGS)
Brian Paula70ad912004-03-26 15:16:35 +000027GLU_CFLAGS =
Brian Paul9f4ccd82004-04-07 23:15:26 +000028
Brian Paul90c93bb2008-09-11 11:00:54 -060029# Compiler for building demos/tests/etc
30APP_CC = $(CC)
31APP_CXX = $(CXX)
32
Brian Paul9f4ccd82004-04-07 23:15:26 +000033# Misc tools and flags
Dan Nicholson9eee7f22008-07-08 07:44:58 -070034SHELL = /bin/sh
Dan Nicholsondb072ba2008-07-11 13:54:48 -070035MKLIB = $(SHELL) $(TOP)/bin/mklib
Brian Paula70ad912004-03-26 15:16:35 +000036MKLIB_OPTIONS =
Brian Paul9f4ccd82004-04-07 23:15:26 +000037MKDEP = makedepend
Keith Whitwellfc236722004-12-08 15:16:36 +000038MKDEP_OPTIONS = -fdepend
Eric Anholt2fb5d152004-06-01 00:06:14 +000039MAKE = make
Dan Nicholsonbc302b22009-05-22 09:39:02 -070040
41# Use MINSTALL for installing libraries, INSTALL for everything else
42MINSTALL = $(SHELL) $(TOP)/bin/minstall
43INSTALL = $(MINSTALL)
Brian Paula70ad912004-03-26 15:16:35 +000044
Dan Nicholson817af9b2008-01-15 09:52:17 -080045# Tools for regenerating glapi (generally only needed by the developers)
Brian Paulf4f1c292005-07-01 01:27:00 +000046PYTHON2 = python
47PYTHON_FLAGS = -t -O -O
Dan Nicholson817af9b2008-01-15 09:52:17 -080048INDENT = indent
49INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
Brian Paulf4f1c292005-07-01 01:27:00 +000050
Brian Paula70ad912004-03-26 15:16:35 +000051# Library names (base name)
52GL_LIB = GL
53GLU_LIB = GLU
54GLUT_LIB = glut
José Fonseca57d00012009-01-23 12:32:35 +000055GLEW_LIB = GLEW
Brian Paula70ad912004-03-26 15:16:35 +000056GLW_LIB = GLw
57OSMESA_LIB = OSMesa
58
59
60# Library names (actual file names)
Brian Paul05bbafa2005-03-23 02:12:21 +000061GL_LIB_NAME = lib$(GL_LIB).so
62GLU_LIB_NAME = lib$(GLU_LIB).so
63GLUT_LIB_NAME = lib$(GLUT_LIB).so
José Fonsecafcf93532009-01-24 16:54:59 +000064GLEW_LIB_NAME = lib$(GLEW_LIB).a
Brian Paul05bbafa2005-03-23 02:12:21 +000065GLW_LIB_NAME = lib$(GLW_LIB).so
Brian Paul4417d4c2005-06-07 15:25:08 +000066OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
Brian Paula70ad912004-03-26 15:16:35 +000067
Jeremy Huddleston98e7c1c2008-08-12 10:59:40 -070068# globs used to install the lib and all symlinks
69GL_LIB_GLOB = $(GL_LIB_NAME)*
70GLU_LIB_GLOB = $(GLU_LIB_NAME)*
71GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
72GLW_LIB_GLOB = $(GLW_LIB_NAME)*
73OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
Brian Paula70ad912004-03-26 15:16:35 +000074
75# Optional assembly language optimization files for libGL
José Fonseca90b2beb2008-02-19 13:27:13 +090076MESA_ASM_SOURCES =
Brian Paula70ad912004-03-26 15:16:35 +000077
Brian Paul9408fe02004-07-20 20:43:24 +000078# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
79# order to build the Motif widget too)
Brian Paul533befc2004-03-26 21:48:09 +000080GLW_SOURCES = GLwDrawA.c
Dan Nicholson776c60d2008-07-18 07:40:41 -070081MOTIF_CFLAGS = -I/usr/include/Motif1.2
Brian Paula70ad912004-03-26 15:16:35 +000082
83
Brian Paul0e794a12006-06-22 22:50:48 +000084# Directories to build
Brian Paul883f9892006-07-13 02:50:27 +000085LIB_DIR = lib
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +010086SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
Brian Paula70ad912004-03-26 15:16:35 +000087GLU_DIRS = sgi
Jakob Bornecrantz767b1ac2009-02-10 17:43:25 +010088DRIVER_DIRS = x11 osmesa
Brian Paulcb34c112005-05-05 13:08:06 +000089# Which subdirs under $(TOP)/progs/ to enter:
Brian Paul24f31ab2009-10-01 13:11:25 -060090PROGRAM_DIRS = demos redbook samples glsl objviewer xdemos
Brian Paula70ad912004-03-26 15:16:35 +000091
Jakob Bornecrantze59086a2008-07-13 18:04:49 +020092# EGL directories
93EGL_DRIVERS_DIRS = demo
Zack Rusind76a7b62007-10-24 08:34:01 -040094
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +010095# Gallium directories and
Jakob Bornecrantz43e62722009-02-10 16:23:02 +010096GALLIUM_DIRS = auxiliary drivers state_trackers
Younes Mantonf5474722009-09-27 19:49:06 -040097GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +010098GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
Jakob Bornecrantzd60b2c62009-06-24 02:42:41 +020099GALLIUM_DRIVERS_DIRS = softpipe i915simple failover trace identity
Jakob Bornecrantzd67bd602009-02-20 11:03:18 +0000100GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +0100101GALLIUM_WINSYS_DIRS = xlib egl_xlib
Jakob Bornecrantz43e62722009-02-10 16:23:02 +0100102GALLIUM_WINSYS_DRM_DIRS =
103GALLIUM_STATE_TRACKERS_DIRS = glx
José Fonsecabfd59162008-02-18 14:25:04 +0900104
Jakob Bornecrantzb96d50d2009-02-10 13:59:35 +0100105
106# Library dependencies
Brian Paul2216aac2006-09-06 13:56:26 +0000107#EXTRA_LIB_PATH ?=
Ian Romanickffcb4d82008-01-03 14:59:14 -0800108GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
Chia-I Wu5a459d52009-08-21 13:53:36 +0800109EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
Ian Romanickffcb4d82008-01-03 14:59:14 -0800110OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
111GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
112GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
113GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
114APP_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 -0600115
116# Program dependencies - specific GL/glut libraries added in Makefiles
117APP_LIB_DEPS = -lm
Brian Paul0e794a12006-06-22 22:50:48 +0000118
Brian Paul0e794a12006-06-22 22:50:48 +0000119
120# Installation directories (for make install)
Brian Paul79b5d3e2006-10-19 20:11:15 +0000121INSTALL_DIR = /usr/local
Dan Nicholson11ac5b22008-07-03 09:17:44 -0700122INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
123INSTALL_INC_DIR = $(INSTALL_DIR)/include
124DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
Brian Paul883f9892006-07-13 02:50:27 +0000125
126# Where libGL will look for DRI hardware drivers
127DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
128
Joel Bosveld8acca482009-03-06 08:46:08 +0900129# Xorg driver install directory (for xorg state-tracker)
130XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
131
Dan Nicholson71e208b2008-11-24 11:01:57 -0800132# pkg-config substitutions
133GL_PC_REQ_PRIV =
134GL_PC_LIB_PRIV =
135GL_PC_CFLAGS =
136DRI_PC_REQ_PRIV =
137GLU_PC_REQ = gl
138GLU_PC_REQ_PRIV =
Dan Nicholson71e208b2008-11-24 11:01:57 -0800139GLU_PC_LIB_PRIV =
140GLU_PC_CFLAGS =
141GLUT_PC_REQ_PRIV =
142GLUT_PC_LIB_PRIV =
143GLUT_PC_CFLAGS =
144GLW_PC_REQ_PRIV =
145GLW_PC_LIB_PRIV =
146GLW_PC_CFLAGS =
Dan Nicholson8be02fc2008-12-14 09:35:29 -0800147OSMESA_PC_REQ =
148OSMESA_PC_LIB_PRIV =