summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2015-09-30 03:16:36 (GMT)
committerTony Theodore <tonyt@logyst.com>2015-09-30 03:16:47 (GMT)
commit3db411ccac01312450bdf12aa50fe66454524be1 (patch)
tree9da26219139c19fdabccfce84721d9ee76fb7b80 /Makefile
parentbf1d916a44a6c202c232890efa5a9dbc5c9cffbf (diff)
downloadmxe-3db411ccac01312450bdf12aa50fe66454524be1.zip
mxe-3db411ccac01312450bdf12aa50fe66454524be1.tar.gz
mxe-3db411ccac01312450bdf12aa50fe66454524be1.tar.bz2
Makefile: add CC/CXX_BUILD portability variables
fixes #900
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index be5b4a1..d92c750 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,8 @@ PKG_CDN := d1yihgixbnrglp.cloudfront.net
PWD := $(shell pwd)
SHELL := bash
+CC_BUILD := $(shell (gcc --help >/dev/null 2>&1 && echo gcc) || (clang --help >/dev/null 2>&1 && echo clang))
+CXX_BUILD := $(shell (g++ --help >/dev/null 2>&1 && echo g++) || (clang++ --help >/dev/null 2>&1 && echo clang++))
DATE := $(shell gdate --help >/dev/null 2>&1 && echo g)date
INSTALL := $(shell ginstall --help >/dev/null 2>&1 && echo g)install
LIBTOOL := $(shell glibtool --help >/dev/null 2>&1 && echo g)libtool
@@ -35,9 +37,9 @@ WGET := wget --no-check-certificate \
$(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p')
REQUIREMENTS := autoconf automake autopoint bash bison bzip2 cmake flex \
- gcc g++ gperf intltoolize $(LIBTOOL) $(LIBTOOLIZE) \
- $(MAKE) openssl $(PATCH) $(PERL) python ruby scons \
- $(SED) $(SORT) unzip wget xz 7za
+ $(CC_BUILD) $(CXX_BUILD) gperf intltoolize $(LIBTOOL) \
+ $(LIBTOOLIZE) $(MAKE) openssl $(PATCH) $(PERL) python \
+ ruby scons $(SED) $(SORT) unzip wget xz 7za
PREFIX := $(PWD)/usr
LOG_DIR := $(PWD)/log