Refs #88. Fixed the build bug about LAPACKE C Interface to LAPACKE.

This commit is contained in:
Xianyi Zhang 2012-04-13 23:12:06 +08:00
parent 78914475ae
commit fd2ee0c9e2
7 changed files with 2093 additions and 155 deletions

View File

@ -240,12 +240,20 @@ ifndef NOFORTRAN
-@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc
endif
LAPACKE_CFLAGS = $(CFLAGS)
LAPACKE_LDFLAGS = $(FFLAGS) $(EXTRALIB)
ifeq ($(F_COMPILER), INTEL)
LAPACKE_LDFLAGS += -nofor-main
endif
ifdef INTERFACE64
LAPACKE_CFLAGS += -DHAVE_LAPACK_CONFIG_H -DLAPACK_ILP64
endif
$(NETLIB_LAPACK_DIR)/lapacke/make.inc :
ifndef NOFORTRAN
-@echo "CC = $(CC)" > $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "CFLAGS = $(CFLAGS)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "CFLAGS = $(LAPACKE_CFLAGS)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "LINKER = $(FC)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "LDFLAGS = $(FFLAGS) $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "LDFLAGS = $(LAPACKE_LDFLAGS)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "LAPACKE = ../../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "LIBS = $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
-@echo "ARCH = $(AR)" >> $(NETLIB_LAPACK_DIR)/lapacke/make.inc
@ -259,6 +267,7 @@ ifndef NO_LAPACK
@if test `$(MD5SUM) lapack-3.4.0.tgz | $(AWK) '{print $$1}'` = 02d5706ec03ba885fc246e5fa10d8c70; then \
echo $(TAR) zxf $< ;\
$(TAR) zxf $< && (cd $(NETLIB_LAPACK_DIR); $(PATCH) -p1 < ../patch.for_lapack-3.4.0) ;\
rm -f $(NETLIB_LAPACK_DIR)/lapacke/make.inc ;\
else \
rm -rf $(NETLIB_LAPACK_DIR) ;\
echo " Cannot download lapack-3.4.0.tgz or the MD5 check sum is wrong (Please use orignal)."; \

View File

@ -37,9 +37,9 @@ install : lib.grd
ifndef NO_LAPACKE
@echo Copying LAPACKE header files to $(OPENBLAS_LIBRARY_DIR)
@cp $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke.h $(OPENBLAS_INCLUDE_DIR)/lapacke.h
@cp $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_config.h $(OPENBLAS_INCLUDE_DIR)/lapacke_config.h
@cp $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_utils.h $(OPENBLAS_INCLUDE_DIR)/lapacke_utils.h
@-cp $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke.h $(OPENBLAS_INCLUDE_DIR)/lapacke.h
@-cp $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_config.h $(OPENBLAS_INCLUDE_DIR)/lapacke_config.h
@-cp $(NETLIB_LAPACK_DIR)/lapacke/include/lapacke_utils.h $(OPENBLAS_INCLUDE_DIR)/lapacke_utils.h
endif
#for install static library

View File

@ -48,7 +48,8 @@ VERSION = 0.1.0
# If you don't need CBLAS interface, please comment it in.
# NO_CBLAS = 1
# If you don't need LAPACK, please comment it in.
# If you don't need LAPACK, please comment it in.
# If you set NO_LAPACK=1, the library automatically sets NO_LAPACKE=1.
# NO_LAPACK = 1
# If you don't need LAPACKE (C Interface to LAPACK), please comment it in.

View File

@ -538,6 +538,8 @@ endif
ifeq ($(NO_LAPACK), 1)
CCOMMON_OPT += -DNO_LAPACK
#Disable LAPACK C interface
NO_LAPACKE = 1
endif
ifeq ($(NO_LAPACKE), 1)

View File

@ -10,6 +10,14 @@ ifndef NO_CBLAS
NO_CBLAS = 0
endif
ifndef NO_LAPACK
NO_LAPACK = 0
endif
ifndef NO_LAPACKE
NO_LAPACKE = 0
endif
ifeq ($(OSNAME), WINNT)
ifeq ($(F_COMPILER), GFORTRAN)
EXTRALIB += -lgfortran

View File

@ -332,8 +332,14 @@
zbbcsd, zlapmr, zunbdb, zuncsd,
zgeqrt, zgeqrt2, zgeqrt3, zgemqrt,
ztpqrt, ztpqrt2, ztpmqrt, ztprfb,
);
@lapack_extendedprecision_objs = (
zposvxx, clagge, clatms, chesvxx, cposvxx, cgesvxx, ssyrfssx, csyrfsx,
dlagsy, dsysvxx, sporfsx, slatms, zlatms, zherfsx, csysvxx,
);
@lapackeobjs = (
lapack_make_complex_double,
lapack_make_complex_float,
@ -2459,7 +2465,7 @@ if ($ARGV[1] eq "ia64"){ @underscore_objs = (@underscore_objs, @gemm3mobjs); };
if ($ARGV[1] eq "MIPS"){ @underscore_objs = (@underscore_objs, @gemm3mobjs); };
if ($ARGV[6] == 1) {
#NO_LAPACK=1
#NO_LAPACKE=1
@no_underscore_objs = (@cblasobjs);
} else {
@no_underscore_objs = (@cblasobjs, @lapackeobjs);

File diff suppressed because it is too large Load Diff