ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/SConscript
Revision: 1.23
Committed: Mon Jan 8 13:38:37 2018 UTC (6 years, 3 months ago) by schorsch
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad5R3, HEAD
Changes since 1.22: +4 -0 lines
Log Message:
Updating to SCons 3.x, adding support for Python 3

File Contents

# Content
1 from __future__ import division, print_function, unicode_literals
2
3 import os
4
5 Import('env')
6
7 # compose paths
8 def radlib(name): return os.path.join(env['RAD_BUILDLIB'], name)
9
10 # custom flags
11 getlibpath = env.StaticObject(source='getlibpath.c',
12 CPPFLAGS='-DDEFPATH="\\"%s\\""' % env['RAD_RLIBDIR'].replace('\\','/'))
13 tmapcolrs = env.StaticObject(source='tmapcolrs.c',
14 CPPFLAGS='-DPCOND=\\"pcond\\"')
15 ezxml = env.StaticObject('ezxml.c',
16 CPPDEFINES=env.get('CPPDEFINES',[]) + env.get('EZXML_CPPDEFINES',[]))
17 objs = [getlibpath, tmapcolrs, ezxml]
18
19 # the definition of addobjnotify conflicts with definitions in other files
20 # that are more essential to the library.
21 # We need to pass this one around and include it individually
22 addobjn = env.StaticObject(source='addobjnotify.c')
23 env['ADDOBJNOTIFY'] = addobjn
24
25 # source and object dependencies
26 RTSCENE = Split('''cone.c face.c free_os.c instance.c readobj.c readoct.c
27 otypes.c objset.c octree.c readfargs.c modobject.c
28 font.c mesh.c readmesh.c tmesh.c sceneio.c xf.c''')
29 RTPIC = Split('''color.c colrops.c resolu.c image.c bmpfile.c falsecolor.c
30 tonemap.c tmapluv.c tmap16bit.c tmaptiff.c''')
31 RTERROR = Split('''error.c eputs.c wputs.c quit.c''')
32 RTCONT = Split('''lookup.c savestr.c savqstr.c ccolor.c ccyrgb.c
33 spec_rgb.c bsdf.c bsdf_m.c bsdf_t.c loadbsdf.c
34 disk2square.c hilbert.c interp2d.c triangulate.c''')
35 RTMATH = Split('''fvect.c invmat4.c linregr.c mat4.c tcos.c urand.c urind.c
36 zeroes.c dircode.c clip.c multisamp.c plocate.c byteswap.c'''
37 ) + env.get('RAD_MATHCOMPAT', [])
38 RTFUNC = Split('''biggerlib.c caldefn.c calexpr.c calfunc.c calprnt.c
39 chanvalue.c''')
40 RTIO = Split('''fdate.c fgetline.c fgetval.c fgetword.c fputword.c loadvars.c
41 portio.c wordfile.c words.c header.c timegm.c cvtcmd.c''')
42 RTARGS = Split('''badarg.c expandarg.c''') + env.get('RAD_ARGSCOMPAT', [])
43 RTPATH = Split('''getpath.c gethomedir.c paths.c''')
44 RTLAMPS = Split('''fropen.c rexpr.c lamps.c''')
45 RTPROC = Split('''process.c''') + env.get('RAD_PROCESS', [])
46 RTMEM = Split('ealloc.c bmalloc.c')
47 RTNET = Split('myhostname.c')
48
49 librtrad = env.StaticLibrary(target=radlib('rtrad'),
50 source=RTERROR + RTPATH + RTARGS + RTIO + RTMATH + RTCONT + RTMEM
51 + RTFUNC + RTPROC + RTLAMPS + RTSCENE + RTPIC + RTNET + objs)
52
53 MGF = Split('''mgf_parser.c mgf_object.c mgf_xf.c mgf_context.c''')
54 libmgf = env.StaticLibrary(target=radlib('mgf'), source=MGF)
55
56 REETZ = Split('g3affine.c g3flist.c g3sphere.c g3vector.c gbasic.c maxheap.c muc_randvar.c')
57 libreetz = env.StaticLibrary(target=radlib('reetz'), source=REETZ)
58
59 LIBFILES = Split('tmesh.cal')
60 env.Append(RAD_RLIBINSTALL=env.Install(env['RAD_RLIBDIR'], LIBFILES))
61
62 if env.has_key('OGL'):
63 oglincl = env.get('CPPPATH', []) + env.get('OGLINCLUDE', [])
64 RGL = Split('rglfile.c rglmat.c rgldomat.c rglsurf.c rglinst.c rglsrc.c')
65 librgl = env.StaticLibrary(target=radlib('rgl'), source=RGL,
66 CPPPATH=oglincl)
67 Default(librgl)
68
69 # vim: set syntax=python:
70 # vi: set ts=4 sw=4 :
71