--- ray/src/hd/SConscript 2005/09/19 12:37:46 1.5 +++ ray/src/hd/SConscript 2016/03/05 13:24:58 1.8 @@ -5,23 +5,25 @@ Import('env') # math libs mlib = env['RAD_MLIB'] +# compose paths +def radbin(name): return os.path.join('$RAD_BUILDBIN', name) +def radlib(name): return os.path.join('$RAD_BUILDLIB', name) + # common objects viewbeams = env.Object(source='viewbeams.c') holo = env.Object(source='holo.c') holofile = env.Object(source='holofile.c') clumpbeams = env.Object(source='clumpbeams.c') -Version = env.Object(source='../rt/Version.c') # XXX ../rt/not_nice - # standard targets PROGS = ( ('rholo', Split('''rholo.c rholo2.c rholo2l.c rholo3.c rholo4.c''') - + [Version, holofile, holo, viewbeams], - ['rtpic','rtio','rtproc','rtpath','rtargs','rtmath','rtmem','rterror']), -('rhpict', Split('rhpict.c rhpict2.c')+[Version, holofile, holo, viewbeams], - ['rtpic','rtio','rtproc','rtargs','rtmath','rtmem','rterror']), + + [env.version, holofile, holo, viewbeams], + ['rtpic','rtproc','rtpath','rtio','rtargs','rtmath','rtmem','rterror']), +('rhpict', Split('rhpict.c rhpict2.c')+[env.version, holofile, holo, viewbeams], + ['rtpic','rtproc','rtargs','rtio','rtmath','rtmem','rterror']), ('rhcopy', Split('rhcopy.c') + [clumpbeams, holofile, holo], - ['rtpic','rtio','rtproc','rtargs','rtmath','rtmem','rterror']), + ['rtpic','rtproc','rtargs','rtio','rtmath','rtmem','rterror']), ('rhinfo', Split('rhinfo.c') + [holofile, holo], ['rtio','rtproc', 'rtmath','rterror']), ('rhoptimize', Split('rhoptimize.c') + [clumpbeams, holofile, holo], @@ -31,14 +33,14 @@ PROGS = ( ) if os.name != 'nt': # pending some major work... for p in PROGS: - prog = env.Program(target=os.path.join(env['RAD_BUILDBIN'], p[0]), + prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2] + mlib) Default(prog) env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)]) # display drivers if env.has_key('X11INCLUDE'): - xenv = env.Copy(CPPPATH=[env['X11INCLUDE']] + env['CPPPATH'], + xenv = env.Clone(CPPPATH=[env['X11INCLUDE']] + env['CPPPATH'], LIBPATH=[env['X11LIB']] + env['LIBPATH'],) # common objects rhdisp = xenv.Object(source='rhdisp.c') @@ -53,15 +55,15 @@ if env.has_key('X11INCLUDE'): # XXX the .hdi extension will cause problems on Windows xenv['PROGSUFFIX'] = '.hdi' - dlibs = ['rtpic','rtio','rtmath','rtcont','rtmem','rtargs','rterror'] + dlibs = ['rtpic','rtmath','rtcont','rtmem','rtargs','rtio','rterror','rtdummy'] def make_hdi(p): # build them obj = xenv.Object(target=p[3], source=p[4], CPPFLAGS=ocppflags + p[5]) - prog = xenv.Program(target=os.path.join(devdir, p[0]), + prog = xenv.Program(target=radbin(p[0]), source=[obj] + p[1] + xcommon, LIBS=p[2]) Default(prog) inst = xenv.Install(idevdir, prog) # XXX what are the alternative "h" names good for? - insth = xenv.InstallAs(target=os.path.join(idevdir, + insth = xenv.InstallAs(target=radbin( p[0] + 'h' + xenv['PROGSUFFIX']), source=prog) env.Append(RAD_BININSTALL=[inst, insth]) @@ -115,3 +117,4 @@ if env.has_key('X11INCLUDE'): +# vim: set syntax=python: