aboutsummaryrefslogtreecommitdiff
path: root/dist/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-12-13 15:12:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-12-13 15:12:15 +0200
commitbacc1bb9b8c07fbfc7996d48aae70cc861c9b43f (patch)
treeb4237cb45616a8388e2f48847aab714884e6f19f /dist/makefile
parent9a8080a5fbe216f79245d0a90cc725a56381a4b5 (diff)
Add install target to the dist GNU makefiles
Diffstat (limited to 'dist/makefile')
-rw-r--r--dist/makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/dist/makefile b/dist/makefile
index 6a82f3b..3f7ab9a 100644
--- a/dist/makefile
+++ b/dist/makefile
@@ -1,4 +1,8 @@
+ifneq ($(MAKECMDGOALS),install)
dirs := libxsde examples
+else
+dirs := libxsde
+endif
.PHONY: all $(dirs)
all: $(dirs)
@@ -11,3 +15,16 @@ $(dirs):
makefile: ;
% :: $(dirs) ;
+
+# Install.
+#
+install_prefix := /usr/local
+install_bin := $(install_prefix)/bin
+install_man := $(install_prefix)/man
+
+.PHONY: install
+install:
+ ./install-sh -d -m 755 $(install_bin)
+ ./install-sh -m 755 bin/xsde $(install_bin)/xsde
+ ./install-sh -d -m 755 $(install_man)/man1
+ ./install-sh -m 644 documentation/xsde.1 $(install_man)/man1/xsde.1