blob: 25bd55a7aab36a2cbd64cdd7538dd72b655e5827 [file] [log] [blame]
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001# Support ATE function
2HAS_ATE=n
3
4# Support 28xx QA ATE function
5HAS_28xx_QA=n
6
7# Support Wpa_Supplicant
8HAS_WPA_SUPPLICANT=n
9
10# Support Native WpaSupplicant for Network Maganger
11HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
12
13#Support Net interface block while Tx-Sw queue full
14HAS_BLOCK_NET_IF=n
15
16#Support DFS function
17HAS_DFS_SUPPORT=n
18
19#Support Carrier-Sense function
20HAS_CS_SUPPORT=n
21
22#ifdef MULTI_CARD
23# Support for Multiple Cards
24HAS_MC_SUPPORT=n
25#endif // MULTI_CARD //
26
27#Support for IEEE802.11e DLS
28HAS_QOS_DLS_SUPPORT=n
29
30#Support for EXT_CHANNEL
31HAS_EXT_BUILD_CHANNEL_LIST=n
32
33#Support for Net-SNMP
34HAS_SNMP_SUPPORT=n
35
36#Support features of Single SKU.
37HAS_SINGLE_SKU_SUPPORT=n
38
39#Support features of 802.11n
40HAS_DOT11_N_SUPPORT=y
41
42
43#################################################
44
45CC := $(CROSS_COMPILE)gcc
46LD := $(CROSS_COMPILE)ld
47
48WFLAGS := -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT -DLINUX -Wall -Wstrict-prototypes -Wno-trigraphs
49
50
51#################################################
52
53#ifdef CONFIG_STA_SUPPORT
54# config for STA mode
55
56ifeq ($(RT28xx_MODE),STA)
57WFLAGS += -DCONFIG_STA_SUPPORT -DDBG
58
59ifeq ($(HAS_WPA_SUPPLICANT),y)
60WFLAGS += -DWPA_SUPPLICANT_SUPPORT
61endif
62
63ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y)
64WFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT
65endif
66
67ifeq ($(HAS_ATE),y)
68WFLAGS += -DRALINK_ATE
69ifeq ($(HAS_28xx_QA),y)
70WFLAGS += -DRALINK_28xx_QA
71endif
72endif
73
74ifeq ($(HAS_SNMP_SUPPORT),y)
75WFLAGS += -DSNMP_SUPPORT
76endif
77
78ifeq ($(HAS_QOS_DLS_SUPPORT),y)
79WFLAGS += -DQOS_DLS_SUPPORT
80endif
81
82ifeq ($(HAS_DOT11_N_SUPPORT),y)
83WFLAGS += -DDOT11_N_SUPPORT
84endif
85
86ifeq ($(HAS_CS_SUPPORT),y)
87WFLAGS += -DCARRIER_DETECTION_SUPPORT
88endif
89
90ifeq ($(HAS_SINGLE_SKU_SUPPORT),y)
91WFLAGS += -DSINGLE_SKU
92endif
93
94endif
95# endif of ifeq ($(RT28xx_MODE),STA)
96#endif // CONFIG_STA_SUPPORT //
97
98#################################################
99
100#################################################
101
102#
103# Common compiler flag
104#
105
106
107ifeq ($(HAS_EXT_BUILD_CHANNEL_LIST),y)
108WFLAGS += -DEXT_BUILD_CHANNEL_LIST
109endif
110
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700111ifeq ($(CHIPSET),2870)
112WFLAGS +=-DRT2870
113endif
114
115ifeq ($(PLATFORM),5VT)
116#WFLAGS += -DCONFIG_5VT_ENHANCE
117endif
118
119ifeq ($(HAS_BLOCK_NET_IF),y)
120WFLAGS += -DBLOCK_NET_IF
121endif
122
123ifeq ($(HAS_DFS_SUPPORT),y)
124WFLAGS += -DDFS_SUPPORT
125endif
126
127#ifdef MULTI_CARD
128ifeq ($(HAS_MC_SUPPORT),y)
129WFLAGS += -DMULTIPLE_CARD_SUPPORT
130endif
131#endif // MULTI_CARD //
132
133ifeq ($(HAS_LLTD),y)
134WFLAGS += -DLLTD_SUPPORT
135endif
136
137ifeq ($(PLATFORM),IXP)
138WFLAGS += -DRT_BIG_ENDIAN
139endif
140
141ifeq ($(PLATFORM),IKANOS_V160)
142WFLAGS += -DRT_BIG_ENDIAN -DIKANOS_VX_1X0
143endif
144
145ifeq ($(PLATFORM),IKANOS_V180)
146WFLAGS += -DRT_BIG_ENDIAN -DIKANOS_VX_1X0
147endif
148
149ifeq ($(PLATFORM),INF_TWINPASS)
150WFLAGS += -DRT_BIG_ENDIAN -DINF_TWINPASS
151endif
152
153ifeq ($(PLATFORM),INF_DANUBE)
154WFLAGS += -DINF_DANUBE -DRT_BIG_ENDIAN
155endif
156
157ifeq ($(PLATFORM),CAVM_OCTEON)
158WFLAGS += -DRT_BIG_ENDIAN
159endif
160
161ifeq ($(PLATFORM),BRCM_6358)
162WFLAGS += -DRT_BIG_ENDIAN
163endif
164
165ifeq ($(PLATFORM),INF_AMAZON_SE)
166#WFLAGS += -DRT_BIG_ENDIAN -DINF_AMAZON_SE -DBG_FT_SUPPORT
167WFLAGS += -DRT_BIG_ENDIAN -DINF_AMAZON_SE
168endif
169
170#kernel build options for 2.4
171# move to Makefile outside LINUX_SRC := /opt/star/kernel/linux-2.4.27-star
172
173ifeq ($(PLATFORM),STAR)
174CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mshort-load-bytes -msoft-float -Uarm -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)
175
176export CFLAGS
177endif
178
179ifeq ($(PLATFORM),SIGMA)
180CFLAGS := -D__KERNEL__ -I$(RT28xx_DIR)/include -I$(LINUX_SRC)/include -I$(LINUX_SRC)/include/asm/gcc -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -DEM86XX_CHIP=EM86XX_CHIPID_TANGO2 -DEM86XX_REVISION=6 -I$(LINUX_SRC)/include/asm-mips/mach-generic -I$(RT2860_DIR)/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -mabi=32 -march=mips32r2 -Wa,-32 -Wa,-march=mips32r2 -Wa,-mips32r2 -Wa,--trap -DMODULE $(WFLAGS)
181
182export CFLAGS
183endif
184
185ifeq ($(PLATFORM),SIGMA_8622)
186CFLAGS := -D__KERNEL__ -I$(CROSS_COMPILE_INCLUDE)/include -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fno-common -pipe -fno-builtin -D__linux__ -DNO_MM -mapcs-32 -march=armv4 -mtune=arm7tdmi -msoft-float -DMODULE -mshort-load-bytes -nostdinc -iwithprefix -DMODULE $(WFLAGS)
187export CFLAGS
188endif
189
190ifeq ($(PLATFORM),5VT)
191CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm926ej-s --param max-inline-insns-single=40000 -Uarm -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE $(WFLAGS)
192
193export CFLAGS
194endif
195
196ifeq ($(PLATFORM),IKANOS_V160)
197CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(LINUX_SRC)/include/asm/gcc -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-generic -I$(RT28xx_DIR)/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -march=lx4189 -Wa, -DMODULE $(WFLAGS)
198export CFLAGS
199endif
200
201ifeq ($(PLATFORM),IKANOS_V180)
202CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(LINUX_SRC)/include/asm/gcc -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-generic -I$(RT28xx_DIR)/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -mips32r2 -Wa, -DMODULE $(WFLAGS)
203export CFLAGS
204endif
205
206ifeq ($(PLATFORM),INF_TWINPASS)
207CFLAGS := -D__KERNEL__ -DMODULE -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -march=4kc -mips32 -Wa,--trap -pipe -mlong-calls $(WFLAGS)
208export CFLAGS
209endif
210
211ifeq ($(PLATFORM),INF_DANUBE)
212CFLAGS := -I$(RT28xx_DIR)/include $(WFLAGS) -Wundef -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -I$(LINUX_SRC)/include/asm-mips/mach-generic
213export CFLAGS
214endif
215
216ifeq ($(PLATFORM),BRCM_6358)
217CFLAGS := $(WFLAGS) -I$(RT28xx_DIR)/include -nostdinc -iwithprefix include -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -I $(LINUX_SRC)/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -I$(LINUX_SRC)/include/asm-mips/mach-bcm963xx -I$(LINUX_SRC)/include/asm-mips/mach-generic -Os -fomit-frame-pointer -Wdeclaration-after-statement -DMODULE -mlong-calls
218export CFLAGS
219endif
220
221ifeq ($(PLATFORM),PC)
222 ifneq (,$(findstring 2.4,$(LINUX_SRC)))
223 # Linux 2.4
224 CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)
225 export CFLAGS
226 else
227 # Linux 2.6
228 EXTRA_CFLAGS := $(WFLAGS) -I$(RT28xx_DIR)/include
229 endif
230endif
231
232ifeq ($(PLATFORM),IXP)
233 EXTRA_CFLAGS := -v $(WFLAGS) -I$(RT28xx_DIR)/include -mbig-endian
234endif
235
236ifeq ($(PLATFORM),CAVM_OCTEON)
237 EXTRA_CFLAGS := $(WFLAGS) -I$(RT28xx_DIR)/include \
238 -mabi=64 $(WFLAGS)
239export CFLAGS
240endif
241