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