--- Makefile.orig	2012-10-21 17:15:03.000000000 +0400
+++ Makefile	2013-04-23 19:42:13.789582841 +0400
@@ -9,13 +9,13 @@
 # CCPCRE=-I/usr/local/include -DUSEPCRE
 # LDPCRE=-L/usr/local/lib -lpcre
 
-CXX=g++
-CXXFLAGS=-Wall -O3 -g -pthread  # can override
-RE2_CXXFLAGS=-Wno-sign-compare -c -I. $(CCPCRE)  # required
-LDFLAGS=-pthread
-AR=ar
+CXX?=g++
+CXXFLAGS?=-Wall -O3 -g -pthread  # can override
+RE2_CXXFLAGS?=-Wno-sign-compare -c -I. $(CCPCRE)  # required
+LDFLAGS?=-pthread
+AR?=ar
 ARFLAGS=rsc
-NM=nm
+NM?=nm
 NMFLAGS=-p
 
 # Variables mandated by GNU, the arbiter of all good taste on the internet.
@@ -25,7 +25,7 @@
 bindir=$(exec_prefix)/bin
 includedir=$(prefix)/include
 libdir=$(exec_prefix)/lib
-INSTALL=install
+INSTALL?=install
 INSTALL_PROGRAM=$(INSTALL)
 INSTALL_DATA=$(INSTALL) -m 644
 
