lwip: Fix makefile issues
Fix makefile issues related to incremental build. Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com> Reviewed-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
This commit is contained in:
parent
ff00dfdd03
commit
edfa3762db
3 changed files with 93 additions and 23 deletions
43
ThirdParty/sw_services/lwip141/src/Makefile
vendored
43
ThirdParty/sw_services/lwip141/src/Makefile
vendored
|
@ -7,6 +7,8 @@ ARCHIVER=
|
|||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
EXTRA_ARCHIVE_FLAGS=rc
|
||||
LIB=liblwip4.a
|
||||
|
||||
ifeq ($(CONFIG_PROCESSOR_LITTLE_ENDIAN), y)
|
||||
ENDIAN_FLAGS=-DPROCESSOR_LITTLE_ENDIAN
|
||||
|
@ -20,12 +22,25 @@ CC_FLAGS += $(ENDIAN_FLAGS)
|
|||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I${INCLUDEDIR} -I$(LWIP_DIR)/src/include -I$(LWIP_DIR)/src/include/ipv4 -I$(PORT)/include
|
||||
OUTS = ./*.o
|
||||
OBJ_DIR = .
|
||||
LWIP_OBJ1 = $(LWIP_OBJS) $(ADAPTER_OBJS)
|
||||
VPATH = $(LWIP_DIR)/src/core/ $(LWIP_DIR)/src/core/ipv4/ $(LWIP_DIR)/src/core/ipv6 \
|
||||
$(LWIP_DIR)/src/core/snmp $(LWIP_DIR)/src/netif $(LWIP_DIR)/src/api $(PORT) $(PORT)/netif
|
||||
INCLUDEFILES = $(ADAPTER_INCLUDES) $(LWIP_INCLUDES)
|
||||
|
||||
libs: liblwip4.a
|
||||
cp liblwip4.a $(RELEASEDIR)
|
||||
make clean
|
||||
|
||||
include:
|
||||
liblwip4.a: print_msg_lwip $(LWIP_OBJ1)
|
||||
$(ARCHIVER) $(EXTRA_ARCHIVE_FLAGS) ${RELEASEDIR}/${LIB} $(OUTS)
|
||||
|
||||
print_msg_lwip:
|
||||
@echo "Compiling lwip src and adapter files"
|
||||
|
||||
.PHONY: include
|
||||
include: liblwip4_includes
|
||||
|
||||
liblwip4_includes:
|
||||
${CP} -r $(LWIP_DIR)/src/include/ipv4/lwip ${INCLUDEDIR}
|
||||
${CP} -r $(LWIP_DIR)/src/include/lwip ${INCLUDEDIR}
|
||||
${CP} -r $(LWIP_DIR)/src/include/netif ${INCLUDEDIR}
|
||||
|
@ -35,23 +50,9 @@ include:
|
|||
${CP} -r contrib/ports/xilinx/include/xlwipconfig.h ${INCLUDEDIR}
|
||||
|
||||
clean:
|
||||
rm -rf obj/*.o
|
||||
rm -rf obj
|
||||
rm -rf liblwip4.a
|
||||
echo "clean target for lwip"
|
||||
rm -rf ${OUTS}
|
||||
rm -rf ${RELEASEDIR}/${LIB}
|
||||
|
||||
liblwip4.a: obj_dir print_msg_lwip_base $(LWIP_OBJS) print_msg_lwip_adapter $(ADAPTER_OBJS)
|
||||
@echo "Creating archive $@"
|
||||
$(ARCHIVER) rc $@ obj/*.o
|
||||
$(OBJ_DIR)/%.o: $(OBJ_DIR)/%.c $(INCLUDEFILES)
|
||||
$(GCC_COMPILER) $(CC_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) -c $< -o $@
|
||||
|
||||
obj_dir:
|
||||
mkdir obj
|
||||
|
||||
print_msg_lwip_base:
|
||||
@echo "Compiling lwIP"
|
||||
|
||||
print_msg_lwip_adapter:
|
||||
@echo "Compiling lwIP adapter for Xilinx MAC"
|
||||
|
||||
.c.o:
|
||||
$(GCC_COMPILER) $(CC_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) -c $< -o obj/$(@F)
|
||||
|
|
|
@ -7,6 +7,23 @@ COMMON_SRCS = $(PORT)/sys_arch_raw.c \
|
|||
$(PORT)/netif/xadapter.c \
|
||||
$(PORT)/netif/xtopology_g.c
|
||||
|
||||
ADAPTER_INCLUDES = $(PORT)/include/arch/cc.h \
|
||||
$(PORT)/include/arch/cpu.h \
|
||||
$(PORT)/include/arch/perf.h \
|
||||
$(PORT)/include/arch/sys_arch.h \
|
||||
$(PORT)/include/netif/xadapter.h \
|
||||
$(PORT)/include/netif/xaxiemacif.h \
|
||||
$(PORT)/include/netif/xemacliteif.h \
|
||||
$(PORT)/include/netif/xemacpsif.h \
|
||||
$(PORT)/include/netif/xlltemacif.h \
|
||||
$(PORT)/include/netif/xpqueue.h \
|
||||
$(PORT)/include/netif/xtopology.h \
|
||||
$(PORT)/netif/xaxiemacif_fifo.h \
|
||||
$(PORT)/netif/xaxiemacif_hw.h \
|
||||
$(PORT)/netif/xemacpsif_hw.h \
|
||||
$(PORT)/include/lwipopts.h \
|
||||
$(PORT)/include/xlwipconfig.h
|
||||
|
||||
EMACLITE_SRCS = $(PORT)/netif/xemacliteif.c
|
||||
|
||||
TEMAC_SRCS = $(PORT)/netif/xlltemacif_hw.c \
|
||||
|
@ -18,6 +35,7 @@ TEMAC_SRCS = $(PORT)/netif/xlltemacif_hw.c \
|
|||
AXI_ETHERNET_SRCS = $(PORT)/netif/xaxiemacif_hw.c \
|
||||
$(PORT)/netif/xaxiemacif_physpeed.c \
|
||||
$(PORT)/netif/xaxiemacif.c
|
||||
|
||||
AXI_ETHERNET_FIFO_SRCS = $(PORT)/netif/xaxiemacif_fifo.c
|
||||
AXI_ETHERNET_DMA_SRCS = $(PORT)/netif/xaxiemacif_dma.c
|
||||
|
||||
|
@ -56,4 +74,5 @@ ifeq ($(CONFIG_PS_ETHERNET), y)
|
|||
ADAPTER_SRCS += $(PS_ETHERNET_SRCS)
|
||||
endif
|
||||
|
||||
ADAPTER_OBJS = $(ADAPTER_SRCS:%.c=%.o)
|
||||
ADAPTER_OBJS1 = $(ADAPTER_SRCS:%.c=%.o)
|
||||
ADAPTER_OBJS = $(notdir $(ADAPTER_OBJS1))
|
||||
|
|
52
ThirdParty/sw_services/lwip141/src/Makefile.lwip
vendored
52
ThirdParty/sw_services/lwip141/src/Makefile.lwip
vendored
|
@ -50,6 +50,55 @@ API_SOCK_SRCS = $(LWIP_DIR)/src/api/api_lib.c \
|
|||
$(LWIP_DIR)/src/api/sockets.c \
|
||||
$(LWIP_DIR)/src/api/tcpip.c
|
||||
|
||||
LWIP_INCLUDES = $(LWIP_DIR)/src/include/ipv4/lwip/autoip.h \
|
||||
$(LWIP_DIR)/src/include/ipv4/lwip/icmp.h \
|
||||
$(LWIP_DIR)/src/include/ipv4/lwip/igmp.h \
|
||||
$(LWIP_DIR)/src/include/ipv4/lwip/inet.h \
|
||||
$(LWIP_DIR)/src/include/ipv4/lwip/inet_chksum.h \
|
||||
$(LWIP_DIR)/src/include/ipv4/lwip/ip.h \
|
||||
$(LWIP_DIR)/src/include/ipv4/lwip/ip_addr.h \
|
||||
$(LWIP_DIR)/src/include/ipv4/lwip/ip_frag.h \
|
||||
$(LWIP_DIR)/src/include/ipv6/lwip/icmp.h \
|
||||
$(LWIP_DIR)/src/include/ipv6/lwip/inet.h \
|
||||
$(LWIP_DIR)/src/include/ipv6/lwip/ip.h \
|
||||
$(LWIP_DIR)/src/include/ipv6/lwip/ip_addr.h \
|
||||
$(LWIP_DIR)/src/include/lwip/api.h \
|
||||
$(LWIP_DIR)/src/include/lwip/api_msg.h \
|
||||
$(LWIP_DIR)/src/include/lwip/arch.h \
|
||||
$(LWIP_DIR)/src/include/lwip/debug.h \
|
||||
$(LWIP_DIR)/src/include/lwip/def.h \
|
||||
$(LWIP_DIR)/src/include/lwip/dhcp.h \
|
||||
$(LWIP_DIR)/src/include/lwip/dns.h \
|
||||
$(LWIP_DIR)/src/include/lwip/err.h \
|
||||
$(LWIP_DIR)/src/include/lwip/init.h \
|
||||
$(LWIP_DIR)/src/include/lwip/mem.h \
|
||||
$(LWIP_DIR)/src/include/lwip/memp.h \
|
||||
$(LWIP_DIR)/src/include/lwip/memp_std.h \
|
||||
$(LWIP_DIR)/src/include/lwip/netbuf.h \
|
||||
$(LWIP_DIR)/src/include/lwip/netdb.h \
|
||||
$(LWIP_DIR)/src/include/lwip/netif.h \
|
||||
$(LWIP_DIR)/src/include/lwip/netifapi.h \
|
||||
$(LWIP_DIR)/src/include/lwip/opt.h \
|
||||
$(LWIP_DIR)/src/include/lwip/raw.h \
|
||||
$(LWIP_DIR)/src/include/lwip/pbuf.h \
|
||||
$(LWIP_DIR)/src/include/lwip/sio.h \
|
||||
$(LWIP_DIR)/src/include/lwip/snmp.h \
|
||||
$(LWIP_DIR)/src/include/lwip/snmp_asn1.h \
|
||||
$(LWIP_DIR)/src/include/lwip/snmp_msg.h \
|
||||
$(LWIP_DIR)/src/include/lwip/snmp_structs.h \
|
||||
$(LWIP_DIR)/src/include/lwip/sockets.h \
|
||||
$(LWIP_DIR)/src/include/lwip/stats.h \
|
||||
$(LWIP_DIR)/src/include/lwip/sys.h \
|
||||
$(LWIP_DIR)/src/include/lwip/tcp.h \
|
||||
$(LWIP_DIR)/src/include/lwip/tcp_impl.h \
|
||||
$(LWIP_DIR)/src/include/lwip/tcpip.h \
|
||||
$(LWIP_DIR)/src/include/lwip/timers.h \
|
||||
$(LWIP_DIR)/src/include/lwip/udp.h \
|
||||
$(LWIP_DIR)/src/include/netif/etharp.h \
|
||||
$(LWIP_DIR)/src/include/netif/ppp_oe.h \
|
||||
$(LWIP_DIR)/src/include/netif/slipif.h
|
||||
|
||||
|
||||
# create LWIP_SRCS based on configured options
|
||||
|
||||
LWIP_SRCS = $(CORE_SRCS)
|
||||
|
@ -65,4 +114,5 @@ ifeq ($(CONFIG_SOCKETS), y)
|
|||
LWIP_SRCS += $(API_SOCK_SRCS)
|
||||
endif
|
||||
|
||||
LWIP_OBJS = $(LWIP_SRCS:%.c=%.o)
|
||||
LWIP_OBJS1 = $(LWIP_SRCS:%.c=%.o)
|
||||
LWIP_OBJS = $(notdir $(LWIP_OBJS1))
|
||||
|
|
Loading…
Add table
Reference in a new issue