1# Copyright (c) 2021-2021 Huawei Device Co., Ltd. All rights reserved. 2# 3# Redistribution and use in source and binary forms, with or without modification, 4# are permitted provided that the following conditions are met: 5# 6# 1. Redistributions of source code must retain the above copyright notice, this list of 7# conditions and the following disclaimer. 8# 9# 2. Redistributions in binary form must reproduce the above copyright notice, this list 10# of conditions and the following disclaimer in the documentation and/or other materials 11# provided with the distribution. 12# 13# 3. Neither the name of the copyright holder nor the names of its contributors may be used 14# to endorse or promote products derived from this software without specific prior written 15# permission. 16# 17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 19# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 21# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29LWIPDIR = "//third_party/lwip/src" 30 31LWIP_INCLUDE_DIRS = [ "$LWIPDIR/include" ] 32 33# COREFILES, CORE4FILES: The minimum set of files needed for lwIP. 34COREFILES = [ 35 "$LWIPDIR/core/init.c", 36 "$LWIPDIR/core/def.c", 37 "$LWIPDIR/core/dns.c", 38 "$LWIPDIR/core/inet_chksum.c", 39 "$LWIPDIR/core/ip.c", 40 "$LWIPDIR/core/mem.c", 41 "$LWIPDIR/core/memp.c", 42 "$LWIPDIR/core/netif.c", 43 "$LWIPDIR/core/pbuf.c", 44 "$LWIPDIR/core/raw.c", 45 "$LWIPDIR/core/stats.c", 46 "$LWIPDIR/core/sys.c", 47 "$LWIPDIR/core/altcp.c", 48 "$LWIPDIR/core/altcp_alloc.c", 49 "$LWIPDIR/core/altcp_tcp.c", 50 "$LWIPDIR/core/tcp.c", 51 "$LWIPDIR/core/tcp_in.c", 52 "$LWIPDIR/core/tcp_out.c", 53 "$LWIPDIR/core/timeouts.c", 54 "$LWIPDIR/core/udp.c", 55] 56 57CORE4FILES = [ 58 "$LWIPDIR/core/ipv4/autoip.c", 59 "$LWIPDIR/core/ipv4/dhcp.c", 60 "$LWIPDIR/core/ipv4/etharp.c", 61 "$LWIPDIR/core/ipv4/icmp.c", 62 "$LWIPDIR/core/ipv4/igmp.c", 63 "$LWIPDIR/core/ipv4/ip4_frag.c", 64 "$LWIPDIR/core/ipv4/ip4.c", 65 "$LWIPDIR/core/ipv4/ip4_addr.c", 66] 67 68CORE6FILES = [ 69 "$LWIPDIR/core/ipv6/dhcp6.c", 70 "$LWIPDIR/core/ipv6/ethip6.c", 71 "$LWIPDIR/core/ipv6/icmp6.c", 72 "$LWIPDIR/core/ipv6/inet6.c", 73 "$LWIPDIR/core/ipv6/ip6.c", 74 "$LWIPDIR/core/ipv6/ip6_addr.c", 75 "$LWIPDIR/core/ipv6/ip6_frag.c", 76 "$LWIPDIR/core/ipv6/mld6.c", 77 "$LWIPDIR/core/ipv6/nd6.c", 78] 79 80# APIFILES: The files which implement the sequential and socket APIs. 81APIFILES = [ 82 "$LWIPDIR/api/api_lib.c", 83 "$LWIPDIR/api/api_msg.c", 84 "$LWIPDIR/api/err.c", 85 "$LWIPDIR/api/if_api.c", 86 "$LWIPDIR/api/netbuf.c", 87 "$LWIPDIR/api/netdb.c", 88 "$LWIPDIR/api/netifapi.c", 89 "$LWIPDIR/api/sockets.c", 90 "$LWIPDIR/api/tcpip.c", 91] 92 93# NETIFFILES: Files implementing various generic network interface functions 94NETIFFILES = [ 95 "$LWIPDIR/netif/ethernet.c", 96 "$LWIPDIR/netif/bridgeif.c", 97 "$LWIPDIR/netif/bridgeif_fdb.c", 98 "$LWIPDIR/netif/slipif.c", 99] 100 101# SIXLOWPAN: 6LoWPAN 102SIXLOWPAN = [ 103 "$LWIPDIR/netif/lowpan6_common.c", 104 "$LWIPDIR/netif/lowpan6.c", 105 "$LWIPDIR/netif/lowpan6_ble.c", 106 "$LWIPDIR/netif/zepif.c", 107] 108 109# PPPFILES: PPP 110PPPFILES = [ 111 "$LWIPDIR/netif/ppp/auth.c", 112 "$LWIPDIR/netif/ppp/ccp.c", 113 "$LWIPDIR/netif/ppp/chap-md5.c", 114 "$LWIPDIR/netif/ppp/chap_ms.c", 115 "$LWIPDIR/netif/ppp/chap-new.c", 116 "$LWIPDIR/netif/ppp/demand.c", 117 "$LWIPDIR/netif/ppp/eap.c", 118 "$LWIPDIR/netif/ppp/ecp.c", 119 "$LWIPDIR/netif/ppp/eui64.c", 120 "$LWIPDIR/netif/ppp/fsm.c", 121 "$LWIPDIR/netif/ppp/ipcp.c", 122 "$LWIPDIR/netif/ppp/ipv6cp.c", 123 "$LWIPDIR/netif/ppp/lcp.c", 124 "$LWIPDIR/netif/ppp/magic.c", 125 "$LWIPDIR/netif/ppp/mppe.c", 126 "$LWIPDIR/netif/ppp/multilink.c", 127 "$LWIPDIR/netif/ppp/ppp.c", 128 "$LWIPDIR/netif/ppp/pppapi.c", 129 "$LWIPDIR/netif/ppp/pppcrypt.c", 130 "$LWIPDIR/netif/ppp/pppoe.c", 131 "$LWIPDIR/netif/ppp/pppol2tp.c", 132 "$LWIPDIR/netif/ppp/pppos.c", 133 "$LWIPDIR/netif/ppp/upap.c", 134 "$LWIPDIR/netif/ppp/utils.c", 135 "$LWIPDIR/netif/ppp/vj.c", 136 "$LWIPDIR/netif/ppp/polarssl/arc4.c", 137 "$LWIPDIR/netif/ppp/polarssl/des.c", 138 "$LWIPDIR/netif/ppp/polarssl/md4.c", 139 "$LWIPDIR/netif/ppp/polarssl/md5.c", 140 "$LWIPDIR/netif/ppp/polarssl/sha1.c", 141] 142 143# LWIPNOAPPSFILES: All LWIP files without apps 144LWIPNOAPPSFILES = COREFILES + CORE4FILES + CORE6FILES + APIFILES + NETIFFILES + 145 PPPFILES + SIXLOWPAN 146 147# SNMPFILES: SNMPv2c agent 148SNMPFILES = [ 149 "$LWIPDIR/apps/snmp/snmp_asn1.c", 150 "$LWIPDIR/apps/snmp/snmp_core.c", 151 "$LWIPDIR/apps/snmp/snmp_mib2.c", 152 "$LWIPDIR/apps/snmp/snmp_mib2_icmp.c", 153 "$LWIPDIR/apps/snmp/snmp_mib2_interfaces.c", 154 "$LWIPDIR/apps/snmp/snmp_mib2_ip.c", 155 "$LWIPDIR/apps/snmp/snmp_mib2_snmp.c", 156 "$LWIPDIR/apps/snmp/snmp_mib2_system.c", 157 "$LWIPDIR/apps/snmp/snmp_mib2_tcp.c", 158 "$LWIPDIR/apps/snmp/snmp_mib2_udp.c", 159 "$LWIPDIR/apps/snmp/snmp_snmpv2_framework.c", 160 "$LWIPDIR/apps/snmp/snmp_snmpv2_usm.c", 161 "$LWIPDIR/apps/snmp/snmp_msg.c", 162 "$LWIPDIR/apps/snmp/snmpv3.c", 163 "$LWIPDIR/apps/snmp/snmp_netconn.c", 164 "$LWIPDIR/apps/snmp/snmp_pbuf_stream.c", 165 "$LWIPDIR/apps/snmp/snmp_raw.c", 166 "$LWIPDIR/apps/snmp/snmp_scalar.c", 167 "$LWIPDIR/apps/snmp/snmp_table.c", 168 "$LWIPDIR/apps/snmp/snmp_threadsync.c", 169 "$LWIPDIR/apps/snmp/snmp_traps.c", 170] 171 172# HTTPFILES: HTTP server + client 173HTTPFILES = [ 174 "$LWIPDIR/apps/http/altcp_proxyconnect.c", 175 "$LWIPDIR/apps/http/fs.c", 176 "$LWIPDIR/apps/http/http_client.c", 177 "$LWIPDIR/apps/http/httpd.c", 178] 179 180# MAKEFSDATA: MAKEFSDATA HTTP server host utility 181MAKEFSDATAFILES = [ "$LWIPDIR/apps/http/makefsdata/makefsdata.c" ] 182 183# LWIPERFFILES: IPERF server 184LWIPERFFILES = [ "$LWIPDIR/apps/lwiperf/lwiperf.c" ] 185 186# SMTPFILES: SMTP client 187SMTPFILES = [ "$LWIPDIR/apps/smtp/smtp.c" ] 188 189# SNTPFILES: SNTP client 190SNTPFILES = [ "$LWIPDIR/apps/sntp/sntp.c" ] 191 192# MDNSFILES: MDNS responder 193MDNSFILES = [ "$LWIPDIR/apps/mdns/mdns.c" ] 194 195# NETBIOSNSFILES: NetBIOS name server 196NETBIOSNSFILES = [ "$LWIPDIR/apps/netbiosns/netbiosns.c" ] 197 198# TFTPFILES: TFTP server files 199TFTPFILES = [ "$LWIPDIR/apps/tftp/tftp_server.c" ] 200 201# MQTTFILES: MQTT client files 202MQTTFILES = [ "$LWIPDIR/apps/mqtt/mqtt.c" ] 203 204# MBEDTLS_FILES: MBEDTLS related files of lwIP rep 205MBEDTLS_FILES = [ 206 "$LWIPDIR/apps/altcp_tls/altcp_tls_mbedtls.c", 207 "$LWIPDIR/apps/altcp_tls/altcp_tls_mbedtls_mem.c", 208 "$LWIPDIR/apps/snmp/snmpv3_mbedtls.c", 209] 210 211# LWIPAPPFILES: All LWIP APPs 212LWIPAPPFILES = 213 SNMPFILES + HTTPFILES + LWIPERFFILES + SMTPFILES + SNTPFILES + MDNSFILES + 214 NETBIOSNSFILES + TFTPFILES + MQTTFILES + MBEDTLS_FILES 215