-
Notifications
You must be signed in to change notification settings - Fork 1.6k
WIP Build system overview (community made)
A. Tammy edited this page Oct 21, 2020
·
13 revisions
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.
Makefile -- include makefile
| ~~ call make on subfolder
|----- Makefile.system
| |
| |===== Makefile.prebuild # This is triggered (not included) by Makefile.system
| | # and runs before any of the code is built.
| |
| |----- Makefile.rule
| |
| |----- (Makefile.conf) [ generated - Makefile.system#L243 ]
| |
| |----- (Makefile_kernel.conf) [ generated ]
| |
| |----- Makefile.$(ARCH)
|
|~~~~~ exports/
|
|~~~~~ test/
|
|~~~~~ utest/
|
|~~~~~ ctest/
|
|~~~~~ cpp_thread_test/
|
|~~~~~ kernel/
|
|~~~~~ ${SUBDIRS}
|
|~~~~~ ${BLASDORS}
|
|~~~~~ ${NETLIB_LAPACK_DIR}{,/timing,/testing/{EIG,LIN}}
|
|~~~~~ relapack/
Most of the tunable variables are found in Makefile.rule, along with their detailed descriptions.
Most of the variables are detected automatically in Makefile.prebuild, if they are not set in the environment.
ARCH - Target architecture (eg. x86_64)
TARGET - Target CPU architecture (to get better tuning, eg. haswell)
TARGET_CORE - override TARGET (¿¿why do we need this??)
DYNAMIC_ARCH - For building library for multiple ARCHs (may lose some optimizations)
CC - TARGET C compiler used for compilation (can be cross-toolchains)
FC - TARGET Fortran compiler used for compilation (can be cross-toolchains)
AR, AS, LD, RANLIB - TARGET toolchain helpers used for compilation (can be cross-toolchains)
HOSTCC - compiler of build machine, needed to create proper config files for target architecture
HOST_CFLAGS - flags for build machine compiler
BINARY - 32/64 bit library
BUILD_SHARED - Create shared library
BUILD_STATIC - Create static library
QUAD_PRECISION - Support for IEEE quad precision [ Experimental, don't use in production ]
EXPRECISION -
INT
BUILD_SINGLE - ??
BUILD_DOUBLE - ??
BUILD_COMPLEX - ??
BUILD_COMPLEX16 - ??
USE_THREAD - Use a threading backend (default to pthread)
USE_OPENMP - Use OpenMP threading backend