#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006 (ita)

# the following two variables are used by the target "waf dist"
VERSION='0.0.1'
APPNAME='d_test'

import Params
import compiler_d

# these variables are mandatory ('/' are converted automatically)
srcdir = '.'
blddir = 'build'

def set_options(opt):
	compiler_d.set_options(opt)

def configure(conf):
	compiler_d.detect(conf)
	conf.env['LIB_PTHREAD'] = ['pthread']

def build(bld):
	bld.add_subdirs('src2')

	obj = bld.create_obj('d', 'staticlib')
	obj.source = '''
	testlib/code.d
	'''
	obj.importpath = '.'
	obj.name = 'testlib'
	obj.target = 'testlib'

	obj = bld.create_obj('d', 'program')
	obj.source = '''
	example.d
	'''
	obj.target = 'd_test'
	obj.uselib_local = 'testlib'
	obj.uselib = 'PTHREAD'
