summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f1f8622..cd8b97d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,10 @@
-
+# vim: tabstop=4 shiftwidth=4 noexpandtab
TARGET_EXEC := build/xbot
+PREFIX=/usr
+INSTALL=install
+INSTALL_PROGRAM=$(INSTALL) -m 755
+bindir=$(DESTDIR)$(PREFIX)/bin
SRCS := $(wildcard src/*.c)
OBJS := $(patsubst src/%.c, build/%.o, $(SRCS))
@@ -16,7 +20,13 @@ build/%.o: src/%.c
mkdir -p build
$(CC) -c $< -o $@
-.PHONY: clean
+install: all
+ $(INSTALL_PROGRAM) $(TARGET_EXEC) $(bindir)/xbot
+
+uninstall:
+ rm -f $(bindir)/xbot
+
+.PHONY: clean uninstall
clean:
rm -r build