From d59b4d2f4377613719785c2685ceff0a8a0f55ab Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 12 Mar 2024 10:19:29 +0100 Subject: add makefile --- makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 makefile (limited to 'makefile') 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#\(\=\).*#\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) + -- cgit v1.2.3