Commits

Yuya Nishihara committed d2bc4f9

makefile: add rule to install executable

  • Participants
  • Parent commits d1945d4

Comments (0)

Files changed (2)

 
 clean:
 	rm -f $(objects) vcprompt
+
+DESTDIR =
+PREFIX = /usr/local
+.PHONY: install
+install: vcprompt
+	install -d $(DESTDIR)$(PREFIX)/bin
+	install -m 755 -t $(DESTDIR)$(PREFIX)/bin vcprompt
 
 To install it:
 
-  cp -p vcprompt ~/bin
+  make install PREFIX=$HOME
 
 To use it with bash, just call it in PS1: