2012-09-13 16:00:46 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.if !defined(COMPILER_TYPE)
|
2012-11-05 23:05:14 +00:00
|
|
|
. if ${CC:T:Mgcc*}
|
2012-09-13 16:00:46 +00:00
|
|
|
COMPILER_TYPE:= gcc
|
2012-11-05 23:05:14 +00:00
|
|
|
. elif ${CC:T:Mclang}
|
2012-09-13 16:00:46 +00:00
|
|
|
COMPILER_TYPE:= clang
|
|
|
|
. else
|
|
|
|
_COMPILER_VERSION!= ${CC} --version
|
2012-11-05 23:05:14 +00:00
|
|
|
. if ${_COMPILER_VERSION:Mgcc}
|
2012-09-13 16:00:46 +00:00
|
|
|
COMPILER_TYPE:= gcc
|
2012-11-05 23:05:14 +00:00
|
|
|
. elif ${_COMPILER_VERSION:M\(GCC\)}
|
2012-09-13 16:00:46 +00:00
|
|
|
COMPILER_TYPE:= gcc
|
2012-11-05 23:05:14 +00:00
|
|
|
. elif ${_COMPILER_VERSION:Mclang}
|
2012-09-13 16:00:46 +00:00
|
|
|
COMPILER_TYPE:= clang
|
|
|
|
. else
|
2013-03-01 03:25:43 +00:00
|
|
|
.error Unable to determine compiler type for ${CC}. Consider setting COMPILER_TYPE.
|
2012-09-13 16:00:46 +00:00
|
|
|
. endif
|
|
|
|
. undef _COMPILER_VERSION
|
|
|
|
. endif
|
|
|
|
.endif
|
2012-09-26 17:25:15 +00:00
|
|
|
|
|
|
|
.if ${COMPILER_TYPE} == "clang"
|
|
|
|
COMPILER_FEATURES= c++11
|
|
|
|
.else
|
|
|
|
COMPILER_FEATURES=
|
|
|
|
.endif
|