summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSlavey Karadzhov <slavey.karadzhov@zend.com>2014-10-27 15:53:28 +0100
committerSlavey Karadzhov <slavey.karadzhov@zend.com>2014-10-27 15:53:28 +0100
commit5b5d94cf0bb7cacf2e3d5e3dbc95feff418420aa (patch)
tree9857adcf73822996337a1a39d384fc56e659503d /Makefile
parente5b5f1a5d46ead5ed610c23363d8922e0404f715 (diff)
Respect the CXX and AR env variables.
One advantage of this small change is that during cross-compilation you do not need to adjust the Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d2fcef3..9cc820f 100644
--- a/Makefile
+++ b/Makefile
@@ -71,10 +71,19 @@ HHVM_STATIC_LIBRARY = libhhvmcpp.a
# library file. By default, g++ (the GNU C++ compiler) is used for both.
#
-COMPILER = g++
-LINKER = g++
-ARCHIVER = ar rcs
-
+ifdef CXX
+ COMPILER = ${CXX}
+ LINKER = ${CXX}
+else
+ COMPILER = g++
+ LINKER = g++
+endif
+
+ifdef AR
+ ARCHIVER = ${AR} rcs
+else
+ ARCHIVER = ar rcs
+endif
#
# Compiler flags