From: lichtstrahlreiter Date: Thu, 29 Nov 2018 08:51:46 +0000 (+0000) Subject: Add install target (#3) X-Git-Url: https://git.sur5r.net/?p=sysbacklight;a=commitdiff_plain;h=54321daa94983232d03634410ac1aadca7c4ec81 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. --- 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