You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
580 B
Makefile
25 lines
580 B
Makefile
13 years ago
|
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
|