summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/drivers/net/rtl819x/AsicDriver/Makefile
blob: c54c8b8925b9443bc0ed15e3e7028cfa2ae5a308 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# Makefile for the Tulip ethernet driver
#
# 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...
#Add mips16 Support

#DIR_RTLASIC = $(DIR_LINUX)/drivers/net/rtl819x/

L4_SUPPORT= 
ifdef CONFIG_RTL_8198
L4_SUPPORT=1
endif

ifdef CONFIG_RTL_8196CT
L4_SUPPORT=1
endif

ifdef CONFIG_RTL_8198T
L4_SUPPORT=1
endif

ifdef CONFIG_RTL_819XDT
L4_SUPPORT=1
endif


ifeq ($(CONFIG_RTL_819XD),y)
TARGET = 9xD
endif
ifeq ($(CONFIG_RTL_8196E),y)
TARGET = 96E
endif
ifeq ($(CONFIG_RTL_8196C),y)
TARGET = 96C
endif
ifeq ($(CONFIG_RTL_8198),y)
TARGET = 98
endif

ifeq ($(CONFIG_RTK_IPTABLES_FAST_PATH),m)
EXTRA_CFLAGS += -DCONFIG_FAST_PATH_MODULE
EXTRA_CFLAGS += -DCONFIG_RTK_IPTABLES_FAST_PATH
endif

ifdef CONFIG_RTL865X_KERNEL_MIPS16_LAYERDRIVER
	CFLAGS_rtl865xC_layer2asic.o	= -mips16
	CFLAGS_rtl865xC_tblAsicDrv.o	= -mips16
	CFLAGS_rtl865xC_tblBasicDrv.o	= -mips16
	CFLAGS_rtl865xC_hs.o		= -mips16
	CFLAGS_rtl8651_tblAsicDrv_cmd.o		= -mips16
endif

obj-y := \
	$(TARGET)/rtl865x_asicBasic.o \
	rtl865x_asicCom.o \
	rtl865x_asicL2.o \
	rtl865xC_hs.o

	ifdef CONFIG_RTL_LAYERED_ASIC_DRIVER_L3
		obj-y += $(TARGET)/rtl865x_asicL3.o
	endif

ifeq ($(L4_SUPPORT), 1) 
	ifdef CONFIG_RTL_LAYERED_ASIC_DRIVER_L4
		obj-y += $(TARGET)/rtl865x_asicL4.o 
	endif
endif

#obj-$(CONFIG_RTL865X_CLE) += rtl8651_tblAsicDrv_cmd.o

		
EXTRA_CFLAGS += -O1 -DRTL_TBLDRV -D__linux__  -mno-memcpy -DRTL865X_OVER_KERNEL -DRTL865X_OVER_LINUX -Werror
#EXTRA_CFLAGS += -I$(DIR_RTLASIC)/AsicDriver
#EXTRA_CFLAGS += -I$(DIR_RTLASIC)/l2Driver
#EXTRA_CFLAGS += -I$(DIR_RTLASIC)/common
#EXTRA_CFLAGS += -I$(DIR_RTLASIC)/cle
#EXTRA_CFLAGS += -I$(DIR_RTLASIC)

ifeq ($(CONFIG_RTL865X_MODULE_ROMEDRV),y)
	EXTRA_CFLAGS += -D__KERNEL__ 
	EXTRA_CFLAGS += -G 0 asdfasdfasdfasdfasdfasdfasdfasdfasdf
	EXTRA_CFLAGS += -DMODULE asdfasdf
	EXTRA_CFLAGS += -mlong-calls
	EXTRA_CFLAGS += -DEXPORT_SYMTAB 
	EXTRA_CFLAGS += -DCONFIG_RTL865X_MODULE_INTERNAL
endif

EXTRA_AFLAGS += $(EXTRA_CFLAGS)