From 54321daa94983232d03634410ac1aadca7c4ec81 Mon Sep 17 00:00:00 2001 From: lichtstrahlreiter Date: Thu, 29 Nov 2018 08:51:46 +0000 Subject: [PATCH] Add install target (#3) Add install target This target installs sysbacklight for all users with setuid as the README suggests, supporting 'PREFIX' and 'DESTDIR' with 'PREFIX = /usr/local' as default. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 3596973..9b582ef 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CFLAGS?=$(shell pkg-config --cflags libsysfs) -Wall -std=c99 LDFLAGS?=$(shell pkg-config --libs libsysfs) +PREFIX ?= /usr/local all: sysbacklight @@ -9,6 +10,11 @@ sysbacklight: sysbacklight.o %.o: %.c $(CC) -c -o $@ $(CFLAGS) $< +install: + install -m 4755 sysbacklight $(DESTDIR)$(PREFIX)/bin + + + clean: rm -f sysbacklight sysbacklight.o -- 2.39.2