Index: Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -234,9 +234,9 @@ $(PKGCONFNAME): hiredis.h
 	@echo "Generating $@ for pkgconfig..."
 	@echo prefix=$(PREFIX) > $@
 	@echo exec_prefix=\$${prefix} >> $@
-	@echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
-	@echo includedir=$(PREFIX)/include >> $@
+	@echo libdir=\$${prefix}/$(LIBRARY_PATH) >> $@
+	@echo includedir=\$${prefix}/include >> $@
-	@echo pkgincludedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
+	@echo pkgincludedir=\$${prefix}/$(INCLUDE_PATH) >> $@
 	@echo >> $@
 	@echo Name: hiredis >> $@
 	@echo Description: Minimalistic C client library for Redis. >> $@
@@ -247,9 +247,9 @@ $(SSL_PKGCONFNAME): hiredis_ssl.h
 	@echo "Generating $@ for pkgconfig..."
 	@echo prefix=$(PREFIX) > $@
 	@echo exec_prefix=\$${prefix} >> $@
-	@echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
-	@echo includedir=$(PREFIX)/include >> $@
+	@echo libdir=\$${prefix}/$(LIBRARY_PATH) >> $@
+	@echo includedir=\$${prefix}/include >> $@
-	@echo pkgincludedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
+	@echo pkgincludedir=\$${prefix}/$(INCLUDE_PATH) >> $@
 	@echo >> $@
 	@echo Name: hiredis_ssl >> $@
 	@echo Description: SSL Support for hiredis. >> $@
