import os
import os.path
import sys
sys.path += ["../../scons-config"]
import global_config
from   global_config import LIBUTIL
from   global_config import LIBGEOMETRY
from   global_config import add_program


lib_path     = "../lib"
include_path = "../include"
bin_path     = "../bin"  

conf = global_config.get_conf(os.getcwd() , 2)
env  = Environment()
lib_list = ["lapack" , "blas", "plplotd" , "m" , "z" , "pthread"]
if conf.g2c:
   lib_list.append( "g2c" )

conf.update_env( env , [ LIBGEOMETRY , LIBUTIL ] , ext_liblist = lib_list , link = True)
env.Append( CPPPATH = conf.PLPLOT_INCLUDE_PATH )
env.Append( LIBPATH = conf.PLPLOT_LIB_PATH )

add_program(env , conf ,  bin_path , "irap_test.x"       , "irap_test.c"        )
add_program(env , conf ,  bin_path , "polygon_test.x"    , "polygon_test.c"        )
Default( bin_path )


