aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--README.md13
2 files changed, 23 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 06a9ca1..f6f512d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,14 @@
+PREFIX = /usr/local
+
+CFLAGS = -Werror -Wall
LDFLAGS = -lreadline -ltermcap
repl: repl.c
+
+install: repl
+ cp repl ${PREFIX}/bin/repl
+ cp repl.1 ${PREFIX}/man/man1/repl.1
+
+uninstall:
+ rm ${PREFIX}/bin/repl
+ rm ${PREFIX}/man/man1/repl.1
diff --git a/README.md b/README.md
index e8013da..7e4235f 100644
--- a/README.md
+++ b/README.md
@@ -3,10 +3,21 @@ a simple and readable C program that requires GNU readline.
### Installation
+The following commands install `repl` in `/usr/local/bin` and
+`repl.1`, its man page, in `/usr/local/man`:
+
$ make
- $ mv repl /usr/bin/repl
+ $ make install
+
+If you want to install it somewhere different from `/usr/local`,
+edit the Makefile and modify the `PREFIX` variable.
+
+To uninstall both binary and man page, run `make uninstall`.
### Usage
$ repl git
+ git > status
+ On branch master
+ Your branch is up to date with 'origin/master'.
git >