summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-22 09:59:24 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-22 09:59:30 +0200
commit5c205359d9e0f8e03877b2a856473593f0117cf0 (patch)
tree82e6a6bc0a4c0fbd4e914eafbc59686bc5b50637 /Makefile
parentea893c09d369a02a0b544b337d566fa9f981cd2b (diff)
Configurable paths for install target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 48f9667..f739d64 100644
--- a/Makefile
+++ b/Makefile
@@ -39,9 +39,11 @@ endif
CCOPT= $(CFLAGS) $(CCLINK)
DEBUG?= -g -ggdb
-PREFIX?= /usr/local
-INSTALL_INC= $(PREFIX)/include/hiredis
-INSTALL_LIB= $(PREFIX)/lib
+PREFIX?=/usr/local
+INCLUDE_PATH?=include/hiredis
+LIBRARY_PATH?=lib
+INSTALL_INCLUDE_PATH= $(PREFIX)/$(INCLUDE_PATH)
+INSTALL_LIBRARY_PATH= $(PREFIX)/$(LIBRARY_PATH)
INSTALL= cp -a
all: ${DYLIBNAME} ${BINS}
@@ -94,10 +96,10 @@ clean:
dep:
$(CC) -MM *.c
-install: ${DYLIBNAME} ${STLIBNAME}
- mkdir -p $(INSTALL_INC) $(INSTALL_LIB)
- $(INSTALL) hiredis.h async.h adapters $(INSTALL_INC)
- $(INSTALL) ${DYLIBNAME} ${STLIBNAME} $(INSTALL_LIB)
+install: $(DYLIBNAME) $(STLIBNAME)
+ mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
+ $(INSTALL) hiredis.h async.h adapters $(INSTALL_INCLUDE_PATH)
+ $(INSTALL) $(DYLIBNAME) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
32bit:
@echo ""