summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-01 10:53:48 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-01 10:53:48 +0100
commite16340f2dba2df4e997a0f4f03b197cc814ab9fa (patch)
tree96e1420a2cd023e150189300b843b343736dac0c
parent89e06225358c9b44998107bb55e80963904a30ce (diff)
Add install target in Makefile
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c52d7fe..7efebe0 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,11 @@ endif
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
DEBUG?= -g -ggdb
+PREFIX?= /usr/local
+INSTALL_INC= $(PREFIX)/include/hiredis
+INSTALL_LIB= $(PREFIX)/lib
+INSTALL= cp -a
+
all: ${DYLIBNAME} ${BINS}
# Deps (use make dep to generate this)
@@ -74,6 +79,11 @@ 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)
+
32bit:
@echo ""
@echo "WARNING: if it fails under Linux you probably need to install libc6-dev-i386"