import sys

Import('plugin_env')
Import('cxxflags')
interface_env = plugin_env.Copy(CXXFLAGS = cxxflags);

Import('lib_path')
#interface_env.Append (CXXFLAGS = cxxflags)
if sys.platform == 'win32' :
	interface_env.Append (CPPDEFINES= ['BUILDING_YAFRAYPLUGIN'])

source_files = ['interface_impl.cc']

interface_env.Append (CPPPATH = ['.','../..','../yafraycore'])
interface_env.Append (LIBPATH = ['../yafraycore'])

Import('dynload_lib')

libs=['yafraycore']

if dynload_lib != '' :
	libs=libs+ [dynload_lib]

interface=interface_env.SharedLibrary (target='yafrayplugin', source=source_files, LIBS=libs)
interface_env.Depends(interface,'../yafraycore')
interface_env.Install(lib_path,interface)


interface_env.Alias('install_interface',lib_path)
