diff options
-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 |