aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-02-19 23:52:51 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-02-24 17:39:59 +0100
commitf7286b49bb5fce25c898c143712fe34ad4d7864e (patch)
tree2cb0abb41fb3ebe4f9e01fb5ad1111e3212c0c51
parent2b9fae141fc2129940e0337732a35a3fc1c33455 (diff)
downloadl2md-f7286b49bb5fce25c898c143712fe34ad4d7864e.tar.gz
l2md, Makefile: add PREFIX flag
This allows the user to choose a different installation directory. Signed-off-by: Xinglu Chen <public@yoctocell.xyz> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a189938..a7c9002 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,15 @@
-CFLAGS = -O2 -Wall -Werror
+CFLAGS = -O2 -Wall -Werror
LDFLAGS = -lgit2
+PREFIX ?= /usr/bin
l2md: l2md.o config.o env.o utils.o repo.o mail.o maildir.o pipe.o
$(CC) -o $@ $^ $(LDFLAGS)
install:
- cp l2md /usr/bin/l2md
+ cp l2md $(PREFIX)/l2md
uninstall:
- $(RM) /usr/bin/l2md
+ $(RM) $(PREFIX)/l2md
clean:
$(RM) *.o l2md