summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-04-04 18:25:00 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-04-04 18:25:00 +0200
commit04fd5f0e48a0118e91c20c1725ec9f69c8f52b1e (patch)
treeaa44f5604ac10e44384e6bc94d591b7cd3102b75
parent3713529f5a1b05c56526a55610ef3cf5dccb585e (diff)
Makefile: add PREFIX support
This allows users to easily install to /usr/local, instead of forcing them to change 3 variables. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 238de2b..e10b011 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
VERSION:=$(shell git describe --dirty | sed 's/^v//; s/-/./g')
-MANDIR=/usr/share/man
-BINDIR=/usr/bin
-LIBDIR=/usr/lib
+PREFIX=/usr
+MANDIR=$(PREFIX)/share/man
+BINDIR=$(PREFIX)/bin
+LIBDIR=$(PREFIX)/lib
MY_LIBDIR=$(LIBDIR)/fb-client
CC=cc
CFLAGS:=-std=c99 -O2 -Wall -Wextra -pedantic $(CFLAGS)