diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-03-12 10:19:29 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-03-12 10:19:29 +0100 |
commit | d59b4d2f4377613719785c2685ceff0a8a0f55ab (patch) | |
tree | 3b4e9a129f1250d463e50b109a55a0ae4ec32449 | |
parent | 501dd5505d950d89f5b4d0ad8249c38c36a102da (diff) |
add makefile
-rw-r--r-- | makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..d688487 --- /dev/null +++ b/makefile @@ -0,0 +1,25 @@ +.POSIX: +.PHONY: FORCE + +NAME = dppt +PREFIX = /usr/local +MANPREFIX = $(PREFIX)/share/man + +CORE_PATH = $(DESTDIR)$(PREFIX)/lib/$(NAME)-core + +all: FORCE + +install: FORCE + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp $(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) + sed 's#\(\<core_path\>=\).*#\1"$(CORE_PATH)"#' -i $(DESTDIR)$(PREFIX)/bin/$(NAME) + mkdir -p $(CORE_PATH) + cp -r core/. $(CORE_PATH)/ + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + cp -r man/$(NAME).1 $(DESTDIR)$(MANPREFIX)/man1/ + +uninstall: FORCE + rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME) + rm -f $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1 + rm -rf $(CORE_PATH) + |