Cast 0 as unsigned int for sun's CC to get rid of this:
[blender-staging.git] / extern / solid / SConscript
1 #!/usr/bin/python
2 import sys
3 solid_env = Environment()
4
5 # Import the C flags set in the SConstruct file
6 Import ('cflags')
7 #Import ('cxxflags')
8 #Import ('defines')
9 Import ('user_options_dict')
10 #defines = ['QHULL', '_LIB']
11 defines = ['USE_DOUBLES','QHULL', '_LIB']
12 #cflags = []
13 cxxflags = []
14
15 if sys.platform=='win32':
16         defines += ['WIN32','NDEBUG', '_WINDOWS', '_LIB']
17         #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
18         cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
19 elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5':
20         defines += ['NDEBUG']
21         cflags += ['-O2']
22 elif sys.platform=='darwin' :
23         defines += ['NDEBUG']
24         cflags += ['-O3','-pipe', '-fPIC', '-funsigned-char', '-ffast-math', '-mpowerpc' ]
25
26 else:
27     print "################################################"
28     print 
29     print "Check if solid builds on your platform correctly"
30     print "Add your platform specific defines"
31     print "and cflags / cxxflags to the"
32     print "extern/solid/SConscript file"
33
34 solid_env.Append (CCFLAGS = cflags)
35 solid_env.Append (CPPFLAGS = cxxflags)
36
37 solid_env.Append (CPPDEFINES = defines)
38
39 solid_sources = ['src/DT_C-api.cpp',
40                 'src/DT_Encounter.cpp',
41                 'src/DT_Object.cpp',
42                 'src/DT_RespTable.cpp',
43                 'src/DT_Scene.cpp']
44
45 convex_sources = ['src/convex/DT_Accuracy.cpp',
46                 'src/convex/DT_Box.cpp',
47                 'src/convex/DT_Cone.cpp',
48                 'src/convex/DT_Convex.cpp',
49                 'src/convex/DT_Cylinder.cpp',
50                 'src/convex/DT_Facet.cpp',
51                 'src/convex/DT_LineSegment.cpp',
52                 'src/convex/DT_PenDepth.cpp',
53                 'src/convex/DT_Point.cpp',
54                 'src/convex/DT_Polyhedron.cpp',
55                 'src/convex/DT_Polytope.cpp',
56                 'src/convex/DT_Sphere.cpp',
57                 'src/convex/DT_Triangle.cpp']
58                 
59 complex_sources = ['src/complex/DT_BBoxTree.cpp',
60                 'src/complex/DT_Complex.cpp']
61
62 broad_sources = ['src/broad/BP_C-api.cpp',
63                 'src/broad/BP_EndpointList.cpp',
64                 'src/broad/BP_Proxy.cpp',
65                 'src/broad/BP_Scene.cpp']
66
67 solid_env.Append (CPPPATH = ['include',
68                              'src',
69                              'src/broad',
70                              'src/complex',
71                              'src/convex',
72                              '../qhull/include'])
73 source_files = solid_sources + convex_sources + complex_sources + broad_sources
74
75 solid_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/extern_solid', source=source_files)