summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited 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