summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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