from building import *
import rtconfig

cwd = GetCurrentDir()

src = []

if GetDepend('SENSOR_MT9V034'):
    src = Glob('mt9v034.c')
	
if GetDepend('SENSOR_OV2640'):
    src += Glob('ov2640.c')
	
	
if GetDepend('SENSOR_OV7725'):
    src += Glob('ov7725.c')

if GetDepend('SENSOR_OV9650'):
    src += Glob('ov9650.c')

src += Glob('drv_camera.c')

LOCAL_CCFLAGS = ''    
if rtconfig.CROSS_TOOL == 'gcc':
    LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
    LOCAL_CCFLAGS += ' --c99 --gnu'	

path  = [cwd ]

group = DefineGroup('Sensors', src, depend = ['RT_USING_CSI'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)

Return('group')
