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)
30 # Compiler for building demos/tests/etc
34 # Misc tools and flags
36 MKLIB = $(SHELL) $(TOP)/bin/mklib
39 MKDEP_OPTIONS = -fdepend
44 # Use MINSTALL for installing libraries, INSTALL for everything else
45 MINSTALL = $(SHELL) $(TOP)/bin/minstall
48 # Tools for regenerating glapi (generally only needed by the developers)
50 PYTHON_FLAGS = -t -O -O
52 INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
54 # Library names (base name)
61 GLESv1_CM_LIB = GLESv1_CM
65 WAYLAND_EGL_LIB = wayland-egl
68 # Library names (actual file names)
69 GL_LIB_NAME = lib$(GL_LIB).so
70 GLU_LIB_NAME = lib$(GLU_LIB).so
71 GLUT_LIB_NAME = lib$(GLUT_LIB).so
72 GLW_LIB_NAME = lib$(GLW_LIB).so
73 OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
74 EGL_LIB_NAME = lib$(EGL_LIB).so
75 GLESv1_CM_LIB_NAME = lib$(GLESv1_CM_LIB).so
76 GLESv2_LIB_NAME = lib$(GLESv2_LIB).so
77 VG_LIB_NAME = lib$(VG_LIB).so
78 GLAPI_LIB_NAME = lib$(GLAPI_LIB).so
79 WAYLAND_EGL_LIB_NAME = lib$(WAYLAND_EGL_LIB).so
81 # globs used to install the lib and all symlinks
82 GL_LIB_GLOB = $(GL_LIB_NAME)*
83 GLU_LIB_GLOB = $(GLU_LIB_NAME)*
84 GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
85 GLW_LIB_GLOB = $(GLW_LIB_NAME)*
86 OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
87 EGL_LIB_GLOB = $(EGL_LIB_NAME)*
88 GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)*
89 GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
90 VG_LIB_GLOB = $(VG_LIB_NAME)*
91 GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)*
92 WAYLAND_EGL_LIB_GLOB = $(WAYLAND_EGL_LIB_NAME)*
94 DRI_CFLAGS = $(CFLAGS)
95 DRI_CXXFLAGS = $(CXXFLAGS)
97 # Optional assembly language optimization files for libGL
100 # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
101 # order to build the Motif widget too)
102 GLW_SOURCES = GLwDrawA.c
103 MOTIF_CFLAGS = -I/usr/include/Motif1.2
106 # Directories to build
108 SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
109 gallium egl gallium/winsys gallium/targets glu glut/glx glw
111 DRIVER_DIRS = x11 osmesa
113 # EGL drivers to build
114 EGL_DRIVERS_DIRS = glx
116 # Gallium directories and
117 GALLIUM_DIRS = auxiliary drivers state_trackers
118 GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
119 GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad i915 i965 svga r300 nvfx nv50 failover
120 GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
121 GALLIUM_WINSYS_DIRS = sw sw/xlib
122 GALLIUM_TARGET_DIRS = libgl-xlib
123 GALLIUM_STATE_TRACKERS_DIRS = glx vega
125 # native platforms EGL should support
127 EGL_CLIENT_APIS = $(GL_LIB)
129 # Library dependencies
131 GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
132 EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
133 OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
134 GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
135 GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
136 GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
137 APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
138 GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
139 GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
140 VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
141 GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
142 WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -lwayland-client -ldrm
144 # Program dependencies - specific GL/glut libraries added in Makefiles
150 # Installation directories (for make install)
151 INSTALL_DIR = /usr/local
152 INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
153 INSTALL_INC_DIR = $(INSTALL_DIR)/include
154 DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
156 # Where libGL will look for DRI hardware drivers
157 DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
159 # EGL driver install directory
160 EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
162 # Xorg driver install directory (for xorg state-tracker)
163 XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
165 # pkg-config substitutions
182 GLESv1_CM_PC_REQ_PRIV =
183 GLESv1_CM_PC_LIB_PRIV =
184 GLESv1_CM_PC_CFLAGS =
191 WAYLAND_EGL_PC_REQ_PRIV =
192 WAYLAND_EGL_PC_LIB_PRIV =
193 WAYLAND_EGL_PC_CFLAGS =