include Makefile.config

PORT = contrib/ports/xilinx

COMMON_SRCS = $(PORT)/sys_arch_raw.c \
	      $(PORT)/netif/xpqueue.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 \
	     $(PORT)/netif/xlltemacif_physpeed.c \
	     $(PORT)/netif/xlltemacif_fifo.c \
	     $(PORT)/netif/xlltemacif_sdma.c \
	     $(PORT)/netif/xlltemacif.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
AXI_ETHERNET_MCDMA_SRCS = $(PORT)/netif/xaxiemacif_mcdma.c

PS_ETHERNET_SRCS = $(PORT)/netif/xemacpsif_hw.c \
	     $(PORT)/netif/xemacpsif_physpeed.c \
	     $(PORT)/netif/xemacpsif.c		\
	     $(PORT)/netif/xemacpsif_dma.c

SYSARCH_SOCKET_SRCS = $(PORT)/sys_arch.c

ADAPTER_SRCS = $(COMMON_SRCS)

ifeq ($(CONFIG_SOCKETS), y)
ADAPTER_SRCS += $(SYSARCH_SOCKET_SRCS)
endif

ifeq ($(CONFIG_XEMACLITE), y)
ADAPTER_SRCS += $(EMACLITE_SRCS)
endif

ifeq ($(CONFIG_XLLTEMAC), y)
ADAPTER_SRCS += $(TEMAC_SRCS)
endif

ifeq ($(CONFIG_AXI_ETHERNET), y)
ADAPTER_SRCS += $(AXI_ETHERNET_SRCS)
endif
ifeq ($(CONFIG_AXI_ETHERNET_FIFO), y)
ADAPTER_SRCS += $(AXI_ETHERNET_FIFO_SRCS)
endif
ifeq ($(CONFIG_AXI_ETHERNET_DMA), y)
ADAPTER_SRCS += $(AXI_ETHERNET_DMA_SRCS)
endif
ifeq ($(CONFIG_AXI_ETHERNET_MCDMA), y)
ADAPTER_SRCS += $(AXI_ETHERNET_MCDMA_SRCS)
endif

ifeq ($(CONFIG_PS_ETHERNET), y)
ADAPTER_SRCS += $(PS_ETHERNET_SRCS)
endif

ADAPTER_OBJS1 = $(ADAPTER_SRCS:%.c=%.o)
ADAPTER_OBJS = $(notdir $(ADAPTER_OBJS1))
