#! /usr/bin/env python

plugindir = '%s/radare/'%bld.env['LIBDIR']

so_hello = bld.new_task_gen('cc', 'shlib')
so_hello.includes = '../..'
so_hello.target = 'hello'
so_hello.source = 'hello.c'
so_hello.install_path = plugindir

# TODO: if have python here...
if so_hello.env['HAVE_PYTHON'] == 1:
	so_python = bld.new_task_gen('cc', 'shlib','pyembed')
	so_python.includes = '../..'
	so_python.target = 'python'
	so_python.source = 'python.c'
	so_python.install_path = plugindir

if so_hello.env['HAVE_LIBLUA'] == 1:
	so_lua = bld.new_task_gen('cc', 'shlib','lua')
	so_lua.includes = '../..'
	#so_lua.env.append_value('LINKFLAGS','-llua') 
        so_lua.env.append_value('LINKFLAGS', so_hello.env['HAVE_LIBLUA_STR'])
	so_lua.target = 'lua'
	so_lua.source = 'lua.c'
	so_lua.install_path = plugindir
