From 5a7d40f80e055df0bce85c2ef61ba81a1b827bb4 Mon Sep 17 00:00:00 2001 From: hduffddybz Date: Sat, 30 Aug 2014 11:02:14 +0800 Subject: [PATCH] add conditional compilation of ipv6 source file --- components/net/lwip-head/SConscript | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/components/net/lwip-head/SConscript b/components/net/lwip-head/SConscript index 7ce23dcf76..f075886853 100644 --- a/components/net/lwip-head/SConscript +++ b/components/net/lwip-head/SConscript @@ -29,12 +29,18 @@ src/core/tcp_out.c src/core/timers.c src/core/udp.c src/core/inet_chksum.c +src/netif/etharp.c +src/netif/ethernetif.c +src/netif/slipif.c src/core/ipv4/autoip.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/ip_frag.c +""") + +ipv6_src = Split(""" src/core/ipv6/dhcp6.c src/core/ipv6/ethip6.c src/core/ipv6/icmp6.c @@ -44,9 +50,6 @@ src/core/ipv6/ip6.c src/core/ipv6/ip6_frag.c src/core/ipv6/mld6.c src/core/ipv6/nd6.c -src/netif/etharp.c -src/netif/ethernetif.c -src/netif/slipif.c """) snmp_src = Split(""" @@ -91,10 +94,13 @@ src/netif/ppp/polarssl/sha1.c path = [GetCurrentDir() + '/src', GetCurrentDir() + '/src/include', GetCurrentDir() + '/src/include/ipv4', - GetCurrentDir() + '/src/include/ipv6', + GetCurrentDir() + '/src/include/ipv6', GetCurrentDir() + '/src/arch/include', GetCurrentDir() + '/src/include/netif'] +if GetDepend(['RT_LWIP_IPV6']): + src += ipv6_src + if GetDepend(['RT_LWIP_SNMP']): src += snmp_src