Permalink
Browse files

Updated Makefile to match the one from tmux better

 - Overwrite compiler (specify CC)
 - Overwrite installdir (specify PREFIX)
  • Loading branch information...
1 parent 74f694a commit 1a5350055b787585598db345d10267ba7b883e69 @gvangool gvangool committed Apr 28, 2011
Showing with 11 additions and 6 deletions.
  1. +11 −6 Makefile
View
@@ -1,8 +1,12 @@
-CFLAGS=-Os
-CC=gcc
+CC?= gcc
+CFLAGS+=-Os
STRIP=strip
-INSTALL_DIR=/home/$(USER)/bin
+PREFIX?= /usr/local
+INSTALL?= install
+INSTALLDIR= ${INSTALL} -d
+INSTALLBIN= ${INSTALL} -m 555
+INSTALLMAN= ${INSTALL} -m 444
.PHONY: clean all
@@ -26,6 +30,7 @@ clean:
rm -f tmux-mem
install: all
- install -D tmux-cpu-freq $(INSTALL_DIR)/tmux-cpu-freq
- install -D tmux-ping $(INSTALL_DIR)/tmux-ping
- install -D tmux-mem $(INSTALL_DIR)/tmux-mem
+ ${INSTALLDIR} ${DESTDIR}${PREFIX}/bin
+ ${INSTALLBIN} tmux-cpu-freq ${DESTDIR}${PREFIX}/bin/
+ ${INSTALLBIN} tmux-ping ${DESTDIR}${PREFIX}/bin/
+ ${INSTALLBIN} tmux-mem ${DESTDIR}${PREFIX}/bin/

0 comments on commit 1a53500

Please sign in to comment.