SConscript 2.0 KB
Newer Older
X
xools 已提交
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
from building import *

src = Split("""
src/arch/sys_arch.c
src/api/api_lib.c
src/api/api_msg.c
src/api/err.c
src/api/netbuf.c
src/api/netdb.c
src/api/netifapi.c
src/api/sockets.c
src/api/tcpip.c
src/core/def.c
src/core/dns.c
src/core/inet_chksum.c
src/core/init.c
src/core/ip.c
src/core/memp.c
src/core/netif.c
src/core/pbuf.c
src/core/raw.c
src/core/stats.c
src/core/sys.c
src/core/tcp.c
src/core/tcp_in.c
src/core/tcp_out.c
src/core/timeouts.c
src/core/udp.c
src/netif/ethernet.c
src/netif/ethernetif.c
src/netif/lowpan6.c
""")

ipv4_src = Split("""
src/core/ipv4/autoip.c
src/core/ipv4/dhcp.c
src/core/ipv4/etharp.c
src/core/ipv4/icmp.c
src/core/ipv4/igmp.c
src/core/ipv4/ip4.c
src/core/ipv4/ip4_addr.c
src/core/ipv4/ip4_frag.c
""")

ipv6_src = Split("""
src/core/ipv6/dhcp6.c
src/core/ipv6/ethip6.c
src/core/ipv6/icmp6.c
src/core/ipv6/inet6.c
src/core/ipv6/ip6.c
src/core/ipv6/ip6_addr.c
src/core/ipv6/ip6_frag.c
src/core/ipv6/mld6.c
src/core/ipv6/nd6.c
""")

snmp_src = Glob("src/apps/snmp/*.c")

ppp_src = Glob("src/netif/ppp/*.c") + Glob("src/netif/ppp/polarssl/*c")

src = src + ipv4_src

# The set of source files associated with this SConscript file.
path = [GetCurrentDir() + '/src',
    GetCurrentDir() + '/src/include',
    GetCurrentDir() + '/src/include/ipv4',
    GetCurrentDir() + '/src/arch/include',
    GetCurrentDir() + '/src/include/netif']

70
if not GetDepend('RT_USING_SAL'):
71 72
    path += [GetCurrentDir() + '/src/include/posix']

X
xools 已提交
73 74 75 76 77 78 79
if GetDepend(['RT_LWIP_SNMP']):
    src += snmp_src
    path += [GetCurrentDir() + '/src/apps/snmp']

if GetDepend(['RT_LWIP_PPP']):
    src += ppp_src
    path += [GetCurrentDir() + '/src/netif/ppp']
80 81 82 83

if GetDepend(['RT_USING_LWIP_IPV6']):
    src += ipv6_src

84 85 86 87 88 89
if GetDepend(['RT_USING_NETUTILS']):
    if GetDepend(['RT_NETUTILS_USING_TFTP']):
        src += Glob('src/apps/tftp/*.c')
    if GetDepend(['RT_NETUTILS_USING_PING']):
        src += Glob('src/apps/ping/*.c')

X
xools 已提交
90 91 92
group = DefineGroup('lwIP', src, depend = ['RT_USING_LWIP', 'RT_USING_LWIP202'], CPPPATH = path)

Return('group')