Commit 500b3044 authored by José Fonseca's avatar José Fonseca

scons: Build progs.

Just demos and trivial dirs for starters.

Conflicts:

	.gitignore
parent fa6ee2c2
*.a
*.dll
*.exe
*.ilk
*.o
*.obj
*.pc
*.pdb
*.pyc
*.pyo
*.so
......@@ -9,6 +15,12 @@ depend
depend.bak
lib
lib64
.sconsign*
configure
autom4te.cache
aclocal.m4
config.log
config.status
cscope*
.scon*
config.py
build
SConscript([
'demos/SConscript',
'trivial/SConscript',
])
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
)
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',
)
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 $< .
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment