Skip to content

Commit 920338c

Browse files
committed
Changed build file. For OS X, apple blas is now used. Also, always O3 compilation without debugging symbols.
1 parent a082656 commit 920338c

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

SConstruct

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,28 @@ import sys
22
import distutils.sysconfig
33
import numpy.distutils.misc_util
44

5+
LIBPATH = ['/usr/lib', '.', '/usr/local/lib', '/sw/lib']
6+
CPPPATH = ['/usr/local/include', '/sw/include', '/usr/include']
7+
CCFLAGS = ['-O3']
8+
59
# Some settings depending on the platform.
610
if sys.platform == 'darwin':
711
libname = 'libarac.dylib'
8-
linkflags = '-Wno-long-double -undefined suppress -flat_namespace'
12+
linkflags = '-Wno-long-double -undefined suppress -flat_namespace '
913
frameworksflags = '-flat_namespace -undefined suppress'
14+
CPPPATH.append('/System/Library/Frameworks/vecLib.framework/Versions/A/Headers')
1015
elif sys.platform == 'linux2':
1116
libname = 'libarac.so'
1217
frameworksflags = ''
1318
linkflags = ''
1419
else:
1520
raise SystemExit("Cannot build on %s." % sys.platform)
1621

17-
18-
SetOption('num_jobs', 4)
19-
2022
TARGET = '/usr/local'
2123

22-
LIBPATH = ['/usr/lib', '.', '/usr/local/lib', '/sw/lib']
23-
CPPPATH = ['/usr/local/include', '/sw/include', '/usr/include']
24-
CCFLAGS = ['-g', '-O3']
25-
#CCFLAGS = ['-O3']
26-
2724
PYTHONPATH = [distutils.sysconfig.get_python_inc()]
2825
NUMPYPATH = numpy.distutils.misc_util.get_numpy_include_dirs()
2926

30-
3127
# First compile and link the library.
3228
libenv = Environment(LIBS=['m', 'blas'], CPPPATH=CPPPATH, LIBPATH=LIBPATH,
3329
SHLIBPREFIX="", CCFLAGS=CCFLAGS)

0 commit comments

Comments
 (0)