2) If OpenBLAS cannot find Fortran compiler, it will only build BLAS (without LAPACK).tags/v0.2.15^2
@@ -133,7 +133,7 @@ ifeq ($(CORE), UNKOWN) | |||||
$(error OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail.) | $(error OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail.) | ||||
endif | endif | ||||
ifeq ($(NOFORTRAN), 1) | ifeq ($(NOFORTRAN), 1) | ||||
$(error OpenBLAS: Detecting fortran compiler failed. Please install fortran compiler, e.g. gfortran, ifort, openf90.) | |||||
$(info OpenBLAS: Detecting fortran compiler failed. Cannot compile LAPACK. Only compile BLAS.) | |||||
endif | endif | ||||
ifeq ($(NO_STATIC), 1) | ifeq ($(NO_STATIC), 1) | ||||
ifeq ($(NO_SHARED), 1) | ifeq ($(NO_SHARED), 1) | ||||
@@ -202,6 +202,12 @@ DLLWRAP = $(CROSS_SUFFIX)dllwrap | |||||
OBJCOPY = $(CROSS_SUFFIX)objcopy | OBJCOPY = $(CROSS_SUFFIX)objcopy | ||||
OBJCONV = $(CROSS_SUFFIX)objconv | OBJCONV = $(CROSS_SUFFIX)objconv | ||||
# For detect fortran failed, only build BLAS. | |||||
ifeq ($(NOFORTRAN), 1) | |||||
NO_LAPACK = 1 | |||||
endif | |||||
# | # | ||||
# OS dependent settings | # OS dependent settings | ||||
# | # | ||||
@@ -100,8 +100,8 @@ else | |||||
$(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).renamed | $(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).renamed | ||||
$(LIBDYNNAME) : ../$(LIBNAME).renamed osx.def | $(LIBDYNNAME) : ../$(LIBNAME).renamed osx.def | ||||
endif | endif | ||||
ifeq ($(NOFORTRAN), 2) | |||||
#only build cblas without Fortran | |||||
ifeq ($(NOFORTRAN), $(filter $(NOFORTRAN),1 2)) | |||||
#only build without Fortran | |||||
$(CC) $(CFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) | $(CC) $(CFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) | ||||
else | else | ||||
$(FC) $(FFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) | $(FC) $(FFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) | ||||
@@ -3,11 +3,11 @@ | |||||
# | # | ||||
# 1. Not specified | # 1. Not specified | ||||
# 1.1 Automatically detect, then check compiler | # 1.1 Automatically detect, then check compiler | ||||
# 1.2 If no fortran compiler is detected, g77 is default with NOFORTRAN definition | |||||
# 1.2 If no fortran compiler is detected, gfortran is default with NOFORTRAN definition | |||||
# 2. Specified | # 2. Specified | ||||
# 2.1 If path is correct, check compiler | # 2.1 If path is correct, check compiler | ||||
# 2.2 If path is not correct, but still valid compiler name, force setting | # 2.2 If path is not correct, but still valid compiler name, force setting | ||||
# 2.2.2 Path is not correct, invalid compiler name, then g77 is default with NOFORTRAN definition | |||||
# 2.2.2 Path is not correct, invalid compiler name, then gfortran is default with NOFORTRAN definition | |||||
# | # | ||||
$makefile = shift(@ARGV); | $makefile = shift(@ARGV); | ||||
@@ -25,7 +25,7 @@ $compiler = "" if $compiler eq "f77"; | |||||
if ($compiler eq "") { | if ($compiler eq "") { | ||||
@lists = ("g77", "g95", "gfortran", "frt", "fort", "openf90", "openf95", | |||||
@lists = ("g95", "gfortran", "frt", "fort", "openf90", "openf95", | |||||
"sunf77", "sunf90", "sunf95", | "sunf77", "sunf90", "sunf95", | ||||
"xlf95", "xlf90", "xlf", | "xlf95", "xlf90", "xlf", | ||||
"ppuf77", "ppuf95", "ppuf90", "ppuxlf", | "ppuf77", "ppuf95", "ppuf90", "ppuxlf", | ||||
@@ -49,8 +49,8 @@ OUTER: | |||||
if ($compiler eq "") { | if ($compiler eq "") { | ||||
$nofortran = 1; | $nofortran = 1; | ||||
$compiler = "g77"; | |||||
$vendor = G77; | |||||
$compiler = "gfortran"; | |||||
$vendor = GFORTRAN; | |||||
$bu = "_"; | $bu = "_"; | ||||
} else { | } else { | ||||
@@ -197,8 +197,8 @@ if ($compiler eq "") { | |||||
if ($vendor eq "") { | if ($vendor eq "") { | ||||
$nofortran = 1; | $nofortran = 1; | ||||
$compiler = "g77"; | |||||
$vendor = G77; | |||||
$compiler = "gfortran"; | |||||
$vendor = GFORTRAN; | |||||
$bu = "_"; | $bu = "_"; | ||||
$openmp = ""; | $openmp = ""; | ||||
} | } | ||||