aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorOndrej Čerman2019-09-29 11:43:26 +0200
committerOndrej Čerman2019-09-29 11:43:26 +0200
commiteb45c2d2a118bd7d8ba7390202a4f8d4761da42e (patch)
tree0b2de9031f56214cfa9dbcc5e4f1bd805dd26365 /Makefile
parent966ae5b1b504b683328be469f4d13800923857c9 (diff)
Added option to swap CORE and SOC
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 92d8a1b..f9efb8c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
-TARGET := $(shell uname -r)
-DKMS_ROOT_PATH := /usr/src/zenpower-0.1.2
+VERSION := 0.1.3
+TARGET := $(shell uname -r)
+DKMS_ROOT_PATH := /usr/src/zenpower-0.1.3
ifneq ("","$(wildcard /usr/src/linux-headers-$(TARGET)/*)")
# Ubuntu
@@ -16,7 +17,7 @@ endif
obj-m := $(patsubst %,%.o,zenpower)
obj-ko := $(patsubst %,%.ko,zenpower)
-.PHONY: all modules clean dkms-install dkms-uninstall
+.PHONY: all modules clean dkms-install dkms-install-swapped dkms-uninstall
all: modules
@@ -31,10 +32,14 @@ dkms-install:
cp $(CURDIR)/dkms.conf $(DKMS_ROOT_PATH)
cp $(CURDIR)/Makefile $(DKMS_ROOT_PATH)
cp $(CURDIR)/zenpower.c $(DKMS_ROOT_PATH)
- dkms add zenpower/0.1.2
- dkms build zenpower/0.1.2
- dkms install zenpower/0.1.2
+
+ sed -e "s/@CFLGS@/${MCFLAGS}/" \
+ -i $(DKMS_ROOT_PATH)/dkms.conf
+
+ dkms add zenpower/$(VERSION)
+ dkms build zenpower/$(VERSION)
+ dkms install zenpower/$(VERSION)
dkms-uninstall:
- dkms remove zenpower/0.1.2 --all
+ dkms remove zenpower/$(VERSION) --all
rm -rf $(DKMS_ROOT_PATH)