rt-thread/components/net/sal/SConscript

39 lines
946 B
Python
Raw Normal View History

# RT-Thread building script for component
from building import *
cwd = GetCurrentDir()
src = Glob('src/*.c')
src += Glob('socket/net_netdb.c')
CPPPATH = [cwd + '/include']
CPPPATH += [cwd + '/include/socket']
if GetDepend('SAL_USING_LWIP'):
2022-05-16 02:52:00 +08:00
src += Glob('docking/af_inet_lwip.c')
if GetDepend('SAL_USING_AT'):
2022-05-16 02:52:00 +08:00
src += Glob('docking/af_inet_at.c')
if GetDepend('SAL_USING_LWIP') or GetDepend('SAL_USING_AT'):
2022-05-16 02:52:00 +08:00
CPPPATH += [cwd + '/docking']
if GetDepend('SAL_USING_WINSOCK'):
src += Glob('docking/af_inet_winsock.c')
if GetDepend('SAL_USING_TLS'):
2022-05-16 02:52:00 +08:00
src += Glob('docking/proto_mbedtls.c')
if GetDepend('SAL_USING_POSIX'):
CPPPATH += [cwd + '/include/dfs_net']
src += Glob('socket/net_sockets.c')
src += Glob('dfs_net/*.c')
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')