From 4a6d10f9434742334d62d3c913578ea2ae0a3d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Bremv=C3=A5g?= Date: Sat, 10 Oct 2020 01:29:24 +0200 Subject: [PATCH] Makefile: Simplify DKMS install/remove --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 27daced..55bb417 100755 --- a/Makefile +++ b/Makefile @@ -2297,6 +2297,20 @@ config_r: @echo "make config" /bin/bash script/Configure script/config.in +DRIVER_VERSION = $(shell grep "#define DRIVERVERSION" include/rtw_version.h | awk '{print $$3}' | tr -d v\") + +dkms_install: + mkdir -p /usr/src/8812au-$(DRIVER_VERSION) + cp -r * /usr/src/8812au-$(DRIVER_VERSION) + dkms add -m 8812au -v $(DRIVER_VERSION) + dkms build -m 8812au -v $(DRIVER_VERSION) + dkms install -m 8812au -v $(DRIVER_VERSION) + dkms status + +dkms_remove: + dkms remove 8812au/$(DRIVER_VERSION) --all + rm -rf /usr/src/8812au-$(DRIVER_VERSION) + .PHONY: modules clean clean: