forked from lwfinger/rtw89-BT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.06 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
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the Linux Bluetooth HCI device drivers.
#
ifneq ($(KERNELRELEASE),)
obj-m += btbcm_git.o
obj-m += btintel_git.o
obj-m += btmtk_git.o
obj-m += btrtl_git.o
obj-m += btusb_git.o
ccflags-y += -DCONFIG_BT_HCIBTUSB_AUTOSUSPEND -DCONFIG_BT_HCIBTUSB_POLL_SYNC
ccflags-y += -DCONFIG_BT_RTL -DCONFIG_BT_HCIBTUSB_RTL
ccflags-y += -DCONFIG_BT_MTK -DCONFIG_BT_HCIBTUSB_MTK
ccflags-y += -Wno-declaration-after-statement
else
KVER ?= `uname -r`
KDIR ?= /lib/modules/$(KVER)/build
MODDIR ?= /lib/modules/$(KVER)/extra/bluetooth
modules:
$(MAKE) -j`nproc` -C $(KDIR) M=$$PWD modules
clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
install:
strip -g *.ko
@install -Dvm 644 -t $(MODDIR) *.ko
@install -Dvm 644 -t /etc/modprobe.d blacklist-btusb.conf
depmod -a $(KVER)
install_fw:
rm -rf /lib/firmware/rtl_bt
@install -Dvm 644 -t /lib/firmware/rtl_bt firmware/*.bin
uninstall:
@rm -rvf $(MODDIR)
@rm -vf /etc/modprobe.d/blacklist-btusb.conf
@rmdir --ignore-fail-on-non-empty /lib/modules/$(KVER)/extra || true
depmod -a $(KVER)
endif