aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2022-05-18 13:32:36 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2022-05-18 13:35:02 -0400
commit4b650772b7d257a95d6f8aceb564aa0bc339e5a0 (patch)
tree7c66d9013ca43f1cfd0c9efdc123e34238d22fe5 /Makefile
parent135d0041bef6cf650303b569f0d0dafad2c57c37 (diff)
Support `make install`HEADv1.0.0master
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b768764..fbcce99 100644
--- a/Makefile
+++ b/Makefile
@@ -13,9 +13,19 @@
# limitations under the License.
CFLAGS = -Wall -O2
+prefix ?= /usr/local
+bindir ?= $(prefix)/bin
+mandir ?= $(prefix)/share/man
.DEFAULT_GOAL := walk
.PHONY: clean
clean:
$(RM) walk
+
+.PHONY: install
+install: sor sor.1 walk walk.1
+ mkdir -p "$(bindir)" "$(mandir)/man1"
+ install -c sor walk "$(bindir)"
+ gzip -9 <sor.1 >"$(mandir)/man1/sor.1.gz"
+ gzip -9 <walk.1 >"$(mandir)/man1/walk.1.gz"