-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.4
265 lines (208 loc) · 6.06 KB
/
Makefile.4
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
include $(RT28xx_DIR)/os/linux/config.mk
#ifdef CONFIG_STA_SUPPORT
ifeq ($(RT28xx_MODE), STA)
MOD_NAME = rt$(MODULE)sta
DAT_PATH = /etc/Wireless/RT$(MODULE_DAT)STA
DAT_FILE_NAME = RT$(MODULE_DAT)STA.dat
endif
#endif // CONFIG_STA_SUPPORT //
OBJ := $(MOD_NAME).o
#ifdef CONFIG_STA_SUPPORT
RT28XX_STA_OBJ := \
$(RT28xx_DIR)/common/crypt_md5.o\
$(RT28xx_DIR)/common/crypt_sha2.o\
$(RT28xx_DIR)/common/crypt_hmac.o\
$(RT28xx_DIR)/common/crypt_aes.o\
$(RT28xx_DIR)/common/crypt_arc4.o\
$(RT28xx_DIR)/common/mlme.o\
$(RT28xx_DIR)/common/cmm_wep.o\
$(RT28xx_DIR)/common/action.o\
$(RT28xx_DIR)/common/cmm_data.o\
$(RT28xx_DIR)/common/rtmp_init.o\
$(RT28xx_DIR)/common/rtmp_init_inf.o\
$(RT28xx_DIR)/common/cmm_tkip.o\
$(RT28xx_DIR)/common/cmm_aes.o\
$(RT28xx_DIR)/common/cmm_sync.o\
$(RT28xx_DIR)/common/eeprom.o\
$(RT28xx_DIR)/common/cmm_sanity.o\
$(RT28xx_DIR)/common/cmm_info.o\
$(RT28xx_DIR)/common/cmm_cfg.o\
$(RT28xx_DIR)/common/cmm_wpa.o\
$(RT28xx_DIR)/common/dfs.o\
$(RT28xx_DIR)/common/spectrum.o\
$(RT28xx_DIR)/common/rtmp_timer.o\
$(RT28xx_DIR)/common/rt_channel.o\
$(RT28xx_DIR)/common/cmm_profile.o\
$(RT28xx_DIR)/common/cmm_asic.o\
$(RT28xx_DIR)/common/cmm_cmd.o\
$(RT28xx_DIR)/rate_ctrl/ra_ctrl.o\
$(RT28xx_DIR)/rate_ctrl/alg_legacy.o\
$(RT28xx_DIR)/rate_ctrl/alg_ags.o\
$(RT28xx_DIR)/os/linux/rt_profile.o\
$(RT28xx_DIR)/chips/rtmp_chip.o\
$(RT28xx_DIR)/sta/assoc.o\
$(RT28xx_DIR)/sta/auth.o\
$(RT28xx_DIR)/sta/auth_rsp.o\
$(RT28xx_DIR)/sta/sync.o\
$(RT28xx_DIR)/sta/sanity.o\
$(RT28xx_DIR)/sta/rtmp_data.o\
$(RT28xx_DIR)/sta/connect.o\
$(RT28xx_DIR)/sta/wpa.o\
$(RT28xx_DIR)/sta/sta_cfg.o
ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/common/rt_os_util.o\
$(RT28xx_DIR)/os/linux/sta_ioctl.o\
$(RT28xx_DIR)/os/linux/rt_linux.o\
$(RT28xx_DIR)/os/linux/rt_main_dev.o
else
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/os/linux/rt_symb.o
endif
ifeq ($(HAS_NEW_RATE_ADAPT_SUPPORT),y)
RT28XX_STA_OBJS += $(RT28xx_DIR)/rate_ctrl/alg_grp.o
endif
ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/ate/common/rt_ate.o
endif
ifeq ($(HAS_QA_SUPPORT),y)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/ate/common/rt_qa.o
endif
#ifdef DOT11_N_SUPPORT
ifeq ($(HAS_DOT11_N_SUPPORT),y)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/common/ba_action.o
#ifdef TXBF_SUPPORT
ifeq ($(HAS_TXBF_SUPPORT),y)
rt$(MODULE)sta-objs += \
$(RT28xx_DIR)/common/cmm_txbf.o\
$(RT28xx_DIR)/common/cmm_txbf_cal.o
endif
#endif // TXBF_SUPPORT //
endif
#endif // DOT11_N_SUPPORT //
#ifdef ETH_CONVERT
ifeq ($(HAS_ETH_CONVERT_SUPPORT), y)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/common/cmm_mat.o \
$(RT28xx_DIR)/common/cmm_mat_iparp.o \
$(RT28xx_DIR)/common/cmm_mat_pppoe.o \
$(RT28xx_DIR)/common/cmm_mat_ipv6.o
endif
#endif // ETH_CONVERT //
ifeq ($(HAS_BLOCK_NET_IF),y)
RT28XX_STA_OBJ += $(RT28xx_DIR)/common/netif_block.o
endif
ifeq ($(HAS_QOS_DLS_SUPPORT),y)
RT28XX_STA_OBJ += $(RT28xx_DIR)/sta/dls.o
endif
#ifdef LED_CONTROL_SUPPORT
ifeq ($(HAS_LED_CONTROL_SUPPORT),y)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/common/rt_led.o
endif
#endif // LED_CONTROL_SUPPORT //
ifneq ($(findstring 3593,$(CHIPSET)),)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/common/cmm_mac_pci.o\
$(RT28xx_DIR)/common/cmm_data_pci.o\
$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
$(RT28xx_DIR)/common/rtmp_mcu.o\
$(RT28xx_DIR)/common/ee_prom.o\
$(RT28xx_DIR)/common/ee_efuse.o\
$(RT28xx_DIR)/common/rt_rf.o\
$(RT28xx_DIR)/common/frq_cal.o\
$(RT28xx_DIR)/chips/rt30xx.o\
$(RT28xx_DIR)/chips/rt35xx.o\
$(RT28xx_DIR)/chips/rt28xx.o\
$(RT28xx_DIR)/chips/rt3593.o
ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/ate/chips/rt3593_ate.o\
$(RT28xx_DIR)/ate/common/ate_pci.o
endif
ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
ifneq ($(findstring 3390,$(CHIPSET)),)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/common/cmm_mac_pci.o\
$(RT28xx_DIR)/common/cmm_data_pci.o\
$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
$(RT28xx_DIR)/common/ee_prom.o\
$(RT28xx_DIR)/common/ee_efuse.o\
$(RT28xx_DIR)/common/rtmp_mcu.o\
$(RT28xx_DIR)/common/rt_rf.o\
$(RT28xx_DIR)/chips/rt30xx.o\
$(RT28xx_DIR)/chips/rt3090.o\
$(RT28xx_DIR)/chips/rt33xx.o\
$(RT28xx_DIR)/chips/rt3390.o
ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
$(RT28xx_DIR)/ate/common/ate_pci.o
endif
ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // CONFIG_STA_SUPPORT //
PHONY := all release clean install uninstall
all:$(OBJ)
rt$(MODULE)sta.o: $(RT28XX_STA_OBJ)
$(LD) -r $^ -o $@
rt$(MODULE)ap.o: $(RT28XX_AP_OBJ)
$(LD) -r $^ -o $@
rt$(MODULE)apsta.o: $(RT28XX_APSTA_OBJ)
$(LD) -r $^ -o $@
release:
echo "MAKE Linux Station Code Release"
clean:
rm -f $(RT28xx_DIR)/common/*.o
rm -f $(RT28xx_DIR)/common/.*.{cmd,flags,d}
rm -f $(RT28xx_DIR)/os/linux/*.{o,ko,mod.{o,c}}
rm -f $(RT28xx_DIR)/os/linux/.*.{cmd,flags,d}
rm -fr $(RT28xx_DIR)/os/linux/.tmp_versions
rm -f $(RT28xx_DIR)/chips/*.o
rm -f $(RT28xx_DIR)/chips/.*.{cmd,flags,d}
ifeq ($(RT28xx_MODE),AP)
rm -f $(RT28xx_DIR)/ap/*.o
rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
else
ifeq ($(RT28xx_MODE),STA)
rm -f $(RT28xx_DIR)/sta/*.o
rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
else
ifeq ($(RT28xx_MODE),APSTA)
rm -f $(RT28xx_DIR)/ap/*.o
rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
rm -f $(RT28xx_DIR)/sta/*.o
rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
endif
endif
endif
install:
rm -rf $(DAT_PATH)
$(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
mkdir $(DAT_PATH)
cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
install -d $(LINUX_SRC_MODULE)
install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
/sbin/depmod -a ${shell uname -r}
uninstall:
# rm -rf $(DAT_PATH)
rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
/sbin/depmod -a ${shell uname -r}
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)