diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-11-21 03:40:48 +0900 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-11-21 10:44:30 +0900 |
commit | 72ebf4fd03fdf64b483026879e18a3158be0c6c8 (patch) | |
tree | 47ad20a58695bb4092981b5d1713aa4971291a17 /progs | |
parent | 85063fe9438cece2d338cd6e4deea5c081943aa4 (diff) |
scons: Build progs.
Just demos and trivial dirs for starters.
Diffstat (limited to 'progs')
-rw-r--r-- | progs/SConscript | 4 | ||||
-rw-r--r-- | progs/SConstruct | 43 | ||||
-rw-r--r-- | progs/demos/SConscript | 71 | ||||
-rw-r--r-- | progs/trivial/SConscript | 163 |
4 files changed, 281 insertions, 0 deletions
diff --git a/progs/SConscript b/progs/SConscript new file mode 100644 index 0000000000..245fc26725 --- /dev/null +++ b/progs/SConscript @@ -0,0 +1,4 @@ +SConscript([ + 'demos/SConscript', + 'trivial/SConscript', +]) diff --git a/progs/SConstruct b/progs/SConstruct new file mode 100644 index 0000000000..ac5314fac5 --- /dev/null +++ b/progs/SConstruct @@ -0,0 +1,43 @@ +import os +import os.path +import sys + +env = Environment( + tools = ['generic'], + toolpath = ['../scons'], + ENV = os.environ, +) + + +# Use Mesa's headers and libs +if 0: + env.Append(CPPPATH = ['#../include']) + env.Append(LIBPATH = ['#../lib']) + + +conf = Configure(env) + +# OpenGL +if env['platform'] == 'windows': + env.Prepend(LIBS = ['glu32', 'opengl32']) +else: + env.Prepend(LIBS = ['GLU', 'GL']) + +# Glut +env['GLUT'] = False +if conf.CheckCHeader('GL/glut.h'): + if env['platform'] == 'windows': + env['GLUT_LIB'] = 'glut32' + else: + env['GLUT_LIB'] = 'glut' + env['GLUT'] = True + +conf.Finish() + + +Export('env') + +SConscript( + 'SConscript', + duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html +) diff --git a/progs/demos/SConscript b/progs/demos/SConscript new file mode 100644 index 0000000000..112da7bedb --- /dev/null +++ b/progs/demos/SConscript @@ -0,0 +1,71 @@ +Import('env') + +if not env['GLUT']: + Return() + +env = env.Clone() + +env.Prepend(LIBS = ['$GLUT_LIB']) + +progs = [ + 'arbfplight', + 'arbfslight', + 'arbocclude', + 'bounce', + 'clearspd', + 'copypix', + 'cubemap', + 'drawpix', + 'engine', + 'fbo_firecube', + 'fire', + 'fogcoord', + 'fplight', + 'fslight', + 'gamma', + 'gearbox', + 'gears', + 'geartrain', + 'glinfo', + 'gloss', + 'glslnoise', + 'gltestperf', + 'glutfx', + 'isosurf', + 'ipers', + 'lodbias', + 'morph3d', + 'multiarb', + 'paltex', + 'pointblast', + 'rain', + 'ray', + 'readpix', + 'reflect', + 'renormal', + 'shadowtex', + 'singlebuffer', + 'streaming_rect', + 'spectex', + 'spriteblast', + 'stex3d', + 'teapot', + 'terrain', + 'tessdemo', + 'texcyl', + 'texdown', + 'texenv', + 'texobj', + 'textures', + 'trispd', + 'tunnel', + 'tunnel2', + 'vao_demo', + 'winpos', +] + +for prog in progs: + prog = env.Program( + target = prog, + source = prog + '.c', + ) diff --git a/progs/trivial/SConscript b/progs/trivial/SConscript new file mode 100644 index 0000000000..edb8386c5b --- /dev/null +++ b/progs/trivial/SConscript @@ -0,0 +1,163 @@ +Import('env') + +if not env['GLUT']: + Return() + +env = env.Clone() + +env.Prepend(LIBS = ['$GLUT_LIB']) + +progs = [ + 'clear-fbo-tex', + 'clear-fbo', + 'clear-scissor', + 'clear-undefined', + 'clear-repeat', + 'clear', + 'dlist-dangling', + 'dlist-edgeflag-dangling', + 'dlist-edgeflag', + 'dlist-degenerate', + 'drawarrays', + 'drawelements', + 'drawrange', + 'flat-clip', + 'fs-tri', + 'line-clip', + 'line-cull', + 'line-smooth', + 'line-stipple-wide', + 'line-userclip-clip', + 'line-userclip-nop-clip', + 'line-userclip-nop', + 'line-userclip', + 'line-wide', + 'line', + 'lineloop-clip', + 'lineloop-elts', + 'lineloop', + 'linestrip-flat-stipple', + 'linestrip-stipple-wide', + 'linestrip-stipple', + 'linestrip', + 'long-fixed-func', + 'pgon-mode', + 'point-clip', + 'point-param', + 'point-sprite', + 'point-wide', + 'point-wide-smooth', + 'point', + 'poly-flat', + 'poly-flat-clip', + 'poly-flat-unfilled-clip', + 'poly-unfilled', + 'poly', + 'quad-clip-all-vertices', + 'quad-clip-nearplane', + 'quad-clip', + 'quad-degenerate', + 'quad-flat', + 'quad-offset-factor', + 'quad-offset-unfilled', + 'quad-offset-units', + 'quad-tex-2d', + 'quad-tex-3d', + 'quad-tex-alpha', + 'quad-tex-pbo', + 'quad-unfilled-clip', + 'quad-unfilled-stipple', + 'quad-unfilled', + 'quad', + 'quads', + 'quadstrip-cont', + 'quadstrip-flat', + 'quadstrip', + 'tri-alpha', + 'tri-blend-color', + 'tri-blend-max', + 'tri-blend-min', + 'tri-blend-revsub', + 'tri-blend-sub', + 'tri-blend', + 'tri-clip', + 'tri-cull-both', + 'tri-cull', + 'tri-dlist', + 'tri-edgeflag', + 'tri-fbo-tex', + 'tri-fbo', + 'tri-flat-clip', + 'tri-flat', + 'tri-fog', + 'tri-fp', + 'tri-fp-const-imm', + 'tri-lit', + 'tri-mask-tri', + 'tri-orig', + 'tri-query', + 'tri-repeat', + 'tri-scissor-tri', + 'tri-stencil', + 'tri-tex', + 'tri-tex-3d', + 'tri-tri', + 'tri-unfilled-edgeflag', + 'tri-unfilled-clip', + 'tri-unfilled-smooth', + 'tri-unfilled-tri', + 'tri-unfilled-tri-lit', + 'tri-unfilled-userclip-stip', + 'tri-unfilled-userclip', + 'tri-unfilled', + 'tri-userclip', + 'tri-z-eq', + 'tri-z', + 'tri', + 'trifan-flat', + 'trifan-flat-clip', + 'trifan-flat-unfilled-clip', + 'trifan-unfilled', + 'trifan', + 'tristrip-clip', + 'tristrip-flat', + 'tristrip', + 'vbo-drawarrays', + 'vbo-drawelements', + 'vbo-drawrange', + 'vp-array', + 'vp-array-int', + 'vp-clip', + 'vp-line-clip', + 'vp-tri', + 'vp-tri-swap', + 'vp-tri-tex', + 'vp-tri-imm', + 'vp-tri-cb', + 'vp-tri-cb-pos', + 'vp-tri-cb-tex', + 'vp-unfilled', +] + +for prog in progs: + prog = env.Program( + target = prog, + source = prog + '.c', + ) + +# auto code generation +#getprocaddress: getprocaddress.c getproclist.h + +#getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py +# python getprocaddress.py > getproclist.h + + +#readtex.h: $(TOP)/progs/util/readtex.h +# ln -s $(TOP)/progs/util/readtex.h . + +#readtex.c: $(TOP)/progs/util/readtex.c +# ln -s $(TOP)/progs/util/readtex.c . + + +#extfuncs.h: $(TOP)/progs/util/extfuncs.h +# cp $< . |