2018-07-17 20:29:33 +08:00
|
|
|
# RT-Thread building script for component
|
|
|
|
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Glob('src/*.c')
|
2018-08-27 19:50:37 +08:00
|
|
|
src += Glob('socket/net_netdb.c')
|
2018-07-17 20:29:33 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd + '/include']
|
|
|
|
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')
|
2018-11-15 14:39:31 +08:00
|
|
|
|
2018-08-24 20:39:10 +08:00
|
|
|
if GetDepend('SAL_USING_LWIP') or GetDepend('SAL_USING_AT'):
|
|
|
|
CPPPATH += [cwd + '/impl']
|
2018-07-17 20:29:33 +08:00
|
|
|
|
2018-11-15 14:39:31 +08:00
|
|
|
if GetDepend('SAL_USING_TLS'):
|
|
|
|
src += Glob('impl/proto_mbedtls.c')
|
|
|
|
|
2018-07-17 20:29:33 +08:00
|
|
|
if GetDepend('SAL_USING_POSIX'):
|
2018-08-27 19:50:37 +08:00
|
|
|
CPPPATH += [cwd + '/include/dfs_net']
|
|
|
|
src += Glob('socket/net_sockets.c')
|
2018-07-17 20:29:33 +08:00
|
|
|
src += Glob('dfs_net/*.c')
|
|
|
|
|
|
|
|
if not GetDepend('HAVE_SYS_SELECT_H'):
|
|
|
|
CPPPATH += [cwd + '/include/dfs_net/sys_select']
|
|
|
|
|
2018-08-02 17:55:01 +08:00
|
|
|
if not GetDepend('HAVE_SYS_SOCKET_H'):
|
|
|
|
CPPPATH += [cwd + '/include/socket/sys_socket']
|
2018-07-17 20:29:33 +08:00
|
|
|
|
|
|
|
group = DefineGroup('SAL', src, depend = ['RT_USING_SAL'], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|