blob: f325f0099df14abf5af1208e210f4d96f02b58ae [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.4.22-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=$(DEB_TARGET_ARCH) CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- -C $(KERNELSRC) M=$(PWD) modules
override_dh_auto_install:
install -d $(MODULESDIR)
install -d $(CONNECTIVITYMODULESDIR)
install -g 0 -o 0 $(KERNELMOD) $(CONNECTIVITYMODULESDIR)