2004-05-16 13:07:20 +00:00
|
|
|
#!/usr/bin/python
|
2004-03-22 22:02:18 +00:00
|
|
|
import sys
|
2005-05-06 13:37:18 +00:00
|
|
|
import os
|
2004-03-22 22:02:18 +00:00
|
|
|
|
2005-05-06 13:37:18 +00:00
|
|
|
qhull_env = Environment(ENV = os.environ)
|
2004-03-09 21:14:03 +00:00
|
|
|
|
|
|
|
# Import the C flags set in the SConstruct file
|
|
|
|
Import ('cflags')
|
|
|
|
Import ('defines')
|
|
|
|
Import ('user_options_dict')
|
2004-03-22 22:02:18 +00:00
|
|
|
if sys.platform=='linux2' or sys.platform=='linux-i386':
|
|
|
|
qhull_env.Append (CCFLAGS = ['-O2', '-ansi'])
|
2004-04-22 04:50:41 +00:00
|
|
|
elif sys.platform=='win32':
|
|
|
|
qhull_env.Append (CCFLAGS = ['/O2'])
|
2004-03-22 22:02:18 +00:00
|
|
|
elif sys.platform=='sunos':
|
|
|
|
qhull_env.Append (CCFLAGS = ['Xc', '-v', '-fast'])
|
2004-05-08 01:34:39 +00:00
|
|
|
elif sys.platform=='darwin':
|
2004-11-14 14:38:03 +00:00
|
|
|
qhull_env.Append (CCFLAGS = ['-O2', '-pipe', '-fPIC', '-funsigned-char', '-ffast-math', '-mpowerpc' , '-mtune=G4'])
|
2004-03-22 22:02:18 +00:00
|
|
|
else:
|
|
|
|
qhull_env.Append (CCFLAGS = cflags)
|
2004-03-09 21:14:03 +00:00
|
|
|
qhull_env.Append (CPPDEFINES = defines)
|
|
|
|
|
|
|
|
source_files = ['src/geom.c',
|
|
|
|
'src/geom2.c',
|
|
|
|
'src/global.c',
|
|
|
|
'src/io.c',
|
|
|
|
'src/mem.c',
|
|
|
|
'src/merge.c',
|
|
|
|
'src/poly.c',
|
|
|
|
'src/poly2.c',
|
|
|
|
'src/qhull.c',
|
|
|
|
'src/qset.c',
|
|
|
|
'src/stat.c',
|
|
|
|
'src/user.c']
|
|
|
|
|
|
|
|
qhull_env.Append (CPPPATH = ['include',
|
|
|
|
'src'])
|
|
|
|
|
|
|
|
qhull_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/extern_qhull', source=source_files)
|