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)
60 # Library names (actual file names)
61 GL_LIB_NAME = lib$(GL_LIB).so
62 GLU_LIB_NAME = lib$(GLU_LIB).so
63 GLUT_LIB_NAME = lib$(GLUT_LIB).so
64 GLEW_LIB_NAME = lib$(GLEW_LIB).a
65 GLW_LIB_NAME = lib$(GLW_LIB).so
66 OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
68 # globs used to install the lib and all symlinks
69 GL_LIB_GLOB = $(GL_LIB_NAME)*
70 GLU_LIB_GLOB = $(GLU_LIB_NAME)*
71 GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
72 GLW_LIB_GLOB = $(GLW_LIB_NAME)*
73 OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
75 # Optional assembly language optimization files for libGL
78 # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
79 # order to build the Motif widget too)
80 GLW_SOURCES = GLwDrawA.c
81 MOTIF_CFLAGS = -I/usr/include/Motif1.2
84 # Directories to build
86 SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
88 DRIVER_DIRS = x11 osmesa
89 # Which subdirs under $(TOP)/progs/ to enter:
90 PROGRAM_DIRS = demos redbook samples glsl xdemos
93 EGL_DRIVERS_DIRS = demo
95 # Gallium directories and
96 GALLIUM_DIRS = auxiliary drivers state_trackers
97 GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices
98 GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
99 GALLIUM_DRIVERS_DIRS = softpipe i915simple failover trace identity
100 GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
101 GALLIUM_WINSYS_DIRS = xlib egl_xlib
102 GALLIUM_WINSYS_DRM_DIRS =
103 GALLIUM_STATE_TRACKERS_DIRS = glx
106 # Library dependencies
108 GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
109 EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
110 OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
111 GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
112 GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
113 GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
114 APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
116 # Program dependencies - specific GL/glut libraries added in Makefiles
120 # Installation directories (for make install)
121 INSTALL_DIR = /usr/local
122 INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
123 INSTALL_INC_DIR = $(INSTALL_DIR)/include
124 DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
126 # Where libGL will look for DRI hardware drivers
127 DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
129 # Xorg driver install directory (for xorg state-tracker)
130 XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
132 # pkg-config substitutions