#
# Makefile for the 865x High Performance
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...
# Note 3! Pay attention to the important comments line(21-25 and 42-46)!!!!!

obj-y := mmap.o
EXTRA_CFLAGS += -DCONFIG_RTL865X_MODULE_INTERNAL

obj-y += rtl_glue.o
#Add mips16 Support
ifdef CONFIG_RTL865X_KERNEL_MIPS16_LAYERDRIVER
	#CFLAGS_rtl865xc_swNic.o		= -mips16
	#CFLAGS_rtl_nic.o		= -mips16
	#CFLAGS_romeper.o		= -mips16
endif

#
#	The following configuration is used for 865xC model code only.
#	In fact, we will port more and more driver files from 865xB to 865xC.
#
	EXTRA_CFLAGS += 
	obj-$(CONFIG_RTL865X) += rtl865xc_swNic.o
	obj-$(CONFIG_RTL865X) += rtl_nic.o
	obj-$(CONFIG_RTL865X_ROMEPERF) += romeperf.o

#===>Attention: the following line define subdir with type ":=",not "+=", so to be
#	    sure that the other addition to subdir should not be placed before this line,or 
#	    the addition would be layed over!!
#

obj-y  += rtl865x/built-in.o
subdir-y += rtl865x

EXTRA_CFLAGS += -DRTL865X_OVER_KERNEL -DRTL865X_OVER_LINUX -D__KERNEL__ -Wno-implicit

EXTRA_CFLAGS += -DCONFIG_RTL865X_IGMP_SNOOPING
#######################################################################################################_CFLAGS
#
#	FAST EXTERNAL DEVICES related files
#
#	Fast path for external device process
#
########################################################################################################

EXTRA_CFLAGS += -I$(ROOTDIR)/include
EXTRA_CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/net/re865x/AsicDriver
EXTRA_CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/net/re865x/common
EXTRA_CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/net/re865x/l2Driver
EXTRA_CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/net/re865x/l3Driver
EXTRA_CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/net/re865x/l4Driver
EXTRA_CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/net/re865x/igmpsnooping
EXTRA_CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/net/re865x
EXTRA_CFLAGS += -D__KERNEL__ 
EXTRA_CFLAGS += -DEXPORT_SYMTAB 
ifeq ($(CONFIG_RTL865X_MODULE_ROMEDRV),y)
EXTRA_CFLAGS += -G 0
EXTRA_CFLAGS += -DMODULE
EXTRA_CFLAGS += -mlong-calls
endif		#$(CONFIG_RTL865X_MODULE_ROMEDRV)!=y
