SUFFIX = obj
PSUFFIX = pobj
LIBSUFFIX = a
+
+ifeq ($(C_COMPILER), CLANG)
+CCOMMON_OPT += -DMS_ABI
+endif
+
ifeq ($(C_COMPILER), GCC)
#Test for supporting MS_ABI
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
FCOMMON_OPT += -m128bit-long-double
endif
+ifeq ($(C_COMPILER), CLANG)
+EXPRECISION = 1
+CCOMMON_OPT += -DEXPRECISION
+FCOMMON_OPT += -m128bit-long-double
+endif
endif
endif
endif
CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
FCOMMON_OPT += -m128bit-long-double
endif
+ifeq ($(C_COMPILER), CLANG)
+EXPRECISION = 1
+CCOMMON_OPT += -DEXPRECISION
+FCOMMON_OPT += -m128bit-long-double
+endif
endif
endif
endif
CCOMMON_OPT += -fopenmp
endif
+ifeq ($(C_COMPILER), CLANG)
+$(error OpenBLAS: Clang didn't support OpenMP yet.)
+CCOMMON_OPT += -fopenmp
+endif
+
ifeq ($(C_COMPILER), INTEL)
CCOMMON_OPT += -openmp
endif
# C Compiler dependent settings
#
-ifeq ($(C_COMPILER), GCC)
+# ifeq logical or. GCC or CLANG
+# http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
+ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC CLANG))
CCOMMON_OPT += -Wall
COMMON_PROF += -fno-inline
NO_UNINITIALIZED_WARN = -Wno-uninitialized
}
$compiler = "";
+$compiler = CLANG if ($data =~ /COMPILER_CLANG/);
$compiler = PGI if ($data =~ /COMPILER_PGI/);
$compiler = PATHSCALE if ($data =~ /COMPILER_PATHSCALE/);
$compiler = INTEL if ($data =~ /COMPILER_INTEL/);
$openmp = "-mp";
}
+if ($compiler eq "CLANG") {
+ $openmp = "-fopenmp";
+}
+
if ($compiler eq "GCC") {
$openmp = "-fopenmp";
}