Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c0c5aa
commit 4f73396
Showing
2 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
modname := bbswitch | ||
DKMS := dkms | ||
modver := $(shell awk -F'"' '/MODULE_VERSION/{print $$2}' < bbswitch.c) | ||
|
||
# directory in which generated files are stored | ||
DKMS_DEST := /usr/src/$(modname)-$(modver) | ||
|
||
all: install | ||
|
||
src_install: | ||
mkdir -p '$(DKMS_DEST)' | ||
cp Makefile bbswitch.c '$(DKMS_DEST)' | ||
sed 's/#MODULE_VERSION#/$(modver)/' dkms/dkms.conf > '$(DKMS_DEST)/dkms.conf' | ||
|
||
build: src_install | ||
$(DKMS) build 'bbswitch/$(modver)' | ||
|
||
install: build | ||
$(DKMS) install 'bbswitch/$(modver)' | ||
|
||
uninstall: | ||
$(DKMS) remove bbswitch/$(modver) --all | ||
|
||
.PHONY: all src_install build install uninstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters