Greg Kroah-Hartman | 9198099 | 2008-10-28 14:48:09 -0700 | [diff] [blame] | 1 | # Support ATE function |
| 2 | HAS_ATE=n |
| 3 | |
| 4 | # Support 28xx QA ATE function |
| 5 | HAS_28xx_QA=n |
| 6 | |
| 7 | # Support Wpa_Supplicant |
| 8 | HAS_WPA_SUPPLICANT=n |
| 9 | |
| 10 | # Support Native WpaSupplicant for Network Maganger |
| 11 | HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n |
| 12 | |
| 13 | #Support Net interface block while Tx-Sw queue full |
| 14 | HAS_BLOCK_NET_IF=n |
| 15 | |
| 16 | #Support DFS function |
| 17 | HAS_DFS_SUPPORT=n |
| 18 | |
| 19 | #Support Carrier-Sense function |
| 20 | HAS_CS_SUPPORT=n |
| 21 | |
| 22 | #ifdef MULTI_CARD |
| 23 | # Support for Multiple Cards |
| 24 | HAS_MC_SUPPORT=n |
| 25 | #endif // MULTI_CARD // |
| 26 | |
| 27 | #Support for IEEE802.11e DLS |
| 28 | HAS_QOS_DLS_SUPPORT=n |
| 29 | |
| 30 | #Support for EXT_CHANNEL |
| 31 | HAS_EXT_BUILD_CHANNEL_LIST=n |
| 32 | |
| 33 | #Support for Net-SNMP |
| 34 | HAS_SNMP_SUPPORT=n |
| 35 | |
| 36 | #Support features of Single SKU. |
| 37 | HAS_SINGLE_SKU_SUPPORT=n |
| 38 | |
| 39 | #Support features of 802.11n |
| 40 | HAS_DOT11_N_SUPPORT=y |
| 41 | |
| 42 | |
| 43 | ################################################# |
| 44 | |
| 45 | CC := $(CROSS_COMPILE)gcc |
| 46 | LD := $(CROSS_COMPILE)ld |
| 47 | |
| 48 | WFLAGS := -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 | |
| 56 | ifeq ($(RT28xx_MODE),STA) |
| 57 | WFLAGS += -DCONFIG_STA_SUPPORT -DDBG |
| 58 | |
| 59 | ifeq ($(HAS_WPA_SUPPLICANT),y) |
| 60 | WFLAGS += -DWPA_SUPPLICANT_SUPPORT |
| 61 | endif |
| 62 | |
| 63 | ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y) |
| 64 | WFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT |
| 65 | endif |
| 66 | |
| 67 | ifeq ($(HAS_ATE),y) |
| 68 | WFLAGS += -DRALINK_ATE |
| 69 | ifeq ($(HAS_28xx_QA),y) |
| 70 | WFLAGS += -DRALINK_28xx_QA |
| 71 | endif |
| 72 | endif |
| 73 | |
| 74 | ifeq ($(HAS_SNMP_SUPPORT),y) |
| 75 | WFLAGS += -DSNMP_SUPPORT |
| 76 | endif |
| 77 | |
| 78 | ifeq ($(HAS_QOS_DLS_SUPPORT),y) |
| 79 | WFLAGS += -DQOS_DLS_SUPPORT |
| 80 | endif |
| 81 | |
| 82 | ifeq ($(HAS_DOT11_N_SUPPORT),y) |
| 83 | WFLAGS += -DDOT11_N_SUPPORT |
| 84 | endif |
| 85 | |
| 86 | ifeq ($(HAS_CS_SUPPORT),y) |
| 87 | WFLAGS += -DCARRIER_DETECTION_SUPPORT |
| 88 | endif |
| 89 | |
| 90 | ifeq ($(HAS_SINGLE_SKU_SUPPORT),y) |
| 91 | WFLAGS += -DSINGLE_SKU |
| 92 | endif |
| 93 | |
| 94 | endif |
| 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 | |
| 107 | ifeq ($(HAS_EXT_BUILD_CHANNEL_LIST),y) |
| 108 | WFLAGS += -DEXT_BUILD_CHANNEL_LIST |
| 109 | endif |
| 110 | |
Greg Kroah-Hartman | 9198099 | 2008-10-28 14:48:09 -0700 | [diff] [blame] | 111 | ifeq ($(CHIPSET),2870) |
| 112 | WFLAGS +=-DRT2870 |
| 113 | endif |
| 114 | |
| 115 | ifeq ($(PLATFORM),5VT) |
| 116 | #WFLAGS += -DCONFIG_5VT_ENHANCE |
| 117 | endif |
| 118 | |
| 119 | ifeq ($(HAS_BLOCK_NET_IF),y) |
| 120 | WFLAGS += -DBLOCK_NET_IF |
| 121 | endif |
| 122 | |
| 123 | ifeq ($(HAS_DFS_SUPPORT),y) |
| 124 | WFLAGS += -DDFS_SUPPORT |
| 125 | endif |
| 126 | |
| 127 | #ifdef MULTI_CARD |
| 128 | ifeq ($(HAS_MC_SUPPORT),y) |
| 129 | WFLAGS += -DMULTIPLE_CARD_SUPPORT |
| 130 | endif |
| 131 | #endif // MULTI_CARD // |
| 132 | |
| 133 | ifeq ($(HAS_LLTD),y) |
| 134 | WFLAGS += -DLLTD_SUPPORT |
| 135 | endif |
| 136 | |
| 137 | ifeq ($(PLATFORM),IXP) |
| 138 | WFLAGS += -DRT_BIG_ENDIAN |
| 139 | endif |
| 140 | |
| 141 | ifeq ($(PLATFORM),IKANOS_V160) |
| 142 | WFLAGS += -DRT_BIG_ENDIAN -DIKANOS_VX_1X0 |
| 143 | endif |
| 144 | |
| 145 | ifeq ($(PLATFORM),IKANOS_V180) |
| 146 | WFLAGS += -DRT_BIG_ENDIAN -DIKANOS_VX_1X0 |
| 147 | endif |
| 148 | |
| 149 | ifeq ($(PLATFORM),INF_TWINPASS) |
| 150 | WFLAGS += -DRT_BIG_ENDIAN -DINF_TWINPASS |
| 151 | endif |
| 152 | |
| 153 | ifeq ($(PLATFORM),INF_DANUBE) |
| 154 | WFLAGS += -DINF_DANUBE -DRT_BIG_ENDIAN |
| 155 | endif |
| 156 | |
| 157 | ifeq ($(PLATFORM),CAVM_OCTEON) |
| 158 | WFLAGS += -DRT_BIG_ENDIAN |
| 159 | endif |
| 160 | |
| 161 | ifeq ($(PLATFORM),BRCM_6358) |
| 162 | WFLAGS += -DRT_BIG_ENDIAN |
| 163 | endif |
| 164 | |
| 165 | ifeq ($(PLATFORM),INF_AMAZON_SE) |
| 166 | #WFLAGS += -DRT_BIG_ENDIAN -DINF_AMAZON_SE -DBG_FT_SUPPORT |
| 167 | WFLAGS += -DRT_BIG_ENDIAN -DINF_AMAZON_SE |
| 168 | endif |
| 169 | |
| 170 | #kernel build options for 2.4 |
| 171 | # move to Makefile outside LINUX_SRC := /opt/star/kernel/linux-2.4.27-star |
| 172 | |
| 173 | ifeq ($(PLATFORM),STAR) |
| 174 | CFLAGS := -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 | |
| 176 | export CFLAGS |
| 177 | endif |
| 178 | |
| 179 | ifeq ($(PLATFORM),SIGMA) |
| 180 | CFLAGS := -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 | |
| 182 | export CFLAGS |
| 183 | endif |
| 184 | |
| 185 | ifeq ($(PLATFORM),SIGMA_8622) |
| 186 | CFLAGS := -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) |
| 187 | export CFLAGS |
| 188 | endif |
| 189 | |
| 190 | ifeq ($(PLATFORM),5VT) |
| 191 | CFLAGS := -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 | |
| 193 | export CFLAGS |
| 194 | endif |
| 195 | |
| 196 | ifeq ($(PLATFORM),IKANOS_V160) |
| 197 | CFLAGS := -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) |
| 198 | export CFLAGS |
| 199 | endif |
| 200 | |
| 201 | ifeq ($(PLATFORM),IKANOS_V180) |
| 202 | CFLAGS := -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) |
| 203 | export CFLAGS |
| 204 | endif |
| 205 | |
| 206 | ifeq ($(PLATFORM),INF_TWINPASS) |
| 207 | CFLAGS := -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) |
| 208 | export CFLAGS |
| 209 | endif |
| 210 | |
| 211 | ifeq ($(PLATFORM),INF_DANUBE) |
| 212 | CFLAGS := -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 |
| 213 | export CFLAGS |
| 214 | endif |
| 215 | |
| 216 | ifeq ($(PLATFORM),BRCM_6358) |
| 217 | CFLAGS := $(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 |
| 218 | export CFLAGS |
| 219 | endif |
| 220 | |
| 221 | ifeq ($(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 |
| 230 | endif |
| 231 | |
| 232 | ifeq ($(PLATFORM),IXP) |
| 233 | EXTRA_CFLAGS := -v $(WFLAGS) -I$(RT28xx_DIR)/include -mbig-endian |
| 234 | endif |
| 235 | |
| 236 | ifeq ($(PLATFORM),CAVM_OCTEON) |
| 237 | EXTRA_CFLAGS := $(WFLAGS) -I$(RT28xx_DIR)/include \ |
| 238 | -mabi=64 $(WFLAGS) |
| 239 | export CFLAGS |
| 240 | endif |
| 241 | |