Permalink
Browse files

Merged pull request #1 from gvangool/new_makefile.

Updated Makefile to be more like the one from tmux
  • Loading branch information...
2 parents 74f694a + 1a53500 commit 592986f773b8cb92211a9bf4a30144bb0866b1ad @lmartinking 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 592986f

Please sign in to comment.