2 # Include user definition
5 # TO suppress recursive includes
12 # we need to use the host system's architecture for getarch compile options even especially when cross-compiling
13 HOSTARCH := $(shell uname -m)
14 ifeq ($(HOSTARCH), amd64)
18 # Catch conflicting usage of ARCH in some BSD environments
21 else ifeq ($(ARCH), powerpc64)
23 else ifeq ($(ARCH), powerpc64le)
25 else ifeq ($(ARCH), powerpc)
27 else ifeq ($(ARCH), i386)
29 else ifeq ($(ARCH), armv6)
31 else ifeq ($(ARCH), armv7)
33 else ifeq ($(ARCH), aarch64)
35 else ifeq ($(ARCH), mipsel)
37 else ifeq ($(ARCH), mips64el)
39 else ifeq ($(ARCH), zarch)
43 NETLIB_LAPACK_DIR = $(TOPDIR)/lapack-netlib
46 # - Only set if not specified on the command line or inherited from the environment.
47 # - CC is an implicit variable so neither '?=' or 'ifndef' can be used.
48 # http://stackoverflow.com/questions/4029274/mingw-and-make-variables
49 # - Default value is 'cc' which is not always a valid command (e.g. MinGW).
50 ifeq ($(origin CC),default)
52 # Check if $(CC) refers to a valid command and set the value to gcc if not
53 ifneq ($(findstring cmd.exe,$(SHELL)),)
54 ifeq ($(shell where $(CC) 2>NUL),)
58 ifeq ($(shell command -v $(CC) 2>/dev/null),)
59 ifeq ($(shell uname -s),Darwin)
61 # EXTRALIB += -Wl,-no_compact_unwind
68 endif # CC is set to default
70 # Default Fortran compiler (FC) is selected by f_check.
73 include $(TOPDIR)/Makefile.rule
75 include $(TOPDIR)/$(MAKEFILE_RULE)
79 # Beginning of system configuration
81 ifneq ($(BUILD_SINGLE),1)
82 ifneq ($(BUILD_DOUBLE),1)
83 ifneq ($(BUILD_COMPLEX),1)
84 ifneq ($(BUILD_COMPLEX16),1)
85 override BUILD_SINGLE=1
86 override BUILD_DOUBLE=1
87 override BUILD_COMPLEX=1
88 override BUILD_COMPLEX16=1
99 GETARCH_FLAGS := -DFORCE_$(TARGET)
100 GETARCH_FLAGS += -DUSER_TARGET
101 ifeq ($(TARGET), GENERIC)
102 ifeq ($(DYNAMIC_ARCH), 1)
103 override NO_EXPRECISION=1
104 export NO_EXPRECISION
109 # Force fallbacks for 32bit
112 ifeq ($(TARGET), HASWELL)
113 GETARCH_FLAGS := -DFORCE_NEHALEM
115 ifeq ($(TARGET), SKYLAKEX)
116 GETARCH_FLAGS := -DFORCE_NEHALEM
118 ifeq ($(TARGET), COOPERLAKE)
119 GETARCH_FLAGS := -DFORCE_NEHALEM
121 ifeq ($(TARGET), SAPPHIRERAPIDS)
122 GETARCH_FLAGS := -DFORCE_NEHALEM
124 ifeq ($(TARGET), SANDYBRIDGE)
125 GETARCH_FLAGS := -DFORCE_NEHALEM
127 ifeq ($(TARGET), BULLDOZER)
128 GETARCH_FLAGS := -DFORCE_BARCELONA
130 ifeq ($(TARGET), PILEDRIVER)
131 GETARCH_FLAGS := -DFORCE_BARCELONA
133 ifeq ($(TARGET), STEAMROLLER)
134 GETARCH_FLAGS := -DFORCE_BARCELONA
136 ifeq ($(TARGET), EXCAVATOR)
137 GETARCH_FLAGS := -DFORCE_BARCELONA
139 ifeq ($(TARGET), ZEN)
140 GETARCH_FLAGS := -DFORCE_BARCELONA
142 ifeq ($(TARGET), ARMV8)
143 GETARCH_FLAGS := -DFORCE_ARMV7
145 ifeq ($(TARGET), POWER8)
146 GETARCH_FLAGS := -DFORCE_POWER6
148 ifeq ($(TARGET), POWER9)
149 GETARCH_FLAGS := -DFORCE_POWER6
151 ifeq ($(TARGET), POWER10)
152 GETARCH_FLAGS := -DFORCE_POWER6
156 #TARGET_CORE will override TARGET which is used in DYNAMIC_ARCH=1.
159 GETARCH_FLAGS := -DFORCE_$(TARGET_CORE)
162 # Force fallbacks for 32bit
165 ifeq ($(TARGET_CORE), HASWELL)
166 GETARCH_FLAGS := -DFORCE_NEHALEM
168 ifeq ($(TARGET_CORE), SKYLAKEX)
169 GETARCH_FLAGS := -DFORCE_NEHALEM
171 ifeq ($(TARGET_CORE), COOPERLAKE)
172 GETARCH_FLAGS := -DFORCE_NEHALEM
174 ifeq ($(TARGET_CORE), SAPPHIRERAPIDS)
175 GETARCH_FLAGS := -DFORCE_NEHALEM
177 ifeq ($(TARGET_CORE), SANDYBRIDGE)
178 GETARCH_FLAGS := -DFORCE_NEHALEM
180 ifeq ($(TARGET_CORE), BULLDOZER)
181 GETARCH_FLAGS := -DFORCE_BARCELONA
183 ifeq ($(TARGET_CORE), PILEDRIVER)
184 GETARCH_FLAGS := -DFORCE_BARCELONA
186 ifeq ($(TARGET_CORE), STEAMROLLER)
187 GETARCH_FLAGS := -DFORCE_BARCELONA
189 ifeq ($(TARGET_CORE), EXCAVATOR)
190 GETARCH_FLAGS := -DFORCE_BARCELONA
192 ifeq ($(TARGET_CORE), ZEN)
193 GETARCH_FLAGS := -DFORCE_BARCELONA
198 # On x86_64 build getarch with march=native unless the compiler is PGI. This is required to detect AVX512 support in getarch.
199 ifeq ($(HOSTARCH), x86_64)
200 ifeq ($(findstring pgcc,$(HOSTCC))$(findstring nvc,$(HOSTCC)),)
201 GETARCH_FLAGS += -march=native
206 ifneq ($(INTERFACE64), 0)
207 GETARCH_FLAGS += -DUSE64BITINT
211 ifndef GEMM_MULTITHREAD_THRESHOLD
212 GEMM_MULTITHREAD_THRESHOLD=4
214 GETARCH_FLAGS += -DGEMM_MULTITHREAD_THRESHOLD=$(GEMM_MULTITHREAD_THRESHOLD)
217 GETARCH_FLAGS += -DNO_AVX
221 GETARCH_FLAGS += -DNO_AVX -DNO_AVX2 -DNO_AVX512
226 GETARCH_FLAGS += -DNO_AVX2
229 ifeq ($(NO_AVX512), 1)
230 GETARCH_FLAGS += -DNO_AVX512
237 ifeq ($(QUIET_MAKE), 1)
241 ifndef NO_PARALLEL_MAKE
244 GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE)
247 GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS)
250 ifeq ($(HOSTCC), loongcc)
251 GETARCH_FLAGS += -static
254 #if don't use Fortran, it will only compile CBLAS.
255 ifeq ($(ONLY_CBLAS), 1)
261 #For small matrix optimization
262 ifeq ($(ARCH), x86_64)
264 else ifeq ($(ARCH), power)
267 ifeq ($(SMALL_MATRIX_OPT), 1)
268 CCOMMON_OPT += -DSMALL_MATRIX_OPT
271 # This operation is expensive, so execution should be once.
272 ifndef GOTOBLAS_MAKEFILE
273 export GOTOBLAS_MAKEFILE = 1
275 # Determine if the assembler is GNU Assembler
276 HAVE_GAS := $(shell $(AS) -v < /dev/null 2>&1 | grep GNU 2>&1 >/dev/null ; echo $$?)
277 GETARCH_FLAGS += -DHAVE_GAS=$(HAVE_GAS)
279 # Generating Makefile.conf and config.h
280 DUMMY := $(shell $(MAKE) -C $(TOPDIR) -f Makefile.prebuild CC="$(CC)" FC="$(FC)" HOSTCC="$(HOSTCC)" HOST_CFLAGS="$(GETARCH_FLAGS)" CFLAGS="$(CFLAGS)" BINARY=$(BINARY) USE_OPENMP=$(USE_OPENMP) DYNAMIC_ARCH=$(DYNAMIC_ARCH) TARGET_CORE=$(TARGET_CORE) ONLY_CBLAS=$(ONLY_CBLAS) TARGET=$(TARGET) all)
283 include $(TOPDIR)/Makefile.conf
301 include $(TOPDIR)/Makefile_kernel.conf
311 NUM_THREADS = $(NUM_CORES)
314 ifeq ($(NUM_THREADS), 1)
315 override USE_THREAD = 0
316 override USE_OPENMP = 0
320 ifeq ($(USE_THREAD), 0)
326 ifeq ($(NUM_THREADS), 1)
343 AR ?= $(CROSS_SUFFIX)ar
344 AS ?= $(CROSS_SUFFIX)as
345 LD ?= $(CROSS_SUFFIX)ld
346 RANLIB ?= $(CROSS_SUFFIX)ranlib
347 NM = $(CROSS_SUFFIX)nm
348 DLLWRAP = $(CROSS_SUFFIX)dllwrap
349 OBJCOPY = $(CROSS_SUFFIX)objcopy
350 OBJCONV = $(CROSS_SUFFIX)objconv
353 # When fortran support was either not detected or actively deselected, only build BLAS.
354 ifeq ($(NOFORTRAN), 1)
359 ifeq ($(C_COMPILER), GCC)
360 GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
361 GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4)
362 GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
363 GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
364 GCCVERSIONGTEQ8 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 8)
365 GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
366 GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
367 GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
368 # Note that the behavior of -dumpversion is compile-time-configurable for
369 # gcc-7.x and newer. Use -dumpfullversion there
370 ifeq ($(GCCVERSIONGTEQ7),1)
371 GCCDUMPVERSION_PARAM := -dumpfullversion
373 GCCDUMPVERSION_PARAM := -dumpversion
375 GCCMINORVERSIONGTEQ1 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 1)
376 GCCMINORVERSIONGTEQ2 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 2)
377 GCCMINORVERSIONGTEQ4 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 4)
378 GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 7)
382 # OS dependent settings
385 ifeq ($(OSNAME), Darwin)
386 ifndef MACOSX_DEPLOYMENT_TARGET
387 ifeq ($(ARCH), arm64)
388 export MACOSX_DEPLOYMENT_TARGET=11.0
390 export MACOSX_DEPLOYMENT_TARGET=10.8
396 ifneq (,$(findstring $(OSNAME), FreeBSD OpenBSD DragonFly))
400 ifeq ($(OSNAME), NetBSD)
404 ifeq ($(OSNAME), Linux)
409 ifeq ($(OSNAME), Android)
413 ifeq ($(OSNAME), AIX)
417 ifeq ($(OSNAME), FreeBSD)
418 ifeq ($(ARCH), $(filter $(ARCH),arm arm64))
423 ifeq ($(OSNAME), WINNT)
427 EXTRALIB += -defaultlib:advapi32
433 ifeq ($(C_COMPILER), CLANG)
434 CCOMMON_OPT += -DMS_ABI
437 #Version tests for supporting specific features (MS_ABI, POWER9 intrinsics)
438 ifeq ($(GCCVERSIONGT4), 1)
439 # GCC Major version > 4
440 # It is compatible with MSVC ABI.
441 CCOMMON_OPT += -DMS_ABI
444 ifeq ($(GCCVERSIONGTEQ4), 1)
445 ifeq ($(GCCMINORVERSIONGTEQ7), 1)
447 # It is compatible with MSVC ABI.
448 CCOMMON_OPT += -DMS_ABI
452 # Ensure the correct stack alignment on Win32
453 # http://permalink.gmane.org/gmane.comp.lib.openblas.general/97
455 CCOMMON_OPT += -mincoming-stack-boundary=2
456 FCOMMON_OPT += -mincoming-stack-boundary=2
461 ifeq ($(OSNAME), Interix)
465 INTERIX_TOOL_DIR = /opt/gcc.3.3/i586-pc-interix3/bin
468 ifeq ($(OSNAME), CYGWIN_NT)
474 ifneq ($(OSNAME), WINNT)
475 ifneq ($(OSNAME), CYGWIN_NT)
476 ifneq ($(OSNAME), Interix)
477 ifneq ($(OSNAME), Android)
479 EXTRALIB += -lpthread
487 ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT Interix))
492 CCOMMON_OPT += -DQUAD_PRECISION
497 ifneq ($(ARCH), x86_64)
503 CCOMMON_OPT += -DUTEST_CHECK
508 CCOMMON_OPT += -DSANITY_CHECK -DREFNAME=$(*F)f$(BU)
511 MAX_STACK_ALLOC ?= 2048
512 ifneq ($(MAX_STACK_ALLOC), 0)
513 CCOMMON_OPT += -DMAX_STACK_ALLOC=$(MAX_STACK_ALLOC)
517 ifneq ($(USE_LOCKING), 0)
518 CCOMMON_OPT += -DUSE_LOCKING
523 # Architecture dependent settings
531 ifeq ($(CORE), generic)
535 ifndef NO_EXPRECISION
536 ifeq ($(F_COMPILER), GFORTRAN)
537 # ifeq logical or. GCC or LSB
538 ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC LSB))
540 CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
541 FCOMMON_OPT += -m128bit-long-double
543 ifeq ($(C_COMPILER), CLANG)
545 CCOMMON_OPT += -DEXPRECISION
546 FCOMMON_OPT += -m128bit-long-double
552 ifeq ($(ARCH), x86_64)
554 ifeq ($(CORE), generic)
558 ifndef NO_EXPRECISION
559 ifeq ($(F_COMPILER), GFORTRAN)
560 # ifeq logical or. GCC or LSB
561 ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC LSB))
563 CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
564 FCOMMON_OPT += -m128bit-long-double
566 ifeq ($(C_COMPILER), CLANG)
568 CCOMMON_OPT += -DEXPRECISION
569 FCOMMON_OPT += -m128bit-long-double
575 ifeq ($(C_COMPILER), INTEL)
576 CCOMMON_OPT += -wd981
580 ifeq ($(USE_OPENMP), 1)
583 ifeq ($(USE_THREAD), 0)
584 $(error OpenBLAS: Cannot set both USE_OPENMP=1 and USE_THREAD=0. The USE_THREAD=0 is only for building single thread version.)
587 # ifeq logical or. GCC or LSB
588 ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC LSB))
589 CCOMMON_OPT += -fopenmp
592 ifeq ($(C_COMPILER), CLANG)
593 CCOMMON_OPT += -fopenmp
596 ifeq ($(C_COMPILER), INTEL)
597 CCOMMON_OPT += -fopenmp
600 ifeq ($(C_COMPILER), PGI)
604 ifeq ($(C_COMPILER), OPEN64)
606 CEXTRALIB += -lstdc++
609 ifeq ($(C_COMPILER), PATHSCALE)
615 ifeq ($(DYNAMIC_ARCH), 1)
617 DYNAMIC_CORE = KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS \
618 CORE2 PENRYN DUNNINGTON NEHALEM ATHLON OPTERON OPTERON_SSE3 BARCELONA BOBCAT ATOM NANO
621 ifeq ($(ARCH), x86_64)
622 DYNAMIC_CORE = PRESCOTT CORE2
623 ifeq ($(DYNAMIC_OLDER), 1)
624 DYNAMIC_CORE += PENRYN DUNNINGTON
626 DYNAMIC_CORE += NEHALEM
627 ifeq ($(DYNAMIC_OLDER), 1)
628 DYNAMIC_CORE += OPTERON OPTERON_SSE3
630 DYNAMIC_CORE += BARCELONA
631 ifeq ($(DYNAMIC_OLDER), 1)
632 DYNAMIC_CORE += BOBCAT ATOM NANO
635 DYNAMIC_CORE += SANDYBRIDGE BULLDOZER PILEDRIVER STEAMROLLER EXCAVATOR
637 ifneq ($(NO_AVX2), 1)
638 DYNAMIC_CORE += HASWELL ZEN
640 ifneq ($(NO_AVX512), 1)
641 ifneq ($(NO_AVX2), 1)
642 DYNAMIC_CORE += SKYLAKEX COOPERLAKE
648 override DYNAMIC_CORE = PRESCOTT $(DYNAMIC_LIST)
649 XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_PRESCOTT
650 XCCOMMON_OPT += $(foreach dcore,$(DYNAMIC_LIST),-DDYN_$(dcore))
651 CCOMMON_OPT += $(XCCOMMON_OPT)
652 #CCOMMON_OPT += -DDYNAMIC_LIST='$(DYNAMIC_LIST)'
655 ifeq ($(ARCH), arm64)
657 DYNAMIC_CORE += CORTEXA53
658 DYNAMIC_CORE += CORTEXA57
659 DYNAMIC_CORE += CORTEXA72
660 DYNAMIC_CORE += CORTEXA73
661 DYNAMIC_CORE += NEOVERSEN1
662 DYNAMIC_CORE += NEOVERSEV1
663 DYNAMIC_CORE += NEOVERSEN2
664 DYNAMIC_CORE += CORTEXA55
665 DYNAMIC_CORE += FALKOR
666 DYNAMIC_CORE += THUNDERX
667 DYNAMIC_CORE += THUNDERX2T99
668 DYNAMIC_CORE += TSV110
669 DYNAMIC_CORE += EMAG8180
670 DYNAMIC_CORE += THUNDERX3T110
672 override DYNAMIC_CORE = ARMV8 $(DYNAMIC_LIST)
673 XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_ARMV8
674 XCCOMMON_OPT += $(foreach dcore,$(DYNAMIC_LIST),-DDYN_$(dcore))
678 ifeq ($(ARCH), mips64)
679 DYNAMIC_CORE = LOONGSON3R3 LOONGSON3R4
682 ifeq ($(ARCH), zarch)
683 DYNAMIC_CORE = ZARCH_GENERIC
685 # if the compiler accepts -march=arch11 or -march=z13 and can compile a file
686 # with z13-specific inline assembly, then we can include support for Z13.
687 # note: -march=z13 is equivalent to -march=arch11 yet some compiler releases
688 # only support one or the other.
689 # note: LLVM version 6.x supported -march=z13 yet could not handle vector
690 # registers in inline assembly, so the check for supporting the -march flag is
692 ZARCH_TEST_COMPILE=-c $(TOPDIR)/kernel/zarch/damin_z13.c -I$(TOPDIR) -o /dev/null > /dev/null 2> /dev/null
693 ZARCH_CC_SUPPORTS_ARCH11=$(shell $(CC) -march=arch11 $(ZARCH_TEST_COMPILE) && echo 1)
694 ZARCH_CC_SUPPORTS_Z13=$(shell $(CC) -march=z13 $(ZARCH_TEST_COMPILE) && echo 1)
696 ifeq ($(or $(ZARCH_CC_SUPPORTS_ARCH11), $(ZARCH_CC_SUPPORTS_Z13)), 1)
698 CCOMMON_OPT += -DDYN_Z13
700 $(info OpenBLAS: Not building Z13 kernels because the compiler $(CC) does not support it)
703 # as above for z13, check for -march=arch12 and z14 support in the compiler.
704 ZARCH_CC_SUPPORTS_ARCH12=$(shell $(CC) -march=arch12 $(ZARCH_TEST_COMPILE) && echo 1)
705 ZARCH_CC_SUPPORTS_Z14=$(shell $(CC) -march=z14 $(ZARCH_TEST_COMPILE) && echo 1)
706 ifeq ($(or $(ZARCH_CC_SUPPORTS_ARCH12), $(ZARCH_CC_SUPPORTS_Z14)), 1)
708 CCOMMON_OPT += -DDYN_Z14
710 $(info OpenBLAS: Not building Z14 kernels because the compiler $(CC) does not support it)
715 ifeq ($(ARCH), power)
716 ifneq ($(C_COMPILER), PGI)
717 DYNAMIC_CORE = POWER6
718 DYNAMIC_CORE += POWER8
719 ifneq ($(C_COMPILER), GCC)
720 DYNAMIC_CORE += POWER9
721 DYNAMIC_CORE += POWER10
722 CCOMMON_OPT += -DHAVE_P10_SUPPORT
724 ifeq ($(C_COMPILER), GCC)
725 ifeq ($(GCCVERSIONGT5), 1)
726 DYNAMIC_CORE += POWER9
728 $(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.)
730 LDVERSIONGTEQ35 := $(shell expr `$(CC) -Wl,--version 2> /dev/null | head -1 | cut -f2 -d "." | cut -f1 -d "-"` \>= 35)
731 ifeq ($(GCCVERSIONGTEQ11)$(LDVERSIONGTEQ35), 11)
732 DYNAMIC_CORE += POWER10
733 CCOMMON_OPT += -DHAVE_P10_SUPPORT
734 else ifeq ($(GCCVERSIONGTEQ10), 1)
735 ifeq ($(GCCMINORVERSIONGTEQ2)$(LDVERSIONGTEQ35), 11)
736 DYNAMIC_CORE += POWER10
737 CCOMMON_OPT += -DHAVE_P10_SUPPORT
740 $(info, OpenBLAS: Your gcc version is too old to build the POWER10 kernels.)
744 DYNAMIC_CORE = POWER8
745 DYNAMIC_CORE += POWER9
749 # If DYNAMIC_CORE is not set, DYNAMIC_ARCH cannot do anything, so force it to empty
751 override DYNAMIC_ARCH=
759 ifeq ($(F_COMPILER), GFORTRAN)
760 ifeq ($(C_COMPILER), GCC)
762 # CCOMMON_OPT += -DEXPRECISION
767 ifeq ($(ARCH), $(filter $(ARCH),mips64 mips))
771 ifeq ($(ARCH), alpha)
783 # If softfp abi is mentioned on the command line, force it.
784 ifeq ($(ARM_SOFTFP_ABI), 1)
785 CCOMMON_OPT += -mfloat-abi=softfp
786 FCOMMON_OPT += -mfloat-abi=softfp
789 ifeq ($(OSNAME), Android)
790 ifeq ($(ARM_SOFTFP_ABI), 1)
793 EXTRALIB += -Wl,-lm_hard
798 ifeq ($(ARCH), arm64)
802 ifneq ($(INTERFACE64), 0)
803 ifeq ($(F_COMPILER), GFORTRAN)
804 FCOMMON_OPT += -fdefault-integer-8
806 ifeq ($(F_COMPILER), FLANG)
813 ifeq ($(ARCH), riscv64)
818 ifeq ($(ARCH), loongarch64)
825 # C Compiler dependent settings
829 # ifeq logical or. GCC or CLANG or LSB
830 # http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
831 ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC CLANG LSB))
833 COMMON_PROF += -fno-inline
834 NO_UNINITIALIZED_WARN = -Wno-uninitialized
836 ifeq ($(QUIET_MAKE), 1)
837 CCOMMON_OPT += $(NO_UNINITIALIZED_WARN) -Wno-unused
842 ifeq ($(ARCH), $(filter $(ARCH),mips64))
844 CCOMMON_OPT += -mabi=64
846 CCOMMON_OPT += -mabi=n32
849 else ifeq ($(ARCH), $(filter $(ARCH),mips))
850 CCOMMON_OPT += -mabi=32
854 ifneq (, $(filter $(CORE),LOONGSON3R3 LOONGSON3R4))
855 CCOMMON_OPT += -march=loongson3a
856 FCOMMON_OPT += -march=loongson3a
859 ifeq ($(CORE), MIPS24K)
860 CCOMMON_OPT += -mips32r2 -mtune=24kc $(MSA_FLAGS)
861 FCOMMON_OPT += -mips32r2 -mtune=24kc $(MSA_FLAGS)
864 ifeq ($(CORE), MIPS1004K)
865 CCOMMON_OPT += -mips32r2 $(MSA_FLAGS)
866 FCOMMON_OPT += -mips32r2 $(MSA_FLAGS)
869 ifeq ($(CORE), P5600)
870 CCOMMON_OPT += -mips32r5 -mnan=2008 -mtune=p5600 $(MSA_FLAGS)
871 FCOMMON_OPT += -mips32r5 -mnan=2008 -mtune=p5600 $(MSA_FLAGS)
874 ifeq ($(CORE), I6400)
875 CCOMMON_OPT += -mips64r6 -mnan=2008 -mtune=i6400 $(MSA_FLAGS)
876 FCOMMON_OPT += -mips64r6 -mnan=2008 -mtune=i6400 $(MSA_FLAGS)
879 ifeq ($(CORE), P6600)
880 CCOMMON_OPT += -mips64r6 -mnan=2008 -mtune=p6600 $(MSA_FLAGS)
881 FCOMMON_OPT += -mips64r6 -mnan=2008 -mtune=p6600 $(MSA_FLAGS)
884 ifeq ($(CORE), I6500)
885 CCOMMON_OPT += -mips64r6 -mnan=2008 -mtune=i6400 $(MSA_FLAGS)
886 FCOMMON_OPT += -mips64r6 -mnan=2008 -mtune=i6400 $(MSA_FLAGS)
889 ifeq ($(OSNAME), AIX)
893 ifeq ($(ARCH), loongarch64)
894 ifeq ($(CORE), LOONGSON3R5)
895 CCOMMON_OPT += -march=loongarch64 -mabi=lp64
896 FCOMMON_OPT += -march=loongarch64 -mabi=lp64
902 ifndef BINARY_DEFINED
903 ifneq ($(OSNAME), AIX)
905 ifneq ($(ARCH), riscv64)
916 ifeq ($(C_COMPILER), PGI)
917 PGCVERSIONGT20 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \> 20)
918 PGCVERSIONEQ20 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` == 20)
919 PGCMINORVERSIONGE11 := $(shell expr `$(CC) --version|sed -n "2p" |cut -d "-" -f 1 |sed -e "s/[^0-9.]//g" |cut -c 4-5` \>= 11)
920 PGCVERSIONCHECK := $(PGCVERSIONGT20)$(PGCVERSIONEQ20)$(PGCMINORVERSIONGE11)
921 ifeq ($(PGCVERSIONCHECK), $(filter $(PGCVERSIONCHECK), 100 101 011))
923 PGCVERSIONGT21 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \> 21)
924 PGCVERSIONEQ21 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` == 21)
925 PGCVERSIONCHECK2 := $(PGCVERSIONGT21)$(PGCVERSIONEQ21)$(PGCMINORVERSIONGE11)
926 ifeq ($(PGCVERSIONCHECK2), $(filter $(PGCVERSIONCHECK2), 100 101 011))
931 ifeq ($(ARCH), x86_64)
933 CCOMMON_OPT += -tp p7-64
935 CCOMMON_OPT += -tp px
938 CCOMMON_OPT += -D__MMX__ -Mnollvm
941 ifeq ($(ARCH), power)
942 ifeq ($(CORE), POWER8)
943 CCOMMON_OPT += -tp pwr8
945 ifeq ($(CORE), POWER9)
946 CCOMMON_OPT += -tp pwr9
952 CCOMMON_OPT += -tp p7
954 CCOMMON_OPT += -tp px
959 ifeq ($(C_COMPILER), PATHSCALE)
968 # Fortran Compiler dependent settings
971 ifeq ($(F_COMPILER), NAG)
972 FCOMMON_OPT += -dcfuns -recursive -ieee=full -w=obs -thread_safe
974 ifneq ($(INTERFACE64), 0)
978 ifeq ($(USE_OPENMP), 1)
979 FCOMMON_OPT += -openmp
983 ifeq ($(F_COMPILER), FLANG)
984 CCOMMON_OPT += -DF_INTERFACE_FLANG
985 FCOMMON_OPT += -Mrecursive -Kieee
986 ifeq ($(OSNAME), Linux)
987 ifeq ($(ARCH), x86_64)
988 FLANG_VENDOR := $(shell $(FC) --version|head -1 |cut -f 1 -d " ")
989 ifeq ($(FLANG_VENDOR), AMD)
990 FCOMMON_OPT += -fno-unroll-loops
996 ifneq ($(INTERFACE64), 0)
1000 FCOMMON_OPT += -Wall
1002 FCOMMON_OPT += -Wall
1004 ifeq ($(USE_OPENMP), 1)
1005 FCOMMON_OPT += -fopenmp
1009 ifeq ($(F_COMPILER), G77)
1010 CCOMMON_OPT += -DF_INTERFACE_G77
1011 FCOMMON_OPT += -Wall
1012 ifndef NO_BINARY_MODE
1013 ifneq ($(OSNAME), AIX)
1023 ifeq ($(F_COMPILER), G95)
1024 CCOMMON_OPT += -DF_INTERFACE_G95
1025 FCOMMON_OPT += -Wall
1026 ifneq ($(OSNAME), AIX)
1027 ifndef NO_BINARY_MODE
1034 ifneq ($(NO_LAPACKE), 1)
1035 FCOMMON_OPT += -fno-second-underscore
1040 ifeq ($(F_COMPILER), GFORTRAN)
1041 CCOMMON_OPT += -DF_INTERFACE_GFORT
1042 FCOMMON_OPT += -Wall
1043 # make single-threaded LAPACK calls thread-safe #1847
1044 FCOMMON_OPT += -frecursive
1045 # work around ABI problem with passing single-character arguments
1046 FCOMMON_OPT += -fno-optimize-sibling-calls
1047 #Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
1048 ifneq ($(NOFORTRAN), 1)
1049 ifneq ($(NOFORTRAN), 2)
1050 ifneq ($(NO_LAPACK), 1)
1051 EXTRALIB += -lgfortran
1055 ifdef NO_BINARY_MODE
1056 ifeq ($(ARCH), $(filter $(ARCH),mips64))
1058 FCOMMON_OPT += -mabi=64
1060 FCOMMON_OPT += -mabi=n32
1062 else ifeq ($(ARCH), $(filter $(ARCH),mips))
1063 FCOMMON_OPT += -mabi=32
1067 ifneq ($(OSNAME), AIX)
1068 ifneq ($(ARCH), riscv64)
1073 ifneq ($(INTERFACE64), 0)
1074 FCOMMON_OPT += -fdefault-integer-8
1078 ifneq ($(OSNAME), AIX)
1083 ifeq ($(USE_OPENMP), 1)
1084 FCOMMON_OPT += -fopenmp
1088 ifeq ($(F_COMPILER), INTEL)
1089 CCOMMON_OPT += -DF_INTERFACE_INTEL
1091 ifneq ($(INTERFACE64), 0)
1095 FCOMMON_OPT += -recursive -fp-model strict -assume protect-parens
1096 ifeq ($(USE_OPENMP), 1)
1097 FCOMMON_OPT += -fopenmp
1101 ifeq ($(F_COMPILER), FUJITSU)
1102 CCOMMON_OPT += -DF_INTERFACE_FUJITSU
1103 ifeq ($(USE_OPENMP), 1)
1104 FCOMMON_OPT += -openmp
1108 ifeq ($(F_COMPILER), IBM)
1109 CCOMMON_OPT += -DF_INTERFACE_IBM
1110 # FCOMMON_OPT += -qarch=440
1114 ifneq ($(INTERFACE64), 0)
1115 FCOMMON_OPT += -qintsize=8
1121 ifeq ($(USE_OPENMP), 1)
1122 FCOMMON_OPT += -openmp
1126 ifeq ($(F_COMPILER), PGI)
1127 CCOMMON_OPT += -DF_INTERFACE_PGI
1128 COMMON_PROF += -DPGICOMPILER
1131 ifneq ($(INTERFACE64), 0)
1135 ifeq ($(ARCH), x86_64)
1136 ifneq ($(NEWPGI2),1)
1137 FCOMMON_OPT += -tp p7-64
1139 FCOMMON_OPT += -tp px
1142 ifeq ($(ARCH), power)
1143 ifeq ($(CORE), POWER6)
1144 $(warning NVIDIA HPC compilers do not support POWER6.)
1146 ifeq ($(CORE), POWER8)
1147 FCOMMON_OPT += -tp pwr8
1149 ifeq ($(CORE), POWER9)
1150 FCOMMON_OPT += -tp pwr9
1152 ifeq ($(CORE), POWER10)
1153 $(warning NVIDIA HPC compilers do not support POWER10.)
1158 FCOMMON_OPT += -tp p7
1160 FCOMMON_OPT += -Mrecursive -Kieee
1161 ifeq ($(USE_OPENMP), 1)
1166 ifeq ($(F_COMPILER), PATHSCALE)
1167 CCOMMON_OPT += -DF_INTERFACE_PATHSCALE
1170 ifneq ($(INTERFACE64), 0)
1176 ifeq ($(USE_OPENMP), 1)
1181 ifeq ($(F_COMPILER), OPEN64)
1182 CCOMMON_OPT += -DF_INTERFACE_OPEN64
1185 ifneq ($(INTERFACE64), 0)
1191 ifeq ($(ARCH), $(filter $(ARCH),mips64 mips))
1197 ifeq ($(CORE), LOONGSON3R3)
1198 FCOMMON_OPT += -loongson3 -static
1201 ifeq ($(CORE), LOONGSON3R4)
1202 FCOMMON_OPT += -loongson3 -static
1213 ifeq ($(USE_OPENMP), 1)
1214 FEXTRALIB += -lstdc++
1219 ifeq ($(C_COMPILER), OPEN64)
1221 ifeq ($(ARCH), $(filter $(ARCH),mips64 mips))
1227 ifeq ($(CORE), LOONGSON3R3)
1228 CCOMMON_OPT += -loongson3 -static
1231 ifeq ($(CORE), LOONGSON3R4)
1232 CCOMMON_OPT += -loongson3 -static
1245 ifeq ($(C_COMPILER), SUN)
1258 ifeq ($(F_COMPILER), SUN)
1259 CCOMMON_OPT += -DF_INTERFACE_SUN
1260 FCOMMON_OPT += -ftrap=%none -xrecursive
1270 ifeq ($(USE_OPENMP), 1)
1271 FCOMMON_OPT += -xopenmp=parallel
1275 ifeq ($(F_COMPILER), COMPAQ)
1276 CCOMMON_OPT += -DF_INTERFACE_COMPAQ
1277 ifeq ($(USE_OPENMP), 1)
1278 FCOMMON_OPT += -openmp
1284 ifneq ($(INTERFACE64), 0)
1291 ifeq ($(NEED_PIC), 1)
1292 ifeq ($(C_COMPILER), IBM)
1293 CCOMMON_OPT += -qpic=large
1295 CCOMMON_OPT += -fPIC
1297 ifeq ($(F_COMPILER), SUN)
1299 else ifeq ($(F_COMPILER), NAG)
1302 FCOMMON_OPT += -fPIC
1306 ifeq ($(DYNAMIC_ARCH), 1)
1307 CCOMMON_OPT += -DDYNAMIC_ARCH
1310 ifeq ($(DYNAMIC_OLDER), 1)
1311 CCOMMON_OPT += -DDYNAMIC_OLDER
1314 ifeq ($(C_LAPACK), 1)
1315 CCOMMON_OPT += -DC_LAPACK
1318 ifeq ($(NO_LAPACK), 1)
1319 CCOMMON_OPT += -DNO_LAPACK
1320 #Disable LAPACK C interface
1324 ifeq ($(NO_LAPACKE), 1)
1325 CCOMMON_OPT += -DNO_LAPACKE
1329 CCOMMON_OPT += -DNO_AVX
1333 CCOMMON_OPT += -DNO_AVX
1336 ifeq ($(NO_AVX2), 1)
1337 CCOMMON_OPT += -DNO_AVX2
1340 ifeq ($(NO_AVX512), 1)
1341 CCOMMON_OPT += -DNO_AVX512
1345 CCOMMON_OPT += -DSMP_SERVER
1347 ifeq ($(ARCH), mips64)
1348 USE_SIMPLE_THREADED_LEVEL3 = 1
1351 ifeq ($(USE_OPENMP), 1)
1352 # USE_SIMPLE_THREADED_LEVEL3 = 1
1354 CCOMMON_OPT += -DUSE_OPENMP
1357 ifeq ($(BIGNUMA), 1)
1358 CCOMMON_OPT += -DBIGNUMA
1363 ifeq ($(NO_WARMUP), 1)
1364 CCOMMON_OPT += -DNO_WARMUP
1367 ifeq ($(CONSISTENT_FPCSR), 1)
1368 CCOMMON_OPT += -DCONSISTENT_FPCSR
1371 # Only for development
1372 # CCOMMON_OPT += -DPARAMTEST
1373 # CCOMMON_OPT += -DPREFETCHTEST
1374 # CCOMMON_OPT += -DNO_SWITCHING
1378 CCOMMON_OPT += -DUSE_PAPI
1379 EXTRALIB += -lpapi -lperfctr
1383 CCOMMON_OPT += -DBUFFERSIZE=$(BUFFERSIZE)
1386 ifdef DYNAMIC_THREADS
1387 CCOMMON_OPT += -DDYNAMIC_THREADS
1390 CCOMMON_OPT += -DMAX_CPU_NUMBER=$(NUM_THREADS)
1392 CCOMMON_OPT += -DMAX_PARALLEL_NUMBER=$(NUM_PARALLEL)
1394 ifdef USE_SIMPLE_THREADED_LEVEL3
1395 CCOMMON_OPT += -DUSE_SIMPLE_THREADED_LEVEL3
1398 ifeq ($(USE_TLS), 1)
1399 CCOMMON_OPT += -DUSE_TLS
1402 ifeq ($(BUILD_BFLOAT16), 1)
1403 CCOMMON_OPT += -DBUILD_BFLOAT16
1405 ifeq ($(BUILD_SINGLE), 1)
1406 CCOMMON_OPT += -DBUILD_SINGLE=1
1408 ifeq ($(BUILD_DOUBLE), 1)
1409 CCOMMON_OPT += -DBUILD_DOUBLE=1
1411 ifeq ($(BUILD_COMPLEX), 1)
1412 CCOMMON_OPT += -DBUILD_COMPLEX=1
1414 ifeq ($(BUILD_COMPLEX16), 1)
1415 CCOMMON_OPT += -DBUILD_COMPLEX16=1
1418 CCOMMON_OPT += -DVERSION=\"$(VERSION)\"
1428 ifndef LIBSONAMEBASE
1429 LIBSONAMEBASE = openblas
1432 ifndef LIBNAMESUFFIX
1433 LIBNAMEBASE = $(SYMBOLPREFIX)$(LIBSONAMEBASE)$(SYMBOLSUFFIX)
1435 LIBNAMEBASE = $(SYMBOLPREFIX)$(LIBSONAMEBASE)$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
1438 ifeq ($(OSNAME), CYGWIN_NT)
1439 LIBPREFIX = cyg$(LIBNAMEBASE)
1441 LIBPREFIX = lib$(LIBNAMEBASE)
1444 KERNELDIR = $(TOPDIR)/kernel/$(ARCH)
1446 include $(TOPDIR)/Makefile.$(ARCH)
1448 ifneq ($(C_COMPILER), PGI)
1449 ifneq ($(C_COMPILER), SUN)
1450 CCOMMON_OPT += -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME
1453 CCOMMON_OPT += -DASMNAME=$(FU)$(*F) -DASMFNAME=$(FU)$(*F)$(BU) -DNAME=$(*F)$(BU) -DCNAME=$(*F) -DCHAR_NAME=\"$(*F)$(BU)\" -DCHAR_CNAME=\"$(*F)\"
1455 ifeq ($(CORE), PPC440)
1456 CCOMMON_OPT += -DALLOC_QALLOC
1459 ifeq ($(CORE), PPC440FP2)
1460 STATIC_ALLOCATION = 1
1463 ifneq ($(OSNAME), Linux)
1467 ifneq ($(ARCH), x86_64)
1468 ifneq ($(ARCH), x86)
1474 ifeq ($(NO_AFFINITY), 0)
1475 override undefine NO_AFFINITY
1477 CCOMMON_OPT += -DNO_AFFINITY
1481 ifdef FUNCTION_PROFILE
1482 CCOMMON_OPT += -DFUNCTION_PROFILE
1485 ifdef HUGETLB_ALLOCATION
1486 CCOMMON_OPT += -DALLOC_HUGETLB
1489 ifdef HUGETLBFILE_ALLOCATION
1490 CCOMMON_OPT += -DALLOC_HUGETLBFILE -DHUGETLB_FILE_NAME=$(HUGETLBFILE_ALLOCATION)
1493 ifdef STATIC_ALLOCATION
1494 CCOMMON_OPT += -DALLOC_STATIC
1497 ifdef DEVICEDRIVER_ALLOCATION
1498 CCOMMON_OPT += -DALLOC_DEVICEDRIVER -DDEVICEDRIVER_NAME=\"/dev/mapper\"
1501 ifdef MIXED_MEMORY_ALLOCATION
1502 CCOMMON_OPT += -DMIXED_MEMORY_ALLOCATION
1505 ifeq ($(OSNAME), SunOS)
1522 REVISION = -r$(VERSION)
1523 MAJOR_VERSION = $(word 1,$(subst ., ,$(VERSION)))
1538 FCOMMON_OPT = -O2 -frecursive
1541 override CFLAGS += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR)
1542 override PFLAGS += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) -DPROFILE $(COMMON_PROF)
1543 override FFLAGS += $(COMMON_OPT) $(FCOMMON_OPT)
1544 override FPFLAGS += $(FCOMMON_OPT) $(COMMON_PROF)
1547 ifeq ($(NEED_PIC), 1)
1548 ifeq (,$(findstring PIC,$(FFLAGS)))
1549 override FFLAGS += -fPIC
1553 #For LAPACK Fortran codes.
1554 #Disable -fopenmp for LAPACK Fortran codes on Windows.
1556 LAPACK_FFLAGS := $(filter-out -fopenmp -mp -openmp -xopenmp=parallel,$(FFLAGS))
1557 LAPACK_FPFLAGS := $(filter-out -fopenmp -mp -openmp -xopenmp=parallel,$(FPFLAGS))
1559 LAPACK_FFLAGS := $(FFLAGS)
1560 LAPACK_FPFLAGS := $(FPFLAGS)
1563 ifeq ($(F_COMPILER),NAG)
1564 LAPACK_FFLAGS := $(filter-out -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mskylake-avx512 ,$(FFLAGS))
1567 LAPACK_CFLAGS = $(CFLAGS)
1568 LAPACK_CFLAGS += -DHAVE_LAPACK_CONFIG_H
1570 ifneq ($(INTERFACE64), 0)
1571 LAPACK_CFLAGS += -DLAPACK_ILP64
1576 LAPACK_CFLAGS += -DOPENBLAS_OS_WINDOWS
1577 LAPACK_CFLAGS += -DLAPACK_COMPLEX_STRUCTURE
1579 ifeq ($(C_COMPILER), LSB)
1580 LAPACK_CFLAGS += -DLAPACK_COMPLEX_STRUCTURE
1595 ifneq ($(DYNAMIC_ARCH), 1)
1597 LIBNAME = $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX)
1598 LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX)
1600 LIBNAME = $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX)
1601 LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX)
1605 LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
1606 LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
1608 LIBNAME = $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX)
1609 LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
1614 LIBDLLNAME = $(LIBPREFIX).dll
1615 IMPLIBNAME = lib$(LIBNAMEBASE).dll.a
1616 ifneq ($(OSNAME), AIX)
1617 LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
1619 LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.a)
1621 LIBDYNNAME = $(LIBNAME:.$(LIBSUFFIX)=.dylib)
1622 LIBDEFNAME = $(LIBNAME:.$(LIBSUFFIX)=.def)
1623 LIBEXPNAME = $(LIBNAME:.$(LIBSUFFIX)=.exp)
1624 LIBZIPNAME = $(LIBNAME:.$(LIBSUFFIX)=.zip)
1626 LIBS = $(TOPDIR)/$(LIBNAME)
1627 LIBS_P = $(TOPDIR)/$(LIBNAME_P)
1630 LIB_COMPONENTS = BLAS
1631 ifneq ($(NO_CBLAS), 1)
1632 LIB_COMPONENTS += CBLAS
1635 ifneq ($(NO_LAPACK), 1)
1636 LIB_COMPONENTS += LAPACK
1637 ifneq ($(NO_LAPACKE), 1)
1638 LIB_COMPONENTS += LAPACKE
1640 ifeq ($(BUILD_RELAPACK), 1)
1641 LIB_COMPONENTS += ReLAPACK
1645 ifeq ($(ONLY_CBLAS), 1)
1646 LIB_COMPONENTS = CBLAS
1653 export __BYTE_ORDER__
1661 export NEED2UNDERSCORES
1666 export MAKEFILE_RULE
1702 export FUNCTION_PROFILE
1706 export BUILD_BFLOAT16
1708 export SBGEMM_UNROLL_M
1709 export SBGEMM_UNROLL_N
1710 export SGEMM_UNROLL_M
1711 export SGEMM_UNROLL_N
1712 export DGEMM_UNROLL_M
1713 export DGEMM_UNROLL_N
1714 export QGEMM_UNROLL_M
1715 export QGEMM_UNROLL_N
1716 export CGEMM_UNROLL_M
1717 export CGEMM_UNROLL_N
1718 export ZGEMM_UNROLL_M
1719 export ZGEMM_UNROLL_N
1720 export XGEMM_UNROLL_M
1721 export XGEMM_UNROLL_N
1722 export CGEMM3M_UNROLL_M
1723 export CGEMM3M_UNROLL_N
1724 export ZGEMM3M_UNROLL_M
1725 export ZGEMM3M_UNROLL_N
1726 export XGEMM3M_UNROLL_M
1727 export XGEMM3M_UNROLL_N
1737 .SUFFIXES: .$(PSUFFIX) .$(SUFFIX) .f
1740 $(FC) $(FFLAGS) -c $< -o $(@F)
1743 $(FC) $(FPFLAGS) -pg -c $< -o $(@F)
1747 PATHSCALEPATH = /opt/pathscale/lib/3.1
1748 PGIPATH = /opt/pgi/linux86-64/7.1-5/lib
1750 PATHSCALEPATH = /opt/pathscale/lib/3.1/32
1751 PGIPATH = /opt/pgi/linux86/7.1-5/lib
1754 ACMLPATH = /opt/acml/4.3.0
1755 ifneq ($(OSNAME), Darwin)
1756 MKLPATH = /opt/intel/mkl/10.2.2.025/lib
1758 MKLPATH = /Library/Frameworks/Intel_MKL.framework/Versions/10.0.1.014/lib
1760 ATLASPATH = /opt/atlas/3.9.17/opteron
1761 FLAMEPATH = $(HOME)/flame/lib
1762 ifneq ($(OSNAME), SunOS)
1763 SUNPATH = /opt/sunstudio12.1
1765 SUNPATH = /opt/SUNWspro