--- src/Makefile	2009-10-01 01:08:54.000000000 +0200
+++ patches/Makefile	2012-03-17 13:57:33.026315142 +0100
@@ -21,11 +21,11 @@
 #
 #    Michael Stoll, September 21, 2009
 
-CC = gcc
+CC ?= gcc
 RM = rm -f
 INSTALL = cp
 
-INSTALL_DIR = /usr/local
+INSTALL_DIR ?= /usr/local
 
 DISTFILES = Makefile ratpoints.h rp-private.h primes.h \
             gen_find_points_h.c gen_init_sieve_h.c \
@@ -47,14 +47,14 @@
 	diff -q testbase rptest.out
 
 install-bin: ratpoints
-	${INSTALL} ratpoints ${INSTALL_DIR}/bin/
-	chmod 755 ${INSTALL_DIR}/bin/ratpoints
+	${INSTALL} ratpoints "${INSTALL_DIR}/bin/"
+	chmod 755 "${INSTALL_DIR}/bin/ratpoints"
 
 install-lib: ratpoints.h libratpoints.a
-	${INSTALL} ratpoints.h ${INSTALL_DIR}/include/
-	chmod 644 ${INSTALL_DIR}/include/ratpoints.h
-	${INSTALL} libratpoints.a ${INSTALL_DIR}/lib/
-	chmod 644 ${INSTALL_DIR}/lib/libratpoints.a
+	${INSTALL} ratpoints.h "${INSTALL_DIR}/include/"
+	chmod 644 "${INSTALL_DIR}/include/ratpoints.h"
+	${INSTALL} libratpoints.a "${INSTALL_DIR}/lib/"
+	chmod 644 "${INSTALL_DIR}/lib/libratpoints.a"
 
 install: install-bin install-lib
 
