ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/SConscript
(Generate patch)

Comparing ray/src/rt/SConscript (file contents):
Revision 1.13 by greg, Wed Jun 2 15:58:30 2010 UTC vs.
Revision 1.20 by schorsch, Tue Jan 9 00:08:57 2018 UTC

# Line 1 | Line 1
1 + from __future__ import division, print_function, unicode_literals
2 +
3   import os
4   from build_utils import vstamp
5  
# Line 20 | Line 22 | rayfifo = env.Object(source="rayfifo.c")
22   raypwin = env.Object(source="raypwin.c")
23   raycalls = env.Object(source="raycalls.c")
24  
25 + CCFLAGS = env.get('CCFLAGS',[])
26 + if env.get('PMAP_OOC', 0) not in (0,'0','','n','no','false',False,None):
27 +        PMD = Split('ooccache.c oocnn.c oocmorton.c oococt.c oocsort.c oocbuild.c')
28 +        OOC_CCFLAGS = env.get('CCFLAGS',[]) + ['-DPMAP_OOC']
29 +        for src in Split('''pmapdata.c pmapio.c pmapopt.c '''):
30 +                obj = env.Object(source=src, CCFLAGS=OOC_CCFLAGS)
31 +                PMD.append(obj)
32 +        pmaptype = env.Object(source="pmaptype.c", CCFLAGS=OOC_CCFLAGS)
33 +        pmapparm = env.Object(source="pmapparm.c", CCFLAGS=OOC_CCFLAGS)
34 + else:
35 +        PMD = Split('''pmapdata.c pmapio.c pmapopt.c ''')
36 +        OOC_CCFLAGS = env.get('CCFLAGS',[])
37 +        pmaptype = env.Object(source="pmaptype.c")
38 +        pmapparm = env.Object(source="pmapparm.c")
39  
40   # source and object dependencies
41   RAY = Split('''ambcomp.c ambient.c freeobjmem.c initotypes.c preload.c
42                  raytrace.c renderopts.c''') + [ambio]
43 <
43 > PMAP = Split('''pmap.c pmapsrc.c pmapmat.c pmaprand.c
44 >        pmapbias.c pmapcontrib.c pmapamb.c pmapray.c pmapdiag.c
45 >                pmcontrib2.c pmutil.c
46 >                ''') + [pmaptype, pmapparm]
47   SURF = Split('''srcsamp.c srcsupp.c srcobstr.c source.c virtuals.c sphere.c
48                  o_face.c o_cone.c o_instance.c o_mesh.c''')
30
49   MAT = Split('''aniso.c normal.c m_clip.c glass.c m_brdf.c m_mirror.c
50 <                m_direct.c m_mist.c fprism.c m_alias.c''') + [dielectric]
51 <
50 >                m_direct.c m_mist.c fprism.c m_alias.c m_bsdf.c ashikhmin.c '''
51 >                ) + [dielectric]
52   MOD = Split('p_func.c t_func.c p_data.c t_data.c text.c mx_func.c mx_data.c')
35
53   SUP = Split('func.c noise3.c data.c')
54  
55   # build libraries
56 < rsrc = RAY + SURF + MAT + MOD + SUP
56 > rsrc = RAY + PMAP + PMD + SURF + MAT + MOD + SUP
57   env.Command('Version.c', 'VERSION', vstamp.build_version_c)
58   env.Depends('Version.c', rsrc)
59   Version = env.Object(source=['Version.c'])
60 < rlib = env.Library(target=radlib('rttrace'), source=rsrc + [Version])
60 > env.version = Version # make it remotely accessible
61 > tracelib = env.Library(target=radlib('rttrace'), source=rsrc + [Version])
62  
63 < #if os.name == 'nt': # XXX until we get around fork() and friends
64 < #       rcsrc = Split('raycalls.c')
47 < #else: rcsrc = Split('raycalls.c raypcalls.c')
48 < rcsrc = Split('raycalls.c $RAD_PCALLS')
49 < rclib = env.Library(target=radlib('raycalls'), source=rcsrc)
63 > rclib = env.Library(target=radlib('raycalls'),
64 >                source=Split('raycalls.c $RAD_PCALLS'))
65   Default(rclib)
66  
52 fullib=['rttrace', 'rtscene', 'rtpic', 'rtfunc', 'rtproc', 'rtmath',
53        'rtargs', 'rtpath', 'rtio', 'rtcont', 'rtmem', 'rterror']
54 # build executables
55 lasrc = ['lookamb.c', ambio]
56 lookamb = env.Program(target=radbin('lookamb'), source=lasrc,
57        LIBS=['rtio', 'rtpic'])
58 Default(lookamb)
59 env.Append(RAD_BININSTALL=[env.Install('$RAD_BINDIR', lookamb)])
60
67   rtmain = env.Object(source=['rtmain.c'],
68                  CCFLAGS=env.get('CCFLAGS',[]) + ['-DNICE=4'])
63 rtsrc = ['rtrace.c', duphead, persist, rtmain, rayfifo, raypwin, raycalls]
64 rtrace = env.Program(target=radbin('rtrace'), source=rtsrc,
65        LIBS=fullib + mlib
66        )
67 Default(rtrace)
68 env.Append(RAD_BININSTALL=[env.Install('$RAD_BINDIR', rtrace)])
69  
70 < rpsrc = Split('rpmain.c rpict.c srcdraw.c') + [duphead, persist]
71 < rpict = env.Program(target=radbin('rpict'), source=rpsrc,
72 <        LIBS=fullib+['rtnet','$RAD_SOCKETLIB']+mlib)
73 < Default(rpict)
74 < env.Append(RAD_BININSTALL=[env.Install('$RAD_BINDIR', rpict)])
70 > # build executables
71 > PROGS = [
72 > ('mkpmap',   ['mkpmap.c', Version], CCFLAGS,
73 >         ['rttrace', 'rtrad', '$RAD_SOCKETLIB', mlib]),
74 > ('pmapdump', ['pmapdump.c', pmaptype, pmapparm, Version], OOC_CCFLAGS,
75 >         ['rtrad', '$RAD_SOCKETLIB', mlib]),
76 > ('lookamb',  ['lookamb.c', ambio], CCFLAGS, ['rtrad', mlib]),
77 > ('rcontrib', Split('rcmain.c rcontrib.c rc2.c rc3.c') + [Version], CCFLAGS,
78 >         ['rttrace', 'rtrad', '$RAD_SOCKETLIB', mlib]),
79 > ('rtrace',   ['rtrace.c', duphead, persist, rtmain, rayfifo, raypwin, raycalls],
80 >         CCFLAGS, ['rttrace', 'rtrad'] +  mlib),
81 > ('rpict',    Split('rpmain.c rpict.c srcdraw.c') + [duphead, persist], CCFLAGS,
82 >         ['rttrace', 'rtrad', '$RAD_SOCKETLIB']+mlib),
83 > ]
84 > for p in PROGS:
85 >        prog = env.Program(target=radbin(p[0]), source = p[1],
86 >                        CCFLAGS = p[2], LIBS = p[3]),
87 >        Default(prog)
88 >        env.Append(RAD_BININSTALL=[env.Install('$RAD_BINDIR', prog)])
89  
90 + # we need RVOBJS for any derived viewers, such as winrview
91 + if os.name == 'nt': RV_DEF = ['WIN_RVIEW']
92 + else: RV_DEF = []
93 + rvmain = env.Object(source='rvmain.c',
94 +                CCFLAGS=env['CCFLAGS'] + ['-DNICE=6'])
95 + rvobjs = [rvmain]
96 + for src in  Split('''rview.c rv2.c rv3.c
97 +        devtable.c devcomm.c colortab.c editline.c'''):
98 +        rvobjs.append(env.Object(source=src,
99 +                        CPPDEFINES=env.get('CPPDEFINES', []) + RV_DEF))
100 + env['RVOBJS'] = rvobjs
101 +
102   if env.has_key('X11LIB'): # lots of special requirements for rvu
103          x11incls = [env['X11INCLUDE']] + env['CPPPATH']
104          x11 = env.Object(source='x11.c', CPPPATH=x11incls)
105          x11twind = env.Object(source='x11twind.c', CPPPATH=x11incls)
106 <        rvmain = env.Object(source='rvmain.c',
107 <                CCFLAGS=env['CCFLAGS'] + ['-DNICE=6'])
82 <        rv3 = env.Object(source='rv3.c',
83 <                CCFLAGS=env['CCFLAGS']
84 <                )
85 <
86 <        devsrc  = Split('devtable.c devcomm.c colortab.c editline.c')
87 <        rvobjs = [x11, x11twind, rv3, rvmain, rlib]
88 <        rvsrc = Split('rview.c rv2.c') + devsrc + rvobjs
106 >        rvxobjs = [x11, x11twind]
107 >        rvsrc =  rvobjs + rvxobjs
108          rvu = env.Program(target=radbin('rvu'), source=rvsrc,
109                  LIBPATH=env['LIBPATH'] + [env['X11LIB']],
110 <                LIBS = (['rtscene', rclib, 'rttrace', 'rtpic', 'rtfunc', 'rtproc', 'rtmath',
92 <                        'rtargs', 'rtpath', 'rtio', 'rtcont', 'rtmem', 'rterror',
93 <                        'X11'] + mlib)
94 <                #LIBS=fullib + ['X11', rclib] + mlib
110 >                LIBS = ([rclib, 'rttrace', 'rtrad', 'X11'] + mlib)
111                  )
112          Default(rvu)
113          env.Append(RAD_BININSTALL=[env.Install('$RAD_BINDIR', rvu)])
# Line 99 | Line 115 | if env.has_key('X11LIB'): # lots of special requiremen
115   LIBFILES = Split('rayinit.cal')
116   env.Append(RAD_RLIBINSTALL=[env.Install('$RAD_RLIBDIR', LIBFILES)])
117  
118 + # vim: set syntax=python:
119 + # vi: set ts=4 sw=4 :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines