kbr@chromium.org | f2ba759 | 2013-06-14 05:29:08 +0000 | [diff] [blame] | 1 | # Default/template configuration |
| 2 | |
| 3 | # This is included by other config files which may override some |
| 4 | # of these variables. |
| 5 | # Think of this as a base class from which configs are derived. |
| 6 | |
| 7 | |
| 8 | CONFIG_NAME = default |
| 9 | |
| 10 | # Version info |
| 11 | MESA_MAJOR=9 |
| 12 | MESA_MINOR=0 |
| 13 | MESA_TINY=3 |
| 14 | MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) |
| 15 | |
| 16 | # external projects. This should be useless now that we use libdrm. |
| 17 | DRM_SOURCE_PATH=$(TOP)/../drm |
| 18 | |
| 19 | # Compiler and flags |
| 20 | CC = cc |
| 21 | CXX = CC |
| 22 | CFLAGS = -O |
| 23 | CXXFLAGS = -O |
| 24 | LDFLAGS = |
| 25 | GLU_CFLAGS = |
| 26 | GLX_TLS = no |
| 27 | |
| 28 | # Compiler for building demos/tests/etc |
| 29 | APP_CC = $(CC) |
| 30 | APP_CXX = $(CXX) |
| 31 | |
| 32 | # Misc tools and flags |
| 33 | SHELL = /bin/sh |
| 34 | MKLIB = $(SHELL) $(TOP)/bin/mklib |
| 35 | MKLIB_OPTIONS = |
| 36 | MKDEP = makedepend |
| 37 | MKDEP_OPTIONS = -fdepend |
| 38 | MAKE = make |
| 39 | FLEX = flex |
| 40 | BISON = bison |
| 41 | PKG_CONFIG = pkg-config |
| 42 | |
| 43 | # Use MINSTALL for installing libraries, INSTALL for everything else |
| 44 | MINSTALL = $(SHELL) $(TOP)/bin/minstall |
| 45 | INSTALL = $(MINSTALL) |
| 46 | |
| 47 | # Tools for regenerating glapi (generally only needed by the developers) |
| 48 | PYTHON2 = python |
| 49 | PYTHON_FLAGS = -t -O -O |
| 50 | INDENT = indent |
| 51 | INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool |
| 52 | |
| 53 | # Library names (base name) |
| 54 | GL_LIB = GL |
| 55 | GLU_LIB = GLU |
| 56 | GLW_LIB = GLw |
| 57 | OSMESA_LIB = OSMesa |
| 58 | EGL_LIB = EGL |
| 59 | GLESv1_CM_LIB = GLESv1_CM |
| 60 | GLESv2_LIB = GLESv2 |
| 61 | VG_LIB = OpenVG |
| 62 | GLAPI_LIB = glapi |
| 63 | |
| 64 | # Library names (actual file names) |
| 65 | GL_LIB_NAME = lib$(GL_LIB).so |
| 66 | GLU_LIB_NAME = lib$(GLU_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 |
| 73 | GLAPI_LIB_NAME = lib$(GLAPI_LIB).so |
| 74 | |
| 75 | # globs used to install the lib and all symlinks |
| 76 | GL_LIB_GLOB = $(GL_LIB_NAME)* |
| 77 | GLU_LIB_GLOB = $(GLU_LIB_NAME)* |
| 78 | GLW_LIB_GLOB = $(GLW_LIB_NAME)* |
| 79 | EGL_LIB_GLOB = $(EGL_LIB_NAME)* |
| 80 | GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)* |
| 81 | GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)* |
| 82 | VG_LIB_GLOB = $(VG_LIB_NAME)* |
| 83 | GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)* |
| 84 | |
| 85 | # Optional assembly language optimization files for libGL |
| 86 | MESA_ASM_FILES = |
| 87 | |
| 88 | # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in |
| 89 | # order to build the Motif widget too) |
| 90 | GLW_SOURCES = GLwDrawA.c |
| 91 | MOTIF_CFLAGS = -I/usr/include/Motif1.2 |
| 92 | |
| 93 | |
| 94 | # Directories to build |
| 95 | LIB_DIR = lib |
| 96 | SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \ |
| 97 | gallium egl gallium/winsys gallium/targets |
| 98 | DRIVER_DIRS = x11 osmesa |
| 99 | |
| 100 | # Gallium directories and |
| 101 | GALLIUM_DIRS = auxiliary drivers state_trackers |
| 102 | GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a |
| 103 | GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad i915 svga r300 nvfx nv50 |
| 104 | GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) |
| 105 | GALLIUM_WINSYS_DIRS = sw sw/xlib |
| 106 | GALLIUM_TARGET_DIRS = libgl-xlib |
| 107 | GALLIUM_STATE_TRACKERS_DIRS = glx vega |
| 108 | |
| 109 | # native platforms EGL should support |
| 110 | EGL_PLATFORMS = x11 |
| 111 | EGL_CLIENT_APIS = $(GL_LIB) |
| 112 | |
| 113 | # Library dependencies |
| 114 | #EXTRA_LIB_PATH ?= |
| 115 | GL_LIB_DEPS = -lX11 -lXext -lm -lpthread |
| 116 | EGL_LIB_DEPS = -ldl -lpthread |
| 117 | OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) |
| 118 | GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm |
| 119 | GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11 |
| 120 | GLESv1_CM_LIB_DEPS = -lpthread |
| 121 | GLESv2_LIB_DEPS = -lpthread |
| 122 | VG_LIB_DEPS = -lpthread |
| 123 | GLAPI_LIB_DEPS = -lpthread |
| 124 | |
| 125 | # Program dependencies - specific GL libraries added in Makefiles |
| 126 | X11_LIBS = -lX11 |
| 127 | |
| 128 | DLOPEN_LIBS = -ldl |
| 129 | |
| 130 | # Installation directories (for make install) |
| 131 | INSTALL_DIR = /usr/local |
| 132 | INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR) |
| 133 | INSTALL_INC_DIR = $(INSTALL_DIR)/include |
| 134 | DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri |
| 135 | |
| 136 | # Where libGL will look for DRI hardware drivers |
| 137 | DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) |
| 138 | |
| 139 | # EGL driver install directory |
| 140 | EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl |
| 141 | |
| 142 | # Xorg driver install directory (for xorg state-tracker) |
| 143 | XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers |
| 144 | |
| 145 | # pkg-config substitutions |
| 146 | GL_PC_REQ_PRIV = |
| 147 | GL_PC_LIB_PRIV = |
| 148 | GL_PC_CFLAGS = |
| 149 | DRI_PC_REQ_PRIV = |
| 150 | GLU_PC_REQ = gl |
| 151 | GLU_PC_REQ_PRIV = |
| 152 | GLU_PC_LIB_PRIV = |
| 153 | GLU_PC_CFLAGS = |
| 154 | GLW_PC_REQ_PRIV = |
| 155 | GLW_PC_LIB_PRIV = |
| 156 | GLW_PC_CFLAGS = |
| 157 | OSMESA_PC_REQ = |
| 158 | OSMESA_PC_LIB_PRIV = |
| 159 | GLESv1_CM_PC_REQ_PRIV = |
| 160 | GLESv1_CM_PC_LIB_PRIV = |
| 161 | GLESv1_CM_PC_CFLAGS = |
| 162 | GLESv2_PC_REQ_PRIV = |
| 163 | GLESv2_PC_LIB_PRIV = |
| 164 | GLESv2_PC_CFLAGS = |
| 165 | VG_PC_REQ_PRIV = |
| 166 | VG_PC_LIB_PRIV = |
| 167 | VG_PC_CFLAGS = |
| 168 | |
| 169 | # default targets |
| 170 | # this helps reduce the mismatch between our automake Makefiles and the old |
| 171 | # custom Makefiles while we transition. |
| 172 | |
| 173 | all: default |
| 174 | |
| 175 | am--refresh: |
| 176 | |
| 177 | distclean: clean |
| 178 | |
| 179 | check: |
| 180 | test: |