aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile25
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)
+