blob: 6d6a3183143927d055b6ee549399723d3a0ae412 [file] [log] [blame]
#!/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.106-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 $@
override_dh_auto_clean:
true
override_dh_auto_build:
echo $(SDIO_CFILES)
echo $(btmtksdio-objs)
find .
pwd
$(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)