| 1 | 
< | 
import os | 
| 2 | 
< | 
 | 
| 3 | 
< | 
Import('env') # inherit from parent | 
| 4 | 
< | 
 | 
| 5 | 
< | 
# math libs | 
| 6 | 
< | 
mlib = env['RAD_MLIB'] | 
| 7 | 
< | 
 | 
| 8 | 
< | 
# standard targets | 
| 9 | 
< | 
PROGS = ( | 
| 10 | 
< | 
# name        sources                  libs | 
| 11 | 
< | 
('genbeads',  Split('genbeads.c hermite3.c'),  []), | 
| 12 | 
< | 
('genbox',    ['genbox.c',],       []), | 
| 13 | 
< | 
('genmarble', ['genmarble.c',],    []), | 
| 14 | 
< | 
('gensky',    Split('gensky.c sun.c',), []), | 
| 15 | 
< | 
('genblinds', ['genblinds.c',],    []), | 
| 16 | 
< | 
('genprism',  ['genprism.c',],     []), | 
| 17 | 
< | 
('genrev',    ['genrev.c',],       ['rterror','rtfunc','rtcont','rtmem']), | 
| 18 | 
< | 
('gencat',    ['gencat.c',],       []), | 
| 19 | 
< | 
('genworm',   ['genworm.c',],      ['rtfunc','rtmem','rtcont','rtmath']), | 
| 20 | 
< | 
('gensurf',   ['gensurf.c',],      ['rtfunc','rtmem','rtcont','rtmath','rtio']), | 
| 21 | 
< | 
('genclock',  ['genclock.c',],     []), | 
| 22 | 
< | 
('genbranch', ['genbranch.c',],    []), | 
| 23 | 
< | 
('replmarks', ['replmarks.c',], | 
| 24 | 
< | 
        ['rtproc','rtpath','rtmath','rtio','rterror']), | 
| 25 | 
< | 
('mkillum',   Split('mkillum.c mkillum2.c mkillum3.c'), | 
| 26 | 
< | 
    ['rtscene','rtproc','rtpath','rtmath','rtio','rtcont','rterror']), | 
| 27 | 
< | 
('xform',     ['xform.c',], | 
| 28 | 
< | 
    ['rtproc','rtscene','rtmath','rtargs','rtio','rtcont','rtpath','rterror']), | 
| 29 | 
< | 
) | 
| 30 | 
< | 
for p in PROGS: | 
| 31 | 
< | 
    prog = env.Program(target=os.path.join(env['RAD_BUILDBIN'], p[0]), | 
| 32 | 
< | 
            source=p[1], LIBS=p[2] + mlib) | 
| 33 | 
< | 
    Default(prog) | 
| 34 | 
< | 
    env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)]) | 
| 35 | 
< | 
 | 
| 36 | 
< | 
#surf.cal clockface.hex | 
| 37 | 
< | 
LIBFILES = Split('illum.cal rev.cal skybright.cal glaze1.cal glaze2.cal') | 
| 38 | 
< | 
env.Append(RAD_RLIBINSTALL=env.Install(env['RAD_RLIBDIR'], LIBFILES)) | 
| 39 | 
< | 
 | 
| 1 | 
> | 
import os | 
| 2 | 
> | 
 | 
| 3 | 
> | 
Import('env') # inherit from parent | 
| 4 | 
> | 
 | 
| 5 | 
> | 
# math libs | 
| 6 | 
> | 
mlib = env['RAD_MLIB'] | 
| 7 | 
> | 
 | 
| 8 | 
> | 
#Make sure sun.c is compiled only once | 
| 9 | 
> | 
sun = env.Object(source="sun.c") | 
| 10 | 
> | 
 | 
