summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVille Hakulinen <ville.hakulinen@gmail.com>2018-12-12 22:48:22 +0200
committerVille Hakulinen <ville.hakulinen@gmail.com>2018-12-12 22:48:22 +0200
commit7dd93119757e52aef4b5c074afdb9b17f4aafb8c (patch)
treeb2e085f8c2b222362e2bfc97f7060e953734a80c /Makefile
parentf65c656615cd83a6897e3dffb6d67ae78a2df5c7 (diff)
Make gnvim installable
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4c9d1eb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+ifeq ($(PREFIX),)
+ PREFIX := /usr/local
+endif
+
+build:
+ cargo build --release
+
+install:
+ install -v -d "$(DESTDIR)$(PREFIX)/bin"
+ install -v -t "$(DESTDIR)$(PREFIX)/bin" ./target/release/gnvim
+ install -v -d "$(DESTDIR)$(PREFIX)/share/gnvim"
+ cp -r ./runtime "$(DESTDIR)$(PREFIX)/share/gnvim"
+
+uninstall:
+ rm "$(DESTDIR)$(PREFIX)/bin/gnvim"
+ rm "$(DESTDIR)$(PREFIX)/share/gnvim"