1# $NetBSD: libmesa7.mk,v 1.1 2015/01/05 03:45:31 mrg Exp $ 2 3# This copy for old MesaLib 7.x drivers only. 4 5# 6# Consumer of this Makefile should set MESA_SRC_MODULES. 7 8INCLUDES.all= mapi mesa mesa/main 9 10# The source file lists derived from src/mesa/sources.mak and 11# src/mapi/glapi/sources.mak. Please keep the organization in line 12# with those files. 13 14# Main sources 15PATHS.main= mesa/main 16INCLUDES.main= glsl 17SRCS.main= \ 18 api_exec_es1.c \ 19 api_exec_es2.c 20 21SRCS.main+= \ 22 api_arrayelt.c \ 23 api_exec.c \ 24 api_loopback.c \ 25 api_noop.c \ 26 api_validate.c \ 27 accum.c \ 28 arbprogram.c \ 29 atifragshader.c \ 30 attrib.c \ 31 arrayobj.c \ 32 blend.c \ 33 bufferobj.c \ 34 buffers.c \ 35 clear.c \ 36 clip.c \ 37 colortab.c \ 38 condrender.c \ 39 context.c \ 40 convolve.c \ 41 cpuinfo.c \ 42 debug.c \ 43 depth.c \ 44 depthstencil.c \ 45 dlist.c \ 46 dlopen.c \ 47 drawpix.c \ 48 drawtex.c \ 49 enable.c \ 50 enums.c \ 51 MESAeval.c \ 52 execmem.c \ 53 extensions.c \ 54 fbobject.c \ 55 feedback.c \ 56 ffvertex_prog.c \ 57 fog.c \ 58 formats.c \ 59 framebuffer.c \ 60 get.c \ 61 getstring.c \ 62 hash.c \ 63 hint.c \ 64 histogram.c \ 65 image.c \ 66 imports.c \ 67 light.c \ 68 lines.c \ 69 matrix.c \ 70 mipmap.c \ 71 mm.c \ 72 multisample.c \ 73 nvprogram.c \ 74 pack.c \ 75 pbo.c \ 76 MESApixel.c \ 77 MESApixelstore.c \ 78 pixeltransfer.c \ 79 points.c \ 80 polygon.c \ 81 queryobj.c \ 82 querymatrix.c \ 83 rastpos.c \ 84 readpix.c \ 85 remap.c \ 86 renderbuffer.c \ 87 samplerobj.c \ 88 scissor.c \ 89 shaderapi.c \ 90 shaderobj.c \ 91 shared.c \ 92 state.c \ 93 stencil.c \ 94 syncobj.c \ 95 texcompress.c \ 96 texcompress_rgtc.c \ 97 texcompress_s3tc.c \ 98 texcompress_fxt1.c \ 99 texenv.c \ 100 texfetch.c \ 101 texformat.c \ 102 texgen.c \ 103 texgetimage.c \ 104 teximage.c \ 105 texobj.c \ 106 texpal.c \ 107 texparam.c \ 108 texstate.c \ 109 texstore.c \ 110 texturebarrier.c \ 111 transformfeedback.c \ 112 uniforms.c \ 113 varray.c \ 114 version.c \ 115 viewport.c \ 116 vtxfmt.c 117 118SRCS.main+= \ 119 ff_fragment_shader.cpp 120 121# XXX avoid source name clashes with glx 122.PATH: ${X11SRCDIR.MesaLib7}/src/mesa/main 123BUILDSYMLINKS= ${X11SRCDIR.MesaLib7}/src/mesa/main/pixel.c MESApixel.c \ 124 ${X11SRCDIR.MesaLib7}/src/mesa/main/pixelstore.c MESApixelstore.c \ 125 ${X11SRCDIR.MesaLib7}/src/mesa/main/eval.c MESAeval.c 126 127# Math sources 128PATHS.math= mesa/math 129SRCS.math= \ 130 m_debug_clip.c \ 131 m_debug_norm.c \ 132 m_debug_xform.c \ 133 m_eval.c \ 134 m_matrix.c \ 135 m_translate.c \ 136 m_vector.c 137 138SRCS.math+= \ 139 m_xform.c 140 141# Software raster sources 142PATHS.swrast= mesa/swrast 143SRCS.swrast= \ 144 s_aaline.c \ 145 s_aatriangle.c \ 146 s_accum.c \ 147 s_alpha.c \ 148 s_atifragshader.c \ 149 s_bitmap.c \ 150 s_blend.c \ 151 s_blit.c \ 152 s_clear.c \ 153 s_copypix.c \ 154 s_context.c \ 155 s_depth.c \ 156 s_drawpix.c \ 157 s_feedback.c \ 158 s_fog.c \ 159 s_fragprog.c \ 160 s_lines.c \ 161 s_logic.c \ 162 s_masking.c \ 163 s_points.c \ 164 s_readpix.c \ 165 s_span.c \ 166 s_stencil.c \ 167 s_texcombine.c \ 168 s_texfilter.c \ 169 s_texrender.c \ 170 s_triangle.c \ 171 s_zoom.c 172 173# swrast_setup 174PATHS.ss= mesa/swrast_setup 175SRCS.ss= \ 176 ss_context.c \ 177 ss_triangle.c 178 179# TNL sources 180PATHS.tnl= mesa/tnl 181SRCS.tnl= \ 182 t_context.c \ 183 t_pipeline.c \ 184 t_draw.c \ 185 t_rasterpos.c \ 186 t_vb_program.c \ 187 t_vb_render.c \ 188 t_vb_texgen.c \ 189 t_vb_texmat.c \ 190 t_vb_vertex.c \ 191 t_vb_fog.c \ 192 t_vb_light.c \ 193 t_vb_normals.c \ 194 t_vb_points.c \ 195 t_vp_build.c \ 196 t_vertex.c \ 197 t_vertex_sse.c \ 198 t_vertex_generic.c 199 200# VBO sources 201PATHS.vbo= mesa/vbo 202SRCS.vbo= \ 203 vbo_context.c \ 204 vbo_exec.c \ 205 vbo_exec_api.c \ 206 vbo_exec_array.c \ 207 vbo_exec_draw.c \ 208 vbo_exec_eval.c \ 209 vbo_rebase.c \ 210 vbo_split.c \ 211 vbo_split_copy.c \ 212 vbo_split_inplace.c \ 213 vbo_save.c \ 214 vbo_save_api.c \ 215 vbo_save_draw.c \ 216 vbo_save_loopback.c 217 218# statetracker 219 220# Program sources 221PATHS.program= mesa/program 222SRCS.program= \ 223 arbprogparse.c \ 224 hash_table.c \ 225 lex.yy.c \ 226 nvfragparse.c \ 227 nvvertparse.c \ 228 program.c \ 229 program_parse.tab.c \ 230 program_parse_extra.c \ 231 prog_cache.c \ 232 prog_execute.c \ 233 prog_instruction.c \ 234 prog_noise.c \ 235 prog_optimize.c \ 236 prog_parameter.c \ 237 prog_parameter_layout.c \ 238 prog_print.c \ 239 prog_statevars.c \ 240 prog_uniform.c \ 241 programopt.c \ 242 register_allocate.c \ 243 symbol_table.c 244 245SRCS.program+= \ 246 ir_to_mesa.cpp \ 247 sampler.cpp 248 249# Unused parts of mesa/sources.mak. 250.if 0 251ASM_C_SOURCES = \ 252 x86/common_x86.c \ 253 x86/x86_xform.c \ 254 x86/3dnow.c \ 255 x86/sse.c \ 256 x86/rtasm/x86sse.c \ 257 sparc/sparc.c \ 258 ppc/common_ppc.c \ 259 x86-64/x86-64.c 260 261X86_SOURCES = \ 262 x86/common_x86_asm.S \ 263 x86/x86_xform2.S \ 264 x86/x86_xform3.S \ 265 x86/x86_xform4.S \ 266 x86/x86_cliptest.S \ 267 x86/mmx_blend.S \ 268 x86/3dnow_xform1.S \ 269 x86/3dnow_xform2.S \ 270 x86/3dnow_xform3.S \ 271 x86/3dnow_xform4.S \ 272 x86/3dnow_normal.S \ 273 x86/sse_xform1.S \ 274 x86/sse_xform2.S \ 275 x86/sse_xform3.S \ 276 x86/sse_xform4.S \ 277 x86/sse_normal.S \ 278 x86/read_rgba_span_x86.S 279 280X86-64_SOURCES = \ 281 x86-64/xform4.S 282 283SPARC_SOURCES = \ 284 sparc/clip.S \ 285 sparc/norm.S \ 286 sparc/xform.S 287.endif 288 289# Common driver sources 290PATHS.common= mesa/drivers/common 291SRCS.common= \ 292 driverfuncs.c \ 293 meta.c 294 295# OSMesa driver sources 296PATHS.osmesa= mesa/drivers/osmesa 297SRCS.osmesa= \ 298 osmesa.c 299 300# GLAPI sources 301PATHS.glapi= mapi/glapi 302SRCS.glapi = \ 303 glapi_dispatch.c \ 304 glapi_entrypoint.c \ 305 glapi_gentable.c \ 306 glapi_getproc.c \ 307 glapi_nop.c \ 308 glthread.c \ 309 glapi.c 310 311# Unused parts of mapi/glapi/sources.mak. 312.if 0 313X86_API = \ 314 glapi_x86.S 315 316X86-64_API = \ 317 glapi_x86-64.S 318 319SPARC_API = \ 320 glapi_sparc.S 321.endif 322 323.for _mod_ in ${MESA_SRC_MODULES} 324 325SRCS+= ${SRCS.${_mod_}} 326 327. for _path_ in ${PATHS.${_mod_}} 328.PATH: ${X11SRCDIR.MesaLib7}/src/${_path_} 329. endfor 330 331. for _path_ in ${INCLUDES.${_mod_}} 332CPPFLAGS+= -I${X11SRCDIR.MesaLib7}/src/${_path_} 333. endfor 334 335.endfor 336 337.for _path_ in ${INCLUDES.all} 338CPPFLAGS+= -I${X11SRCDIR.MesaLib7}/src/${_path_} 339.endfor 340 341LIBDPLIBS= m ${NETBSDSRCDIR}/lib/libm 342 343# build the shader headers 344.include "../libglsl7.mk" 345 346CPPFLAGS+= -I. 347CPPFLAGS+= -I${X11SRCDIR.MesaLib7}/include 348 349cleandir: cleanmesa 350cleanmesa: .PHONY 351 -@if [ -d library ]; then rmdir library; fi 352