You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page describes the Make-based build, which is the default/authoritative
2
-
build method. Note that the OpenBLAS repository also supports building with
3
-
CMake (not described here) - that generally works and is tested, however there
4
-
may be small differences between the Make and CMake builds.
1
+
!!! info "Supported build systems"
2
+
3
+
This page describes the Make-based build, which is the
4
+
default/authoritative build method. Note that the OpenBLAS repository also
5
+
supports building with CMake (not described here) - that generally works
6
+
and is tested, however there may be small differences between the Make and
7
+
CMake builds.
8
+
9
+
10
+
## Makefile dependency graph
11
+
12
+
<!---
13
+
An easy way to update this diagram is to copy it into https://mermaid.live
14
+
and edit it interactively.
15
+
-->
16
+
17
+
```mermaid
18
+
flowchart LR
19
+
A[Makefile] -->|included by many of the Makefiles in the subdirectories!| B(Makefile.system)
20
+
B -->|triggered, not included, once by Makefile.system, and runs before any of the actual library code is built. builds and runs the 'getarch' tool for cpu identification, runs the compiler detection scripts c_check/f_check| C{Makefile.prebuild}
21
+
C -->|either this or Makefile_kernel.conf is generated| D[Makefile.conf]
22
+
C -->|temporary Makefile.conf during DYNAMIC_ARCH builds| E[Makefile_kernel.conf]
23
+
B -->|defaults for build options that can be given on the make command line| F[Makefile.rule]
24
+
B -->|architecture-specific compiler options and OpenBLAS buffer size values| G[Makefile.$ARCH]
25
+
A --> exports
26
+
A -->|directories: test, ctest, utest, cpp_thread_test| H(test directories)
27
+
A --> I($BLASDIRS)
28
+
I --> interface
29
+
I --> driver/level2
30
+
I --> driver/level3
31
+
I --> driver/others
32
+
A -->|for each target in DYNAMIC_CORE if DYNAMIC_ARCH=1| kernel
33
+
A -->|subdirs: timing, testing, testing/EIG, testing/LIN| J($NETLIB_LAPACK_DIR)
34
+
A --> relapack
35
+
```
5
36
6
-
!!! warning
7
-
This page is made by someone who is not the developer and should not be considered as an official documentation of the build system. For getting the full picture, it is best to read the Makefiles and understand them yourself.
8
37
9
-
## Makefile dep graph
38
+
## Important Variables
10
39
11
-
```
12
-
Makefile
13
-
|
14
-
|----- Makefile.system # !!! this is included by many of the Makefiles in the subdirectories !!!
15
-
| |
16
-
| |===== Makefile.prebuild # This is triggered (not included) once by Makefile.system
17
-
| | | # and runs before any of the actual library code is built.
18
-
| | | # (builds and runs the "getarch" tool for cpu identification,
19
-
| | | # runs the compiler detection scripts c_check and f_check)
20
-
| | |
21
-
| | ----- (Makefile.conf) [ either this or Makefile_kernel.conf is generated ]
Most of the tunable variables are found in [Makefile.rule](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.rule), along with their detailed descriptions.<br/>
53
-
Most of the variables are detected automatically in [Makefile.prebuild](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.prebuild), if they are not set in the environment.
48
+
The most commonly used variables are documented below. There are more options
49
+
though - please read the linked Makefiles if you want to see all variables.
54
50
55
51
### CPU related
56
-
```
57
-
ARCH - Target architecture (eg. x86_64)
58
-
TARGET - Target CPU architecture, in case of DYNAMIC_ARCH=1 means library will not be usable on less capable CPUs
59
-
TARGET_CORE - TARGET_CORE will override TARGET internally during each cpu-specific cycle of the build for DYNAMIC_ARCH
60
-
DYNAMIC_ARCH - For building library for multiple TARGETs (does not lose any optimizations, but increases library size)
61
-
DYNAMIC_LIST - optional user-provided subset of the DYNAMIC_CORE list in Makefile.system
62
-
```
63
52
64
-
### Toolchain related
65
-
```
66
-
CC - TARGET C compiler used for compilation (can be cross-toolchains)
67
-
FC - TARGET Fortran compiler used for compilation (can be cross-toolchains, set NOFORTRAN=1 if used cross-toolchain has no fortran compiler)
68
-
AR, AS, LD, RANLIB - TARGET toolchain helpers used for compilation (can be cross-toolchains)
53
+
-`ARCH`: target architecture (e.g., `x86-64`).
54
+
-`DYNAMIC_ARCH`: For building library for multiple `TARGET`s (does not lose any
55
+
optimizations, but increases library size).
56
+
-`DYNAMIC_LIST`: optional user-provided subset of the `DYNAMIC_CORE` list in
0 commit comments