diff options
author | xengineering <mail2xengineering@protonmail.com> | 2021-01-30 14:30:45 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2021-01-30 14:30:45 +0100 |
commit | b1918078d913193544e0fdc933457d2a71836447 (patch) | |
tree | d7fc36387a4c6777388fd08b282e81faf1532c43 | |
parent | 67d373164190404fe0995bdadb81715cb32fe15b (diff) | |
download | xbot-b1918078d913193544e0fdc933457d2a71836447.tar xbot-b1918078d913193544e0fdc933457d2a71836447.tar.zst xbot-b1918078d913193544e0fdc933457d2a71836447.zip |
Enable Installation via Make
-rw-r--r-- | Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 |