| @@ -1,131 +1,22 @@ | | | @@ -1,131 +1,22 @@ |
1 | # $NetBSD: Makefile,v 1.3 2008/11/06 22:28:25 veego Exp $ | | 1 | # $NetBSD: Makefile,v 1.4 2008/11/18 17:03:58 cube Exp $ |
2 | | | 2 | |
3 | .include <bsd.own.mk> | | 3 | .include <bsd.own.mk> |
4 | | | 4 | |
5 | LIB= OSMesa | | 5 | LIB= OSMesa |
6 | | | 6 | |
7 | MESA_SRC_MODULES= main math vbo tnl shader swrast slang glapi common \ | | 7 | MESA_SRC_MODULES= main math vbo tnl shader swrast slang glapi common \ |
8 | osmesa | | 8 | osmesa |
9 | | | 9 | |
10 | .PATH: ${X11SRCDIR.MesaLib}/include/GL | | 10 | .PATH: ${X11SRCDIR.MesaLib}/include/GL |
11 | INCS= osmesa.h | | 11 | INCS= osmesa.h |
12 | INCSDIR= ${X11INCDIR}/GL | | 12 | INCSDIR= ${X11INCDIR}/GL |
13 | | | 13 | |
14 | CPPFLAGS+= ${X11FLAGS.THREADLIB} \ | | 14 | CPPFLAGS+= ${X11FLAGS.THREADLIB} \ |
15 | -DPTHREADS -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 \ | | 15 | -DPTHREADS -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 \ |
16 | -D_NETBSD_SOURCE -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS | | 16 | -D_NETBSD_SOURCE -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS |
17 | CFLAGS+= -pthread | | 17 | CFLAGS+= -pthread |
18 | | | 18 | |
19 | INCLUDES.all= . glapi main | | 19 | .include "libmesa.mk" |
20 | | | | |
21 | # Main sources | | | |
22 | PATHS.main= main | | | |
23 | INCLUDES.main= shader | | | |
24 | SRCS.main= \ | | | |
25 | accum.c api_arrayelt.c api_loopback.c api_noop.c api_validate.c \ | | | |
26 | arrayobj.c attrib.c blend.c bufferobj.c buffers.c clip.c colortab.c \ | | | |
27 | context.c convolve.c debug.c depth.c depthstencil.c dlist.c drawpix.c \ | | | |
28 | enable.c enums.c eval.c execmem.c extensions.c fbobject.c feedback.c \ | | | |
29 | fog.c framebuffer.c get.c getstring.c hash.c hint.c histogram.c \ | | | |
30 | image.c imports.c light.c lines.c matrix.c mipmap.c mm.c pixel.c \ | | | |
31 | points.c polygon.c queryobj.c rastpos.c rbadaptors.c renderbuffer.c \ | | | |
32 | shaders.c state.c stencil.c texcompress.c texcompress_fxt1.c \ | | | |
33 | texcompress_s3tc.c texenvprogram.c texformat.c teximage.c texobj.c \ | | | |
34 | texrender.c texstate.c texstore.c varray.c vtxfmt.c | | | |
35 | | | | |
36 | # Math sources | | | |
37 | PATHS.math= math | | | |
38 | SRCS.math= \ | | | |
39 | m_debug_clip.c m_debug_norm.c m_debug_xform.c m_eval.c m_matrix.c \ | | | |
40 | m_translate.c m_vector.c m_xform.c | | | |
41 | | | | |
42 | # VBO sources | | | |
43 | PATHS.vbo= vbo | | | |
44 | SRCS.vbo= \ | | | |
45 | vbo_context.c vbo_exec.c vbo_exec_api.c vbo_exec_array.c \ | | | |
46 | vbo_exec_draw.c vbo_exec_eval.c vbo_rebase.c vbo_split.c \ | | | |
47 | vbo_split_copy.c vbo_split_inplace.c vbo_save.c vbo_save_api.c \ | | | |
48 | vbo_save_draw.c vbo_save_loopback.c | | | |
49 | | | | |
50 | COPTS.vbo_save_draw.c= -Wno-error | | | |
51 | | | | |
52 | # TNL sources | | | |
53 | PATHS.tnl= tnl | | | |
54 | INCLUDES.tnl= shader | | | |
55 | SRCS.tnl= \ | | | |
56 | t_context.c t_draw.c t_pipeline.c t_vb_cull.c t_vb_fog.c t_vb_light.c \ | | | |
57 | t_vb_normals.c t_vb_points.c t_vb_program.c t_vb_render.c \ | | | |
58 | t_vb_texgen.c t_vb_texmat.c t_vb_vertex.c t_vertex.c t_vertex_sse.c \ | | | |
59 | t_vertex_generic.c t_vp_build.c | | | |
60 | | | | |
61 | # Shader sources | | | |
62 | PATHS.shader= shader shader/grammar | | | |
63 | INCLUDES.shader= shader/slang shader/grammar | | | |
64 | SRCS.shader= \ | | | |
65 | arbprogparse.c arbprogram.c atifragshader.c grammar_mesa.c \ | | | |
66 | nvfragparse.c nvprogram.c nvvertparse.c prog_debug.c prog_execute.c \ | | | |
67 | prog_instruction.c prog_parameter.c prog_print.c prog_statevars.c \ | | | |
68 | program.c programopt.c shader_api.c | | | |
69 | | | | |
70 | # Software raster sources | | | |
71 | PATHS.swrast= swrast swrast_setup | | | |
72 | INCLUDES.swrast= shader | | | |
73 | SRCS.swrast= \ | | | |
74 | s_aaline.c s_aatriangle.c s_accum.c s_alpha.c s_atifragshader.c \ | | | |
75 | s_bitmap.c s_blend.c s_blit.c s_buffers.c s_copypix.c s_context.c \ | | | |
76 | s_depth.c s_drawpix.c s_feedback.c s_fog.c s_fragprog.c s_imaging.c \ | | | |
77 | s_lines.c s_logic.c s_masking.c s_points.c s_readpix.c s_span.c \ | | | |
78 | s_stencil.c s_texcombine.c s_texfilter.c s_texstore.c s_triangle.c \ | | | |
79 | s_zoom.c ss_context.c ss_triangle.c | | | |
80 | | | | |
81 | # Shader language sources | | | |
82 | PATHS.slang= shader/slang | | | |
83 | INCLUDES.slang= shader shader/grammar | | | |
84 | SRCS.slang= \ | | | |
85 | slang_builtin.c slang_codegen.c slang_compile.c \ | | | |
86 | slang_compile_function.c slang_compile_operation.c \ | | | |
87 | slang_compile_struct.c slang_compile_variable.c slang_emit.c \ | | | |
88 | slang_ir.c slang_label.c slang_library_noise.c slang_link.c \ | | | |
89 | slang_log.c slang_mem.c slang_preprocess.c slang_print.c \ | | | |
90 | slang_simplify.c slang_storage.c slang_typeinfo.c slang_vartable.c \ | | | |
91 | slang_utility.c | | | |
92 | | | | |
93 | # GL API sources | | | |
94 | PATHS.glapi= glapi main | | | |
95 | SRCS.glapi= \ | | | |
96 | dispatch.c glapi.c glthread.c | | | |
97 | | | | |
98 | # Common driver sources | | | |
99 | PATHS.common= drivers/common | | | |
100 | INCLUDES.common= shader | | | |
101 | SRCS.common= \ | | | |
102 | driverfuncs.c | | | |
103 | | | | |
104 | # OSMesa driver sources | | | |
105 | PATHS.osmesa= drivers/osmesa | | | |
106 | INCLUDES.osmesa= shader | | | |
107 | SRCS.osmesa= \ | | | |
108 | osmesa.c | | | |
109 | | | | |
110 | .for _mod_ in ${MESA_SRC_MODULES} | | | |
111 | | | | |
112 | SRCS+= ${SRCS.${_mod_}} | | | |
113 | | | | |
114 | . for _path_ in ${PATHS.${_mod_}} | | | |
115 | .PATH: ${X11SRCDIR.MesaLib}/src/mesa/${_path_} | | | |
116 | . endfor | | | |
117 | | | | |
118 | . for _path_ in ${INCLUDES.${_mod_}} | | | |
119 | CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/mesa/${_path_} | | | |
120 | . endfor | | | |
121 | | | | |
122 | .endfor | | | |
123 | | | | |
124 | .for _path_ in ${INCLUDES.all} | | | |
125 | CPPFLAGS+= -I${X11SRCDIR.MesaLib}/src/mesa/${_path_} | | | |
126 | .endfor | | | |
127 | | | | |
128 | LIBDPLIBS= m ${.CURDIR}/../../../../../lib/libm | | | |
129 | | | 20 | |
130 | .include <bsd.x11.mk> | | 21 | .include <bsd.x11.mk> |
131 | .include <bsd.lib.mk> | | 22 | .include <bsd.lib.mk> |