Commit Graph

30 Commits

Author SHA1 Message Date
Curtis Malainey aee69115ba build: allow host build to be static
oss-fuzz does not support dynamic linking, therefore we need to add
support for static builds

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2020-10-20 09:28:28 +01:00
Marc Herbert ee8a0d8840 CMakeLists.txt: change generated config.h default to autoconfig.h
Change generated config.h default name to autoconfig.h to catch any
remaining #include config.h left in any other PR, branch or any other
concurrent work in progress unknown to this.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-06-22 13:01:26 +01:00
Marc Herbert d7d86cb609 CMakeLists.txt: make CONFIG_H_PATH a build parameter
No functional change for now.

This is needed because SOF is a CMake sub/"external" project when
building some host tools. We want to switch all projects to "-imacros
config.h" but subprojects cannot inform parents where their files are
located. So make parents able to dictate where config.h is instead.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-06-22 13:01:26 +01:00
Karol Trzcinski bebdbca87b rimage: Update to version with changed headers location
In new version of rimage software, headers are located in
rimage/src/include/rimage directory to make it easily accessible
from another source code without include path collision.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-05-29 11:15:22 +01:00
Adrian Bonislawski 863eb0a072 cmake: merge BUILD_LIBRARY and CONFIG_LIBRARY
There is only one valid CONFIG_LIBRARY which can be
configured via kconfig

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-05-18 13:25:28 +01:00
Daniel Leung d53778f372 cmake: update git submodules when cmake is run
This adds the necessary bits to update git submodules when
cmake is run, with the option to turn this behavior off if
needed. This is in preparation to use fw.h and manifest.h
from the rimage repo to prevent having two copies of each
file in two different repos. Obviously, the files in
the submodules must exist before building the firmware,
so run git submodule update to checkout the files.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-05-13 10:16:04 +01:00
Janusz Jankowski 6f7bf63417 cmake: build option for clang static analyzer
Add option for building FW for clang's scan-build.
This static analyzer works out-of-the-box only for compilers
compatible with Clang. For most of embedded compilers
there will be some adjustment needed when BUILD_CLANG_SCAN
is enabled. This flag is not suitable for every build scenario,
it has to be supported for given toolchain / architecture.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-04 11:02:56 +01:00
Janusz Jankowski 1d92e8e175 sof: use RELATIVE_FILE instead of __FILE__
Use RELATIVE_FILE because __FILE__ makes binary output
dependent on project location.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-11 12:50:30 +00:00
Janusz Jankowski ea71535a7e cmake: interface library for sof static libraries
Target dependencies have to be added in the same CMakeLists in which
they are declared. CMake interface library is needed to enable adding
static libraries to sof target from subdirectories.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-09 16:44:50 +02:00
Janusz Jankowski 62b59ce762 cmake: link sof libraries as private
In function target_link_libraries visibility modifiers have to be
consistent, otherwise we will get error while trying to use modifier,
if it wasn't used in root CMakeLists.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-08 13:54:14 +02:00
Janusz Jankowski c0c858c26a cmake: install: fix new headers paths
This commit updates paths of installed headers to match
new headers folders structure.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-10 14:50:13 +02:00
Janusz Jankowski c6064624f6 cmake: add spdx license identifier
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski 5a96276365 cmake: add install target for fw
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-31 16:06:25 +01:00
Janusz Jankowski 2693daf503 cmake: rename BUILD_HOST to BUILD_LIBRARY
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski ecb73cad2d cmake: install public headers for host
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 11e2da2f19 host: build ipc and lib as shared lib
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski fdda8f6820 host: enable kconfig
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski dbf43b290a cmake: add git hooks
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-21 15:43:25 +00:00
Janusz Jankowski a4f666527e cmake: add build counter
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-02-11 11:53:32 +00:00
Janusz Jankowski 46730e89c6 cmake: refactor version.h rule
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-02-11 11:53:32 +00:00
Janusz Jankowski ba7d875086 cmake: refactor kconfig targets
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-02-07 21:12:39 +00:00
Janusz Jankowski 8d408eb2e6 cmake: add dist target
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-02-05 16:44:22 +00:00
Janusz Jankowski dd87462402 cmake: crossplatform cc version get
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 08:46:04 +01:00
Janusz Jankowski 25e243b55f cmake: find python3
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 08:24:49 +01:00
Janusz Jankowski 4fc3af5e04 cmake: prevent in-source build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-28 10:43:05 +00:00
Janusz Jankowski 4574fdc15a cmake: add overrideconfig
overrideconfig is custom target that can be used
to set config values from scripts

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 82b4da291b cmake: defconfigs support
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9a3dff5475 cmake: add CMakeLists for unit tests
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 7680a7b0dc cmake: add testbench host build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski e0ba98d21a cmake: add CMakeLists for firmware build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00