import os
import inspect

lapack_dir = os.environ["HOME"] + "/.local"
lapack_lib = "-lopenblas.so"

# try to import an environment first
Import('env')

# find all .cus & .cpps in the current and backend/ directories
sources = ['../testframework.cu']
directories = ['.']
extensions = ['*.cu']

for dir in directories:
  for ext in extensions:
    regexp = os.path.join(dir, ext)
    sources.extend(env.Glob(regexp))

# add the directory containing this file to the include path
this_file = inspect.currentframe().f_code.co_filename
# this_dir = os.path.dirname(this_file)
env.Append(CPPPATH = lapack_dir + "/include")
env.Append(LIBPATH = lapack_dir + "/lib")
env.Append(LIBS = lapack_lib)

tester = env.Program('tester', sources)

