# Default/template configuration

# This is included by other config files which may override some
# of these variables.
# Think of this as a base class from which configs are derived.


CONFIG_NAME = default

# Version info
MESA_MAJOR=7
MESA_MINOR=3
MESA_TINY=0
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)

# external projects.  This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm

# Compiler and flags
CC = cc
CXX = CC
HOST_CC = $(CC)
CFLAGS = -O
CXXFLAGS = -O
LDFLAGS =
GLU_CFLAGS = 

# Compiler for building demos/tests/etc
APP_CC = $(CC)
APP_CXX = $(CXX)

# Misc tools and flags
SHELL = /bin/sh
MKLIB = $(SHELL) $(TOP)/bin/mklib
MKLIB_OPTIONS = 
MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
MAKE = make
INSTALL = $(SHELL) $(TOP)/bin/minstall

# Tools for regenerating glapi (generally only needed by the developers)
PYTHON2 = python
PYTHON_FLAGS = -t -O -O
INDENT = indent
INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool

# Library names (base name)
GL_LIB = GL
GLU_LIB = GLU
GLUT_LIB = glut
GLEW_LIB = GLEW
GLW_LIB = GLw
OSMESA_LIB = OSMesa


# Library names (actual file names)
GL_LIB_NAME = lib$(GL_LIB).so
GLU_LIB_NAME = lib$(GLU_LIB).so
GLUT_LIB_NAME = lib$(GLUT_LIB).so
GLEW_LIB_NAME = lib$(GLEW_LIB).a
GLW_LIB_NAME = lib$(GLW_LIB).so
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so

# globs used to install the lib and all symlinks
GL_LIB_GLOB = $(GL_LIB_NAME)*
GLU_LIB_GLOB = $(GLU_LIB_NAME)*
GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
GLW_LIB_GLOB = $(GLW_LIB_NAME)*
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*

# Optional assembly language optimization files for libGL
MESA_ASM_SOURCES = 

# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
# order to build the Motif widget too)
GLW_SOURCES = GLwDrawA.c
MOTIF_CFLAGS = -I/usr/include/Motif1.2


# Directories to build
LIB_DIR = lib
SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter:
PROGRAM_DIRS = demos redbook samples glsl xdemos

# EGL directories
EGL_DRIVERS_DIRS = demo

# Gallium directories and 
GALLIUM_DIRS = auxiliary drivers state_trackers
GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
GALLIUM_DRIVERS_DIRS = softpipe i915simple failover trace
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
GALLIUM_WINSYS_DIRS = xlib egl_xlib
GALLIUM_WINSYS_DRM_DIRS =
GALLIUM_STATE_TRACKERS_DIRS = glx


# Library dependencies
#EXTRA_LIB_PATH ?=
GL_LIB_DEPS     = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
EGL_LIB_DEPS    = $(EXTRA_LIB_PATH) -lX11 -ldl
OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS    = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS   = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
GLW_LIB_DEPS    = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
APP_LIB_DEPS    = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm

# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm


# Installation directories (for make install)
INSTALL_DIR = /usr/local
INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
INSTALL_INC_DIR = $(INSTALL_DIR)/include
DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri

# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)

# pkg-config substitutions
GL_PC_REQ_PRIV =
GL_PC_LIB_PRIV =
GL_PC_CFLAGS =
DRI_PC_REQ_PRIV =
GLU_PC_REQ = gl
GLU_PC_REQ_PRIV =
GLU_PC_LIB_PRIV =
GLU_PC_CFLAGS =
GLUT_PC_REQ_PRIV =
GLUT_PC_LIB_PRIV =
GLUT_PC_CFLAGS =
GLW_PC_REQ_PRIV =
GLW_PC_LIB_PRIV =
GLW_PC_CFLAGS =
OSMESA_PC_REQ =
OSMESA_PC_LIB_PRIV =