Skip to content

Commit 246918c

Browse files
committed
Makefile improvements
1 parent 77091a6 commit 246918c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# This makefile exists to allow for an install target, since it seems
22
# cargo install is too basic to handle installing system services properly.
33

4+
CARGO_FLAGS ?=
45
DESTDIR ?=
56
PREFIX ?= /usr/local
67
BINDIR ?= $(PREFIX)/bin
7-
CONFDIR ?= $(PREFIX)/etc/conf.d
8+
ETCDIR ?= $(PREFIX)/etc
9+
10+
CONFDIR ?= $(ETCDIR)/conf.d
811
SYSTEMDDIR ?= $(PREFIX)/lib/systemd/system
912

1013
PROG := target/release/keyboard-backlightd
@@ -13,7 +16,7 @@ all: $(PROG)
1316

1417
$(PROG):
1518
# Let cargo figure out if a build is needed
16-
cargo build --release
19+
cargo build --release $(CARGO_FLAGS)
1720

1821
etc/keyboard-backlightd.service: etc/keyboard-backlightd.service.in Makefile
1922
sed -e "s#{BINDIR}#$(BINDIR)#" -e "s#{PREFIX}#$(PREFIX)#" $< > $@

0 commit comments

Comments
 (0)