py/py.mk: Update lwip build config to work with latest lwip version.
Also, to make it possible for ports to provide their own lwipopts.h, the default include directory of extmod/lwip-include is no longer added and instead a port should now make sure the correct include directory is included in the list (can still use extmod/lwip-include).
This commit is contained in:
parent
84479569de
commit
871954d75c
32
py/py.mk
32
py/py.mk
|
@ -51,19 +51,19 @@ LDFLAGS_MOD += -L$(TOP)/lib/mbedtls/library -lmbedx509 -lmbedtls -lmbedcrypto
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#ifeq ($(MICROPY_PY_LWIP),1)
|
|
||||||
#CFLAGS_MOD += -DMICROPY_PY_LWIP=1 -I../lib/lwip/src/include -I../lib/lwip/src/include/ipv4 -I../extmod/lwip-include
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ifeq ($(MICROPY_PY_LWIP),1)
|
ifeq ($(MICROPY_PY_LWIP),1)
|
||||||
|
# A port should add an include path where lwipopts.h can be found (eg extmod/lwip-include)
|
||||||
LWIP_DIR = lib/lwip/src
|
LWIP_DIR = lib/lwip/src
|
||||||
INC += -I$(TOP)/lib/lwip/src/include -I$(TOP)/lib/lwip/src/include/ipv4 -I$(TOP)/extmod/lwip-include
|
INC += -I$(TOP)/$(LWIP_DIR)/include
|
||||||
CFLAGS_MOD += -DMICROPY_PY_LWIP=1
|
CFLAGS_MOD += -DMICROPY_PY_LWIP=1
|
||||||
|
$(BUILD)/$(LWIP_DIR)/core/ipv4/dhcp.o: CFLAGS_MOD += -Wno-address
|
||||||
SRC_MOD += extmod/modlwip.c lib/netutils/netutils.c
|
SRC_MOD += extmod/modlwip.c lib/netutils/netutils.c
|
||||||
SRC_MOD += $(addprefix $(LWIP_DIR)/,\
|
SRC_MOD += $(addprefix $(LWIP_DIR)/,\
|
||||||
core/def.c \
|
core/def.c \
|
||||||
core/dns.c \
|
core/dns.c \
|
||||||
|
core/inet_chksum.c \
|
||||||
core/init.c \
|
core/init.c \
|
||||||
|
core/ip.c \
|
||||||
core/mem.c \
|
core/mem.c \
|
||||||
core/memp.c \
|
core/memp.c \
|
||||||
core/netif.c \
|
core/netif.c \
|
||||||
|
@ -74,16 +74,26 @@ SRC_MOD += $(addprefix $(LWIP_DIR)/,\
|
||||||
core/tcp.c \
|
core/tcp.c \
|
||||||
core/tcp_in.c \
|
core/tcp_in.c \
|
||||||
core/tcp_out.c \
|
core/tcp_out.c \
|
||||||
core/timers.c \
|
core/timeouts.c \
|
||||||
core/udp.c \
|
core/udp.c \
|
||||||
core/ipv4/autoip.c \
|
core/ipv4/autoip.c \
|
||||||
|
core/ipv4/dhcp.c \
|
||||||
|
core/ipv4/etharp.c \
|
||||||
core/ipv4/icmp.c \
|
core/ipv4/icmp.c \
|
||||||
core/ipv4/igmp.c \
|
core/ipv4/igmp.c \
|
||||||
core/ipv4/inet.c \
|
core/ipv4/ip4_addr.c \
|
||||||
core/ipv4/inet_chksum.c \
|
core/ipv4/ip4.c \
|
||||||
core/ipv4/ip_addr.c \
|
core/ipv4/ip4_frag.c \
|
||||||
core/ipv4/ip.c \
|
core/ipv6/dhcp6.c \
|
||||||
core/ipv4/ip_frag.c \
|
core/ipv6/ethip6.c \
|
||||||
|
core/ipv6/icmp6.c \
|
||||||
|
core/ipv6/inet6.c \
|
||||||
|
core/ipv6/ip6_addr.c \
|
||||||
|
core/ipv6/ip6.c \
|
||||||
|
core/ipv6/ip6_frag.c \
|
||||||
|
core/ipv6/mld6.c \
|
||||||
|
core/ipv6/nd6.c \
|
||||||
|
netif/ethernet.c \
|
||||||
)
|
)
|
||||||
ifeq ($(MICROPY_PY_LWIP_SLIP),1)
|
ifeq ($(MICROPY_PY_LWIP_SLIP),1)
|
||||||
CFLAGS_MOD += -DMICROPY_PY_LWIP_SLIP=1
|
CFLAGS_MOD += -DMICROPY_PY_LWIP_SLIP=1
|
||||||
|
|
Loading…
Reference in New Issue