#! /usr/bin/env python
# encoding: utf-8

def options(opt):
	pass

def configure(conf):
	pass

def build(bld):
	use = ['engine_includes', 'sdk_includes', 'werror']

	# FIXME: figure out why psvita needs it and how can we avoid it
	if bld.env.DEST_OS == 'psvita':
		bld.env.CFLAGS_cstlib.remove('-fno-PIC')
		bld.env.CFLAGS += ['-fPIC']
	else:
		use += ['public']

	bld.stlib(source = bld.path.ant_glob('*.c'),
		target = 'ref_common',
		includes = '.',
		export_includes = '.',
		defines = 'REF_DLL=1',
		use = use,
		subsystem = bld.env.MSVC_SUBSYSTEM
	)
