forked from LingYunZhi/rtl8189es
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·342 lines (267 loc) · 7.99 KB
/
Makefile
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
#ccflags-y += $(USER_EXTRA_CFLAGS)
#ccflags-y += -O1
#ccflags-y += -O3
#ccflags-y += -Wall
#ccflags-y += -Wextra
#ccflags-y += -Werror
#ccflags-y += -pedantic
#ccflags-y += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
#ccflags-y += -Wno-unused-variable
#ccflags-y += -Wno-unused-value
#ccflags-y += -Wno-unused-label
#ccflags-y += -Wno-unused-parameter
#ccflags-y += -Wno-unused-function
#ccflags-y += -Wno-unused
#ccflags-y += -Wno-uninitialized
ccflags-y += -I$(src)/include
CONFIG_AUTOCFG_CP = n
CONFIG_RTL8192C = n
CONFIG_RTL8192D = n
CONFIG_RTL8723A = n
CONFIG_RTL8188E = y
CONFIG_USB_HCI = n
CONFIG_SDIO_HCI = y
CONFIG_MP_INCLUDED = y
CONFIG_POWER_SAVING = y
CONFIG_USB_AUTOSUSPEND = n
CONFIG_HW_PWRP_DETECTION = n
CONFIG_WIFI_TEST = n
CONFIG_RTL8192CU_REDEFINE_1X1 = n
CONFIG_INTEL_WIDI = n
CONFIG_WAPI_SUPPORT = n
CONFIG_EFUSE_CONFIG_FILE = n
CONFIG_EXT_CLK = n
CONFIG_FTP_PROTECT = n
CONFIG_WOWLAN = n
CONFIG_GPIO_WAKEUP = n
CONFIG_ODM_ADAPTIVITY = n
CONFIG_MMC_PM_KEEP_POWER = n
OUTSRC_FILES := hal/OUTSRC/odm_debug.o \
hal/OUTSRC/odm_interface.o\
hal/OUTSRC/odm_HWConfig.o\
hal/OUTSRC/odm.o\
hal/OUTSRC/HalPhyRf.o
ifeq ($(CONFIG_RTL8192C), y)
RTL871X = rtl8192c
ifeq ($(CONFIG_USB_HCI), y)
MODULE_NAME = 8192cu
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192CUFWImg_CE.o \
hal/OUTSRC/$(RTL871X)/Hal8192CUPHYImg_CE.o \
hal/OUTSRC/$(RTL871X)/Hal8192CUMACImg_CE.o
endif
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/odm_RTL8192C.o\
hal/OUTSRC/$(RTL871X)/HalDMOutSrc8192C_CE.o
CHIP_FILES := \
hal/$(RTL871X)/$(RTL871X)_sreset.o \
hal/$(RTL871X)/$(RTL871X)_xmit.o
CHIP_FILES += $(OUTSRC_FILES)
endif
ifeq ($(CONFIG_RTL8192D), y)
RTL871X = rtl8192d
ifeq ($(CONFIG_USB_HCI), y)
MODULE_NAME = 8192du
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192DUFWImg_CE.o \
hal/OUTSRC/$(RTL871X)/Hal8192DUPHYImg_CE.o \
hal/OUTSRC/$(RTL871X)/Hal8192DUMACImg_CE.o
endif
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/odm_RTL8192D.o\
hal/OUTSRC/$(RTL871X)/HalDMOutSrc8192D_CE.o
CHIP_FILES := \
hal/$(RTL871X)/$(RTL871X)_xmit.o
CHIP_FILES += $(OUTSRC_FILES)
endif
ifeq ($(CONFIG_RTL8723A), y)
RTL871X = rtl8723a
HAL_COMM_FILES := hal/$(RTL871X)/$(RTL871X)_xmit.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o
ifeq ($(CONFIG_SDIO_HCI), y)
MODULE_NAME = 8723as
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723SHWImg_CE.o
endif
ifeq ($(CONFIG_USB_HCI), y)
MODULE_NAME = 8723au
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723UHWImg_CE.o
endif
#hal/OUTSRC/$(RTL871X)/HalHWImg8723A_FW.o
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8723A_BB.o\
hal/OUTSRC/$(RTL871X)/HalHWImg8723A_MAC.o\
hal/OUTSRC/$(RTL871X)/HalHWImg8723A_RF.o\
hal/OUTSRC/$(RTL871X)/odm_RegConfig8723A.o
OUTSRC_FILES += hal/OUTSRC/rtl8192c/HalDMOutSrc8192C_CE.o
clean_more ?=
clean_more += clean_odm-8192c
PWRSEQ_FILES := hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8723PwrSeq.o
CHIP_FILES += $(HAL_COMM_FILES) $(OUTSRC_FILES) $(PWRSEQ_FILES)
endif
ifeq ($(CONFIG_RTL8188E), y)
RTL871X = rtl8188e
HAL_COMM_FILES := hal/$(RTL871X)/$(RTL871X)_xmit.o\
hal/$(RTL871X)/$(RTL871X)_sreset.o
ifeq ($(CONFIG_SDIO_HCI), y)
MODULE_NAME = 8189es
endif
ifeq ($(CONFIG_USB_HCI), y)
MODULE_NAME = 8188eu
endif
#hal/OUTSRC/$(RTL871X)/HalHWImg8188E_FW.o
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8188E_MAC.o\
hal/OUTSRC/$(RTL871X)/HalHWImg8188E_BB.o\
hal/OUTSRC/$(RTL871X)/HalHWImg8188E_RF.o\
hal/OUTSRC/$(RTL871X)/Hal8188EFWImg_CE.o\
hal/OUTSRC/$(RTL871X)/HalPhyRf_8188e.o\
hal/OUTSRC/$(RTL871X)/odm_RegConfig8188E.o\
hal/OUTSRC/$(RTL871X)/Hal8188ERateAdaptive.o\
hal/OUTSRC/$(RTL871X)/odm_RTL8188E.o
ifeq ($(CONFIG_RTL8188E), y)
ifeq ($(CONFIG_WOWLAN), y)
OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8188E_FW.o
endif
endif
PWRSEQ_FILES := hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8188EPwrSeq.o
CHIP_FILES += $(HAL_COMM_FILES) $(OUTSRC_FILES) $(PWRSEQ_FILES)
endif
ifeq ($(CONFIG_SDIO_HCI), y)
HCI_NAME = sdio
endif
ifeq ($(CONFIG_USB_HCI), y)
HCI_NAME = usb
endif
_OS_INTFS_FILES := os_dep/osdep_service.o \
os_dep/linux/os_intfs.o \
os_dep/linux/$(HCI_NAME)_intf.o \
os_dep/linux/$(HCI_NAME)_ops_linux.o \
os_dep/linux/ioctl_linux.o \
os_dep/linux/xmit_linux.o \
os_dep/linux/mlme_linux.o \
os_dep/linux/recv_linux.o \
os_dep/linux/ioctl_cfg80211.o \
os_dep/linux/rtw_android.o
ifeq ($(CONFIG_SDIO_HCI), y)
_OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o
_OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o
endif
_HAL_INTFS_FILES := hal/hal_intf.o \
hal/hal_com.o \
hal/$(RTL871X)/$(RTL871X)_hal_init.o \
hal/$(RTL871X)/$(RTL871X)_phycfg.o \
hal/$(RTL871X)/$(RTL871X)_rf6052.o \
hal/$(RTL871X)/$(RTL871X)_dm.o \
hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
hal/$(RTL871X)/$(RTL871X)_cmd.o \
hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
ifeq ($(CONFIG_SDIO_HCI), y)
_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
else
_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
endif
ifeq ($(CONFIG_MP_INCLUDED), y)
_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
endif
_HAL_INTFS_FILES += $(CHIP_FILES)
ifeq ($(CONFIG_AUTOCFG_CP), y)
ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy)
$(shell ln -sf $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
else
$(shell ln -sf $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
endif
endif
ifeq ($(CONFIG_USB_HCI), y)
ifeq ($(CONFIG_USB_AUTOSUSPEND), y)
ccflags-y += -DCONFIG_USB_AUTOSUSPEND
endif
endif
ifeq ($(CONFIG_MP_INCLUDED), y)
#MODULE_NAME := $(MODULE_NAME)_mp
ccflags-y += -DCONFIG_MP_INCLUDED
endif
ifeq ($(CONFIG_POWER_SAVING), y)
ccflags-y += -DCONFIG_POWER_SAVING
endif
ifeq ($(CONFIG_HW_PWRP_DETECTION), y)
ccflags-y += -DCONFIG_HW_PWRP_DETECTION
endif
ifeq ($(CONFIG_WIFI_TEST), y)
ccflags-y += -DCONFIG_WIFI_TEST
endif
ifeq ($(CONFIG_RTL8192CU_REDEFINE_1X1), y)
ccflags-y += -DRTL8192C_RECONFIG_TO_1T1R
endif
ifeq ($(CONFIG_INTEL_WIDI), y)
ccflags-y += -DCONFIG_INTEL_WIDI
endif
ifeq ($(CONFIG_WAPI_SUPPORT), y)
ccflags-y += -DCONFIG_WAPI_SUPPORT
endif
ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
ccflags-y += -DCONFIG_EFUSE_CONFIG_FILE
endif
ifeq ($(CONFIG_EXT_CLK), y)
ccflags-y += -DCONFIG_EXT_CLK
endif
ifeq ($(CONFIG_FTP_PROTECT), y)
ccflags-y += -DCONFIG_FTP_PROTECT
endif
ifeq ($(CONFIG_ODM_ADAPTIVITY), y)
ccflags-y += -DCONFIG_ODM_ADAPTIVITY
endif
ifeq ($(CONFIG_MMC_PM_KEEP_POWER), y)
ccflags-y += -DCONFIG_MMC_PM_KEEP_POWER
endif
ifeq ($(CONFIG_RTL8188E), y)
ifeq ($(CONFIG_WOWLAN), y)
ccflags-y += -DCONFIG_WOWLAN
ccflags-y += -DCONFIG_MMC_PM_KEEP_POWER
endif
ifeq ($(CONFIG_GPIO_WAKEUP), y)
ccflags-y += -DCONFIG_GPIO_WAKEUP
endif
endif
ifeq ($(CONFIG_RTL8188E), y)
ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
ccflags-y += -DCONFIG_RF_GAIN_OFFSET
endif
endif
ccflags-y += -DCONFIG_LITTLE_ENDIAN
ccflags-y += -DCONFIG_CONCURRENT_MODE
ccflags-y += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ccflags-y += -DCONFIG_P2P_IPS
rtk_core := core/rtw_cmd.o \
core/rtw_security.o \
core/rtw_debug.o \
core/rtw_io.o \
core/rtw_ioctl_set.o \
core/rtw_ieee80211.o \
core/rtw_mlme.o \
core/rtw_mlme_ext.o \
core/rtw_wlan_util.o \
core/rtw_pwrctrl.o \
core/rtw_rf.o \
core/rtw_recv.o \
core/rtw_sta_mgt.o \
core/rtw_ap.o \
core/rtw_xmit.o \
core/rtw_p2p.o \
core/rtw_tdls.o \
core/rtw_br_ext.o \
core/rtw_iol.o \
core/rtw_led.o \
core/rtw_sreset.o \
core/rtw_odm.o
rtl8189es-y += $(rtk_core)
rtl8189es-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o
rtl8189es-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \
core/rtw_wapi_sms4.o
rtl8189es-y += core/efuse/rtw_efuse.o
rtl8189es-y += $(_HAL_INTFS_FILES)
rtl8189es-y += $(_OS_INTFS_FILES)
rtl8189es-$(CONFIG_MP_INCLUDED) += core/rtw_mp.o \
core/rtw_mp_ioctl.o
ifeq ($(CONFIG_RTL8723A), y)
rtl8189es-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
endif
obj-$(CPTCFG_RTL8189ES) := rtl8189es.o