from building import * 
import rtconfig

# get current dir path
cwd = GetCurrentDir()

# init src and inc vars
src = []
inc = []
group=[]

# add LittlevGL common include
res_folder = str(GetConfigValue('LV_HOR_RES_MAX'))+'x'+str(GetConfigValue('LV_VER_RES_MAX'))

if GetDepend(['LV_USE_EZIP']):
    res_folder += "_ezip"

src = src + Glob(res_folder + '/*.c')

# add font-bitmap common include
if not GetDepend(['LV_USING_FREETYPE_ENGINE']):
    src = src + Glob('./fonts/bitmap/*.c')

# add font-freetype common include
if GetDepend(['LV_USING_FREETYPE_ENGINE']):
    src = src + Glob('./fonts/freetype/lvsf_font_SourceHanSansCN_Normal_ttf.c')

LOCAL_CCFLAGS = ''

if not GetDepend(['LV_USING_EXT_RESOURCE_MANAGER']):
    group = DefineGroup('App_watch_demo_res', src, depend = ['PKG_USING_LITTLEVGL2RTT'], CPPPATH = inc, LOCAL_CCFLAGS = LOCAL_CCFLAGS)

Return('group')
