1 |
schorsch |
1.23 |
from __future__ import division, print_function, unicode_literals |
2 |
|
|
|
3 |
schorsch |
1.4 |
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 |
schorsch |
1.18 |
CPPFLAGS='-DDEFPATH="\\"%s\\""' % env['RAD_RLIBDIR'].replace('\\','/')) |
13 |
schorsch |
1.4 |
tmapcolrs = env.StaticObject(source='tmapcolrs.c', |
14 |
|
|
CPPFLAGS='-DPCOND=\\"pcond\\"') |
15 |
schorsch |
1.20 |
ezxml = env.StaticObject('ezxml.c', |
16 |
schorsch |
1.12 |
CPPDEFINES=env.get('CPPDEFINES',[]) + env.get('EZXML_CPPDEFINES',[])) |
17 |
schorsch |
1.20 |
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 |
schorsch |
1.4 |
|
25 |
|
|
# source and object dependencies |
26 |
|
|
RTSCENE = Split('''cone.c face.c free_os.c instance.c readobj.c readoct.c |
27 |
schorsch |
1.10 |
otypes.c objset.c octree.c readfargs.c modobject.c |
28 |
schorsch |
1.20 |
font.c mesh.c readmesh.c tmesh.c sceneio.c xf.c''') |
29 |
schorsch |
1.19 |
RTPIC = Split('''color.c colrops.c resolu.c image.c bmpfile.c falsecolor.c |
30 |
schorsch |
1.20 |
tonemap.c tmapluv.c tmap16bit.c tmaptiff.c''') |
31 |
schorsch |
1.4 |
RTERROR = Split('''error.c eputs.c wputs.c quit.c''') |
32 |
schorsch |
1.20 |
RTCONT = Split('''lookup.c savestr.c savqstr.c ccolor.c ccyrgb.c |
33 |
schorsch |
1.19 |
spec_rgb.c bsdf.c bsdf_m.c bsdf_t.c loadbsdf.c |
34 |
|
|
disk2square.c hilbert.c interp2d.c triangulate.c''') |
35 |
schorsch |
1.4 |
RTMATH = Split('''fvect.c invmat4.c linregr.c mat4.c tcos.c urand.c urind.c |
36 |
schorsch |
1.9 |
zeroes.c dircode.c clip.c multisamp.c plocate.c byteswap.c''' |
37 |
schorsch |
1.4 |
) + 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 |
schorsch |
1.17 |
portio.c wordfile.c words.c header.c timegm.c cvtcmd.c''') |
42 |
schorsch |
1.4 |
RTARGS = Split('''badarg.c expandarg.c''') + env.get('RAD_ARGSCOMPAT', []) |
43 |
schorsch |
1.20 |
RTPATH = Split('''getpath.c gethomedir.c paths.c''') |
44 |
schorsch |
1.19 |
RTLAMPS = Split('''fropen.c rexpr.c lamps.c''') |
45 |
schorsch |
1.4 |
RTPROC = Split('''process.c''') + env.get('RAD_PROCESS', []) |
46 |
schorsch |
1.7 |
RTMEM = Split('ealloc.c bmalloc.c') |
47 |
schorsch |
1.4 |
RTNET = Split('myhostname.c') |
48 |
schorsch |
1.20 |
|
49 |
schorsch |
1.19 |
librtrad = env.StaticLibrary(target=radlib('rtrad'), |
50 |
schorsch |
1.20 |
source=RTERROR + RTPATH + RTARGS + RTIO + RTMATH + RTCONT + RTMEM |
51 |
|
|
+ RTFUNC + RTPROC + RTLAMPS + RTSCENE + RTPIC + RTNET + objs) |
52 |
schorsch |
1.4 |
|
53 |
schorsch |
1.19 |
MGF = Split('''mgf_parser.c mgf_object.c mgf_xf.c mgf_context.c''') |
54 |
|
|
libmgf = env.StaticLibrary(target=radlib('mgf'), source=MGF) |
55 |
schorsch |
1.4 |
|
56 |
greg |
1.22 |
REETZ = Split('g3affine.c g3flist.c g3sphere.c g3vector.c gbasic.c maxheap.c muc_randvar.c') |
57 |
schorsch |
1.19 |
libreetz = env.StaticLibrary(target=radlib('reetz'), source=REETZ) |
58 |
schorsch |
1.4 |
|
59 |
|
|
LIBFILES = Split('tmesh.cal') |
60 |
|
|
env.Append(RAD_RLIBINSTALL=env.Install(env['RAD_RLIBDIR'], LIBFILES)) |
61 |
|
|
|
62 |
|
|
if env.has_key('OGL'): |
63 |
schorsch |
1.5 |
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 |
schorsch |
1.4 |
|
69 |
schorsch |
1.17 |
# vim: set syntax=python: |
70 |
schorsch |
1.23 |
# vi: set ts=4 sw=4 : |
71 |
|
|
|