summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2024-03-04 19:01:37 -0800
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2024-03-04 19:01:37 -0800
commitd30e49d03bb517592e75ab27c16f37c66dbb960f (patch)
treecb97718860246d86ec15deecfbade76b29f330d3
parent10b52c0595dfbde3e504a34b14023620237b39f1 (diff)
downloadxkbdlock-d30e49d03bb517592e75ab27c16f37c66dbb960f.tar.gz
xkbdlock-d30e49d03bb517592e75ab27c16f37c66dbb960f.tar.xz
add install/uninstall targets to Makefile
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8278faf..de675f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+PREFIX ?= /usr/local
+
CFLAGS += -O2 -Wall -Wextra -Wpedantic
LDFLAGS += -lX11
@@ -13,4 +15,10 @@ $(TARGET): $(OBJ)
clean:
rm -f $(TARGET) $(OBJ)
-.PHONY: all clean
+install: all
+ install -Dt $(DESTDIR)$(PREFIX)/bin $(TARGET)
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/$(TARGET)
+
+.PHONY: all clean install uninstall