#!/usr/bin/env python


def build(bld):
	import os
	bld(
		features = ['c'],
		includes = ['.', '../..', '../common'],
		uselib = bld.env['COMMON_USELIB'] + ['GSTBACKPORT'],
		use = ['gstimxcommon'],
		name = 'gst_aggregator_backport',
		source = bld.path.ant_glob('gst-backport/*.c'),
		defines = ['HAVE_CONFIG_H']
	)
	obj = bld(
		features = ['c', bld.env['CLIBTYPE']],
		includes = ['.', '../..', '../common'],
		uselib = bld.env['COMMON_USELIB'],
		use = ['gstimxcommon', 'gst_aggregator_backport'],
		vnum = bld.env['GSTIMX_VERSION'],
		target = 'gstimxcompositor',
		name = 'gstimxcompositor',
		source = bld.path.ant_glob('*.c'),
		defines = ['HAVE_CONFIG_H']
	)
	if bld.env['BUILD_FOR_ANDROID']:
		obj.install_path = os.path.join(bld.env['PREFIX'], 'lib')