| 11 | 
> | 
# standard targets | 
| 12 | 
> | 
PROGS = ( | 
| 13 | 
> | 
# name          sources           libs | 
| 14 | 
> | 
('gendaylit',   Split('gendaylit.c',)+[sun], ['rtlamps']), | 
| 15 | 
> | 
('gendaymtx',   Split('gendaymtx.c',)+[sun], | 
| 16 | 
> | 
    ['rtproc','rtscene','rtmath','rtargs','rtio','rtcont','rtpath','rterror',mlib]), | 
| 17 | 
> | 
('genbeads',    Split('genbeads.c hermite3.c'),  []), | 
| 18 | 
> | 
('genbox',      ['genbox.c',],    []), | 
| 19 | 
> | 
('genmarble',   ['genmarble.c',], []), | 
| 20 | 
> | 
('gensky',      Split('gensky.c',)+[sun], []), | 
| 21 | 
> | 
('genblinds',   ['genblinds.c',], []), | 
| 22 | 
> | 
('genprism',    ['genprism.c',],  []), | 
| 23 | 
> | 
('genrev',      ['genrev.c',],    ['rtfunc','rtcont','rtmem','rtio','rterror']), | 
| 24 | 
> | 
('gencatenary', ['gencat.c',],    []), | 
| 25 | 
> | 
('genworm',     ['genworm.c',], | 
| 26 | 
> | 
        ['rtfunc','rtmem','rtcont','rtmath','rtio','rterror']), | 
| 27 | 
> | 
('gensurf',     ['gensurf.c',], | 
| 28 | 
> | 
        ['rtfunc','rtmem','rtcont','rtmath','rtio','rterror']), | 
| 29 | 
> | 
('genclock',    ['genclock.c',],  []), | 
| 30 | 
> | 
('genbranch',   ['genbranch.c',], []), | 
| 31 | 
> | 
('replmarks',   ['replmarks.c',], | 
| 32 | 
> | 
        ['rtproc','rtpath','rtmath','rtio','rterror']), | 
| 33 | 
> | 
('xform',       ['xform.c',], | 
| 34 | 
> | 
    ['rtproc','rtscene','rtmath','rtargs','rtio','rtcont','rtpath','rterror']), | 
| 35 | 
> | 
) | 
| 36 | 
> | 
progs = [] | 
| 37 | 
> | 
for p in PROGS: | 
| 38 | 
> | 
    prog = env.Program(target=os.path.join('$RAD_BUILDBIN', p[0]), | 
| 39 | 
> | 
            source=p[1], LIBS=p[2] + mlib) | 
| 40 | 
> | 
    progs.append(prog) | 
| 41 | 
> | 
 | 
| 42 | 
> | 
prog = env.Program(target=os.path.join('$RAD_BUILDBIN', 'mkillum'), | 
| 43 | 
> | 
                source=Split('mkillum.c mkillum2.c mkillum3.c'), | 
| 44 | 
> | 
                CPPPATH=env.get('CPPPATH', []) + ['#src/rt'], | 
| 45 | 
> | 
                LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtproc', | 
| 46 | 
> | 
                'rtnet','rtpath','rtmath','rtargs','rtio','rtcont','rtmem','rterror'] | 
| 47 | 
> | 
                + mlib) | 
| 48 | 
> | 
progs.append(prog) | 
| 49 | 
> | 
prog = env.Program(target=os.path.join('$RAD_BUILDBIN', 'mksource'), | 
| 50 | 
> | 
                source=['mksource.c'], | 
| 51 | 
> | 
                CPPPATH=env.get('CPPPATH', []) + ['#src/rt'], | 
| 52 | 
> | 
                LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtproc','rtnet', | 
| 53 | 
> | 
                'rtmath','rtcont','rtmem','rtargs','rtio','rtpath','rterror'] + mlib) | 
| 54 | 
> | 
progs.append(prog) | 
| 55 | 
> | 
 | 
| 56 | 
> | 
if os.name == 'posix': | 
| 57 | 
> | 
        Default(env.InstallScript(os.path.join('$RAD_BUILDBIN', 'glaze'), 'glaze.csh')) | 
| 58 | 
> | 
 | 
| 59 | 
> | 
Default('#src/gen') | 
| 60 | 
> | 
env.Install('$RAD_BINDIR', progs) | 
| 61 | 
> | 
 | 
| 62 | 
> | 
#surf.cal clockface.hex | 
| 63 | 
> | 
LIBFILES = Split('''illum.cal rev.cal skybright.cal glaze1.cal glaze2.cal | 
| 64 | 
> | 
                perezlum.cal''') | 
| 65 | 
> | 
env.Append(RAD_RLIBINSTALL=env.Install('$RAD_RLIBDIR', LIBFILES)) | 
| 66 | 
> | 
 | 
| 67 | 
> | 
# vim: set syntax=python: |