1 # Default/template configuration
3 # This is included by other config files which may override some
5 # Think of this as a base class from which configs are derived.
14 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
16 # external projects. This should be useless now that we use libdrm.
17 DRM_SOURCE_PATH=$(TOP)/../drm
26 HOST_CFLAGS = $(CFLAGS)
29 # Compiler for building demos/tests/etc
33 # Misc tools and flags
35 MKLIB = $(SHELL) $(TOP)/bin/mklib
38 MKDEP_OPTIONS = -fdepend
41 # Use MINSTALL for installing libraries, INSTALL for everything else
42 MINSTALL = $(SHELL) $(TOP)/bin/minstall
45 # Tools for regenerating glapi (generally only needed by the developers)
47 PYTHON_FLAGS = -t -O -O
49 INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
51 # Library names (base name)
58 GLESv1_CM_LIB = GLESv1_CM
63 # Library names (actual file names)
64 GL_LIB_NAME = lib$(GL_LIB).so
65 GLU_LIB_NAME = lib$(GLU_LIB).so
66 GLUT_LIB_NAME = lib$(GLUT_LIB).so
67 GLW_LIB_NAME = lib$(GLW_LIB).so
68 OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
69 EGL_LIB_NAME = lib$(EGL_LIB).so
70 GLESv1_CM_LIB_NAME = lib$(GLESv1_CM_LIB).so
71 GLESv2_LIB_NAME = lib$(GLESv2_LIB).so
72 VG_LIB_NAME = lib$(VG_LIB).so
74 # globs used to install the lib and all symlinks
75 GL_LIB_GLOB = $(GL_LIB_NAME)*
76 GLU_LIB_GLOB = $(GLU_LIB_NAME)*
77 GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
78 GLW_LIB_GLOB = $(GLW_LIB_NAME)*
79 OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
80 EGL_LIB_GLOB = $(EGL_LIB_NAME)*
81 GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)*
82 GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
83 VG_LIB_GLOB = $(VG_LIB_NAME)*
85 TALLOC_LIBS = `pkg-config --libs talloc`
86 TALLOC_CFLAGS = `pkg-config --cflags talloc`
88 # Optional assembly language optimization files for libGL
91 # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
92 # order to build the Motif widget too)
93 GLW_SOURCES = GLwDrawA.c
94 MOTIF_CFLAGS = -I/usr/include/Motif1.2
97 # Directories to build
99 SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
100 gallium egl gallium/winsys gallium/targets glu glut/glx glw
102 DRIVER_DIRS = x11 osmesa
104 # EGL drivers to build
105 EGL_DRIVERS_DIRS = glx
107 # Gallium directories and
108 GALLIUM_DIRS = auxiliary drivers state_trackers
109 GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
110 GALLIUM_DRIVERS_DIRS = softpipe trace rbug identity galahad i915 i965 svga r300 nvfx nv50 failover
111 GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
112 GALLIUM_WINSYS_DIRS = sw sw/xlib
113 GALLIUM_TARGET_DIRS = libgl-xlib
114 GALLIUM_STATE_TRACKERS_DIRS = glx vega
116 # native platforms EGL should support
118 EGL_CLIENT_APIS = $(GL_LIB)
120 # Library dependencies
122 GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread $(TALLOC_LIBS)
123 EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
124 OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
125 GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
126 GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
127 GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
128 APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
129 GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
130 GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
131 VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
133 # Program dependencies - specific GL/glut libraries added in Makefiles
139 # Installation directories (for make install)
140 INSTALL_DIR = /usr/local
141 INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
142 INSTALL_INC_DIR = $(INSTALL_DIR)/include
143 DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
145 # Where libGL will look for DRI hardware drivers
146 DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
148 # EGL driver install directory
149 EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
151 # Xorg driver install directory (for xorg state-tracker)
152 XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
154 # pkg-config substitutions
171 GLESv1_CM_PC_REQ_PRIV =
172 GLESv1_CM_PC_LIB_PRIV =
173 GLESv1_CM_PC_CFLAGS =