blob: 381c2727e26216d238b6ab9f857d39bf32351b61 [file] [log] [blame] [edit]
#!/usr/bin/make -f
# -*- makefile -*-
#
# output every command that modifies files on the build system.
# export DH_VERBOSE = 1
PACKAGENAME=excelsior-wlan
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)
KERNELMOD=wlan_mt7668_sdio.ko
LDFLAGS := -z relro
MAKEOPTS := MTK_COMBO_CHIP=MT6632 \
CONFIG_MTK_WIFI_ONLY=m \
CONFIG_MTK_COMBO=m \
CONFIG_MTK_COMBO_WIFI=m \
CONFIG_MTK_COMBO_WIFI_HIF=sdio \
WLAN_CHIP_ID=mt7668 \
-j $(shell nproc)
%:
dh $@
override_dh_auto_clean:
true
override_dh_auto_build:
$(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(KERNELSRC) $(MAKEOPTS) M=$(PWD)
override_dh_auto_install:
install -d $(MODULESDIR)
install -d $(CONNECTIVITYMODULESDIR)
install -g 0 -o 0 $(KERNELMOD) $(CONNECTIVITYMODULESDIR)