blob: cc7634f7d96aa728b160c2c5bad4cdd12cd1e4df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# 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'):
src += Glob('impl/af_inet_lwip.c')
if GetDepend('SAL_USING_AT'):
src += Glob('impl/af_inet_at.c')
if GetDepend('SAL_USING_LWIP') or GetDepend('SAL_USING_AT'):
CPPPATH += [cwd + '/impl']
if GetDepend('SAL_USING_TLS'):
src += Glob('impl/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_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')
|