import os
from build_tools import *

pwd  = PresentDir()
objs = []
src  = ['os_drivers.c']

if IsDefined('OS_USING_DEVICE'):
    src += ['os_device.c']

list = os.listdir(pwd)
objs += AddCodeGroup('drivers', src, depend = [''], CPPPATH = [pwd])
for d in list:
    path = os.path.join(pwd, d)
    if os.path.isfile(os.path.join(path, 'SConscript')):
        objs = objs + SConscript(os.path.join(d, 'SConscript'))

Return('objs')
