# for module compiling
import os
Import('OS_ROOT')
from build_tools import *

pwd = PresentDir()
list = os.listdir(pwd)

src = ['lvgl.c']

if IsDefined('OS_USING_GUI_LVGL_CONSOLE'):
    src += ['lvgl_console.c']

objs = AddCodeGroup('gui', src, depend = ['OS_USING_GUI_LVGL'], 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')
