hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e7526ed..c39a8e0 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,9 @@ CPPCHECKFLAGS := --error-exitcode=1 \
TARGET := jafm
SRC := jafm.c
+PREFIX ?= /usr/local
+BINDIR := $(DESTDIR)$(PREFIX)/bin
+
all: $(TARGET)
$(TARGET): $(SRC)
@@ -46,8 +49,15 @@ check:
bear -- make clean debug
cppcheck $(CPPCHECKFLAGS)
+install: $(TARGET)
+ install -d $(BINDIR)
+ install -m 755 $(TARGET) $(BINDIR)/$(TARGET)
+
+uninstall:
+ rm -f $(BINDIR)/$(TARGET)
+
clean:
rm -rf $(TARGET) $(TARGET).dSYM
-.PHONY: all debug check clean
+.PHONY: all debug check install uninstall clean