| #!/usr/bin/make -f |
| # -*- makefile -*- |
| # |
| # output every command that modifies files on the build system. |
| # export DH_VERBOSE = 1 |
| |
| PACKAGENAME=excelsior-bluetooth |
| DESTDIR=$(shell pwd)/debian/$(PACKAGENAME) |
| CURDIR=$(shell pwd) |
| |
| LDFLAGS := -z relro |
| |
| DESTDIR=$(shell pwd)/debian/$(PACKAGENAME) |
| CURDIR=$(shell pwd) |
| KERNELVERSION=4.19.125-mtk |
| MODULESDIR=$(DESTDIR)/lib/modules/$(KERNELVERSION) |
| CONNECTIVITYMODULESDIR=$(MODULESDIR)/kernel/misc/mediatek/connectivity |
| |
| KERNELSRC=/usr/src/linux-headers-$(KERNELVERSION) |
| |
| SDIO_MOD_NAME := btmtksdio |
| SDIO_CFILES := \ |
| btmtk_sdio.c btmtk_main.c |
| $(SDIO_MOD_NAME)-objs := $(SDIO_CFILES:.c=.o) |
| obj-m := $(SDIO_MOD_NAME).o |
| KERNELMOD := $(SDIO_MOD_NAME).ko |
| |
| %: |
| dh $@ --with systemd |
| |
| override_dh_auto_clean: |
| true |
| |
| override_dh_auto_build: |
| echo $(SDIO_CFILES) |
| echo $(btmtksdio-objs) |
| $(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(KERNELSRC) M=$(PWD) modules |
| |
| override_dh_auto_install: |
| install -d $(MODULESDIR) |
| install -d $(CONNECTIVITYMODULESDIR) |
| install -g 0 -o 0 $(KERNELMOD) $(CONNECTIVITYMODULESDIR) |
| install -d $(DESTDIR)/usr/sbin |
| install -g 0 -o 0 debian/excelsior-bluetooth.sh $(DESTDIR)/usr/sbin/excelsior-bluetooth.sh |
| install -g 0 -o 0 debian/excelsior-bluetooth-mac.py $(DESTDIR)/usr/sbin/excelsior-bluetooth-mac.py |
| install -d $(DESTDIR)/etc/modprobe.d |
| install -g 0 -o 0 debian/btmtksdio.conf $(DESTDIR)/etc/modprobe.d/btmtksdio.conf |
| |
| |