aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-15 20:07:19 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-15 20:07:59 +1300
commit54561efcb647ddce94ada4d0da6e402aeecb32b6 (patch)
tree5287ee45e5f8684069bd4c51b8b752eee7299676
parentAdd item to TODO (diff)
downloadwtf8-54561efcb647ddce94ada4d0da6e402aeecb32b6.tar.gz
wtf8-54561efcb647ddce94ada4d0da6e402aeecb32b6.zip
Add simple install target
-rw-r--r--Makefile7
-rw-r--r--README.markdown5
2 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7a9ebdd..ee665d7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,15 @@
-.PHONY: all clean
+.PHONY: all install clean
+
+PREFIX = /usr/local
CC = clang
CFLAGS = -std=c99 -Weverything
all : wtf8
+install : wtf8
+ install -m 0755 -- wtf8 $(PREFIX)/bin
+
wtf8 : wtf8.c wtf8.h
$(CC) $(CFLAGS) wtf8.c -o $@
diff --git a/README.markdown b/README.markdown
index 7d24ff9..b529465 100644
--- a/README.markdown
+++ b/README.markdown
@@ -7,10 +7,11 @@ with the characters. Expects a single argument, a string.
$ LANG=C.UTF-8
$ export LANG
$ make
- $ ./wtf8 test
+ $ sudo make install
+ $ wtf8 test
74 65 73 74
t e s t
- $ ./wtf8 tøást
+ $ wtf8 tøást
74 c3 b8 c3 a1 73 74
t ø á s t