2015-01-12 13:20:53 -05:00
|
|
|
# -*- python -*-
|
|
|
|
|
|
|
|
# Copyright Jim Bosch 2010-2012.
|
|
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
|
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
# http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
2015-08-14 22:09:54 -07:00
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
Import(['env', 'EXT_SUFFIX', 'LIB_SUFFIX', 'OBJ_SUFFIX'])
|
2015-01-12 13:20:53 -05:00
|
|
|
|
2015-08-14 22:09:54 -07:00
|
|
|
LIB_BOOST_NUMPY = ('boost_numpy' + LIB_SUFFIX)
|
|
|
|
sourcefiles = Glob("*.cpp")
|
|
|
|
if os.name == 'nt':
|
|
|
|
lib = env.StaticLibrary(LIB_BOOST_NUMPY, source=sourcefiles)
|
|
|
|
else:
|
|
|
|
mods = [g.name.replace('.cpp', '') for g in sourcefiles]
|
|
|
|
for m in mods:
|
|
|
|
env.SharedObject (target=m+OBJ_SUFFIX, source=m+'.cpp')
|
|
|
|
lib = env.SharedLibrary(LIB_BOOST_NUMPY, source=[m+OBJ_SUFFIX for m in mods])
|
2015-01-12 13:20:53 -05:00
|
|
|
|
|
|
|
Return("lib")
|