32 lines
749 B
Python
32 lines
749 B
Python
|
# RT-Thread building script for component
|
||
|
|
||
|
from building import *
|
||
|
|
||
|
cwd = GetCurrentDir()
|
||
|
|
||
|
src = Glob('src/*.c')
|
||
|
src += Glob('socket/*.c')
|
||
|
|
||
|
CPPPATH = [cwd + '/include']
|
||
|
CPPPATH += [cwd + '/include/dfs_net']
|
||
|
CPPPATH += [cwd + '/include/socket']
|
||
|
|
||
|
if GetDepend('SAL_USING_LWIP'):
|
||
|
src += Glob('impl/af_inet_lwip.c')
|
||
|
|
||
|
if GetDepend('SAL_USING_AT'):
|
||
|
src += Glob('impl/af_inet_at.c')
|
||
|
|
||
|
if GetDepend('SAL_USING_POSIX'):
|
||
|
src += Glob('dfs_net/*.c')
|
||
|
|
||
|
if not GetDepend('HAVE_SYS_SELECT_H'):
|
||
|
CPPPATH += [cwd + '/include/dfs_net/sys_select']
|
||
|
|
||
|
if not GetDepend('HAVE_SYS_SOCKET_H'):
|
||
|
CPPPATH += [cwd + '/include/socket/sys_socket']
|
||
|
|
||
|
group = DefineGroup('SAL', src, depend = ['RT_USING_SAL'], CPPPATH = CPPPATH)
|
||
|
|
||
|
Return('group')
|