• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  "$LWIPDIR/core/net_group.c",
56  "$LWIPDIR/core/lowpower.c",
57]
58
59CORE4FILES = [
60  "$LWIPDIR/core/ipv4/autoip.c",
61  "$LWIPDIR/core/ipv4/dhcp.c",
62  "$LWIPDIR/core/ipv4/etharp.c",
63  "$LWIPDIR/core/ipv4/icmp.c",
64  "$LWIPDIR/core/ipv4/igmp.c",
65  "$LWIPDIR/core/ipv4/ip4_frag.c",
66  "$LWIPDIR/core/ipv4/ip4.c",
67  "$LWIPDIR/core/ipv4/ip4_addr.c",
68]
69
70CORE6FILES = [
71  "$LWIPDIR/core/ipv6/dhcp6.c",
72  "$LWIPDIR/core/ipv6/ethip6.c",
73  "$LWIPDIR/core/ipv6/icmp6.c",
74  "$LWIPDIR/core/ipv6/inet6.c",
75  "$LWIPDIR/core/ipv6/ip6.c",
76  "$LWIPDIR/core/ipv6/ip6_addr.c",
77  "$LWIPDIR/core/ipv6/ip6_frag.c",
78  "$LWIPDIR/core/ipv6/mld6.c",
79  "$LWIPDIR/core/ipv6/nd6.c",
80]
81
82# APIFILES: The files which implement the sequential and socket APIs.
83APIFILES = [
84  "$LWIPDIR/api/api_lib.c",
85  "$LWIPDIR/api/api_msg.c",
86  "$LWIPDIR/api/err.c",
87  "$LWIPDIR/api/if_api.c",
88  "$LWIPDIR/api/netbuf.c",
89  "$LWIPDIR/api/netdb.c",
90  "$LWIPDIR/api/netifapi.c",
91  "$LWIPDIR/api/sockets.c",
92  "$LWIPDIR/api/tcpip.c",
93]
94
95# NETIFFILES: Files implementing various generic network interface functions
96NETIFFILES = [
97  "$LWIPDIR/netif/ethernet.c",
98  "$LWIPDIR/netif/bridgeif.c",
99  "$LWIPDIR/netif/bridgeif_fdb.c",
100  "$LWIPDIR/netif/slipif.c",
101]
102
103# SIXLOWPAN: 6LoWPAN
104SIXLOWPAN = [
105  "$LWIPDIR/netif/lowpan6_common.c",
106  "$LWIPDIR/netif/lowpan6.c",
107  "$LWIPDIR/netif/lowpan6_ble.c",
108  "$LWIPDIR/netif/zepif.c",
109]
110
111# PPPFILES: PPP
112PPPFILES = [
113  "$LWIPDIR/netif/ppp/auth.c",
114  "$LWIPDIR/netif/ppp/ccp.c",
115  "$LWIPDIR/netif/ppp/chap-md5.c",
116  "$LWIPDIR/netif/ppp/chap_ms.c",
117  "$LWIPDIR/netif/ppp/chap-new.c",
118  "$LWIPDIR/netif/ppp/demand.c",
119  "$LWIPDIR/netif/ppp/eap.c",
120  "$LWIPDIR/netif/ppp/ecp.c",
121  "$LWIPDIR/netif/ppp/eui64.c",
122  "$LWIPDIR/netif/ppp/fsm.c",
123  "$LWIPDIR/netif/ppp/ipcp.c",
124  "$LWIPDIR/netif/ppp/ipv6cp.c",
125  "$LWIPDIR/netif/ppp/lcp.c",
126  "$LWIPDIR/netif/ppp/magic.c",
127  "$LWIPDIR/netif/ppp/mppe.c",
128  "$LWIPDIR/netif/ppp/multilink.c",
129  "$LWIPDIR/netif/ppp/ppp.c",
130  "$LWIPDIR/netif/ppp/pppapi.c",
131  "$LWIPDIR/netif/ppp/pppcrypt.c",
132  "$LWIPDIR/netif/ppp/pppoe.c",
133  "$LWIPDIR/netif/ppp/pppol2tp.c",
134  "$LWIPDIR/netif/ppp/pppos.c",
135  "$LWIPDIR/netif/ppp/upap.c",
136  "$LWIPDIR/netif/ppp/utils.c",
137  "$LWIPDIR/netif/ppp/vj.c",
138  "$LWIPDIR/netif/ppp/polarssl/arc4.c",
139  "$LWIPDIR/netif/ppp/polarssl/des.c",
140  "$LWIPDIR/netif/ppp/polarssl/md4.c",
141  "$LWIPDIR/netif/ppp/polarssl/md5.c",
142  "$LWIPDIR/netif/ppp/polarssl/sha1.c",
143]
144
145# LWIPNOAPPSFILES: All LWIP files without apps
146LWIPNOAPPSFILES = COREFILES + CORE4FILES + CORE6FILES + APIFILES + NETIFFILES +
147                  PPPFILES + SIXLOWPAN
148
149# SNMPFILES: SNMPv2c agent
150SNMPFILES = [
151  "$LWIPDIR/apps/snmp/snmp_asn1.c",
152  "$LWIPDIR/apps/snmp/snmp_core.c",
153  "$LWIPDIR/apps/snmp/snmp_mib2.c",
154  "$LWIPDIR/apps/snmp/snmp_mib2_icmp.c",
155  "$LWIPDIR/apps/snmp/snmp_mib2_interfaces.c",
156  "$LWIPDIR/apps/snmp/snmp_mib2_ip.c",
157  "$LWIPDIR/apps/snmp/snmp_mib2_snmp.c",
158  "$LWIPDIR/apps/snmp/snmp_mib2_system.c",
159  "$LWIPDIR/apps/snmp/snmp_mib2_tcp.c",
160  "$LWIPDIR/apps/snmp/snmp_mib2_udp.c",
161  "$LWIPDIR/apps/snmp/snmp_snmpv2_framework.c",
162  "$LWIPDIR/apps/snmp/snmp_snmpv2_usm.c",
163  "$LWIPDIR/apps/snmp/snmp_msg.c",
164  "$LWIPDIR/apps/snmp/snmpv3.c",
165  "$LWIPDIR/apps/snmp/snmp_netconn.c",
166  "$LWIPDIR/apps/snmp/snmp_pbuf_stream.c",
167  "$LWIPDIR/apps/snmp/snmp_raw.c",
168  "$LWIPDIR/apps/snmp/snmp_scalar.c",
169  "$LWIPDIR/apps/snmp/snmp_table.c",
170  "$LWIPDIR/apps/snmp/snmp_threadsync.c",
171  "$LWIPDIR/apps/snmp/snmp_traps.c",
172]
173
174# HTTPFILES: HTTP server + client
175HTTPFILES = [
176  "$LWIPDIR/apps/http/altcp_proxyconnect.c",
177  "$LWIPDIR/apps/http/fs.c",
178  "$LWIPDIR/apps/http/http_client.c",
179  "$LWIPDIR/apps/http/httpd.c",
180]
181
182# MAKEFSDATA: MAKEFSDATA HTTP server host utility
183MAKEFSDATAFILES = [ "$LWIPDIR/apps/http/makefsdata/makefsdata.c" ]
184
185# LWIPERFFILES: IPERF server
186LWIPERFFILES = [ "$LWIPDIR/apps/lwiperf/lwiperf.c" ]
187
188# SMTPFILES: SMTP client
189SMTPFILES = [ "$LWIPDIR/apps/smtp/smtp.c" ]
190
191# SNTPFILES: SNTP client
192SNTPFILES = [ "$LWIPDIR/apps/sntp/sntp.c" ]
193
194# MDNSFILES: MDNS responder
195MDNSFILES = [ "$LWIPDIR/apps/mdns/mdns.c" ]
196
197# NETBIOSNSFILES: NetBIOS name server
198NETBIOSNSFILES = [ "$LWIPDIR/apps/netbiosns/netbiosns.c" ]
199
200# TFTPFILES: TFTP server files
201TFTPFILES = [ "$LWIPDIR/apps/tftp/tftp_server.c" ]
202
203# MQTTFILES: MQTT client files
204MQTTFILES = [ "$LWIPDIR/apps/mqtt/mqtt.c" ]
205
206# MBEDTLS_FILES: MBEDTLS related files of lwIP rep
207MBEDTLS_FILES = [
208  "$LWIPDIR/apps/altcp_tls/altcp_tls_mbedtls.c",
209  "$LWIPDIR/apps/altcp_tls/altcp_tls_mbedtls_mem.c",
210  "$LWIPDIR/apps/snmp/snmpv3_mbedtls.c",
211]
212
213# LWIPAPPFILES: All LWIP APPs
214LWIPAPPFILES =
215    SNMPFILES + HTTPFILES + LWIPERFFILES + SMTPFILES + SNTPFILES + MDNSFILES +
216    NETBIOSNSFILES + TFTPFILES + MQTTFILES + MBEDTLS_FILES
217