Codebase list ddcci-driver-linux / HEAD Makefile.dkms
HEAD

Tree @HEAD (Download .tar.gz)

Makefile.dkms @HEADraw · history · blame

#!/usr/bin/make -f
# (c) 2015 Christoph Grenz <christophg@grenz-bonn.de>
# This file is part of ddcci-driver-linux.
#
# ddcci-driver-linux is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# ddcci-driver-linux is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ddcci-driver-linux.  If not, see <http://www.gnu.org/licenses/>.

PACKAGE_NAME := ddcci
PACKAGE_VERSION := 0.4.3

install:
	dkms add .
	dkms install $(PACKAGE_NAME)/$(PACKAGE_VERSION)

uninstall:
	dkms uninstall $(PACKAGE_NAME)/$(PACKAGE_VERSION) || true
	dkms remove $(PACKAGE_NAME)/$(PACKAGE_VERSION) --all  || true
	rm -r /usr/src/$(PACKAGE_NAME)-$(PACKAGE_VERSION) || true

load:
	@test -n "$$(dkms status ddcci/0.4.3)" || { echo 'Please run `make -f Makefile.dkms install` first.'; false; }
	modprobe ddcci

unload:
	rmmod ddcci-backlight ddcci

.PHONY: install uninstall load unload