blob: 87f9025837730ba3b7aa9427be93c1a1b428cdfb [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.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 $@
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)