1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

14 Commits

Author SHA1 Message Date
Thomas Heijligen
fc7810e087 Makefile: Build man-page only when sphinx is available
Currently, it's not possible to compile the upstream branch using the
`make' command without sphinx beeing installed.

Check if sphinx-build is installed and only then build or install the
man-page.

The problem was noticed from commit
f4f2f3dd19784efa26fd5619b7a44b4cdf14b04c move manpage to sphinx.

Change-Id: If1b81d9bc25ecac19d493b44b00a7c42d0643fe6
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/74519
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-10 03:02:07 +00:00
Thomas Heijligen
73e28a7472 Makefile: print dependency versions
When a library is found, then print its version in the config target.

Change-Id: Ie1ff8107311247fba9e5caa252d559447c871867
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66695
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-08-23 08:42:38 +00:00
Thomas Heijligen
dbefb9730b Makefile: use pkg-config --libs --static for LDFLAGS
The --static flag of pkg-config returns also the LDFLAGS which are
required to link the library static. Use this flag to successfully
link against static libraries when the shared variant is not available.
This is the case in OpenBSD with libpci.

Change-Id: I6029a096c1ceca625789d18c88119d912d79bc0e
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/61524
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-15 00:02:45 +00:00
Thomas Heijligen
274e146621 Makefile: check if librt is an external library
Some systems, e.g. OpenBSD, have clock_gettime / librt build into the
libc and therefore fail to link against it with -lrt. Thus, detect this
and link only if needed.

Change-Id: I2c1668a350aa0806fccfb4e9cd8b04861f085ee9
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/61523
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-15 00:02:01 +00:00
Thomas Heijligen
462a6159ab Makefile: Make pkg-config mandatory to find libpci
Use `make HAS_LIBPCI=yes/no` to override the pkg-config detection and
`CONFIG_LIBPCI_CFLAGS` and `CONFIG_LIBPCI_LDFLAGS` to set cflags and
ldflags manually. The optional dependency of libpci libz, is
automatically handled by pkg-config.

Change-Id: I21b4a261b34b7e688635fc6e20b7beebfa64c7ed
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59050
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-01-20 17:10:55 +00:00
Thomas Heijligen
9469f81d8f Makefile: Make pkg-config mandatory to find libusb1
Use `make HAS_LIBUSB1=yes/no` to override the pkg-config detection and
`CONFIG_LIBUSB1_CFLAGS` and `CONFIG_LIBUSB1_LDFLAGS` to set cflags and
ldflags manually.

Change-Id: I4f24be647d25dde24c41514f8964b7134205867c
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:31:13 +00:00
Thomas Heijligen
82524f8411 Makefile: Make pkg-config mandatory to find libjaylink
Use `make HAS_LIBJAYLINK=yes/no` to override the pkg-config detection
and `CONFIG_LIBJAYLINK_CFLAGS` and `CONFIG_LIBJAYLINK_LDFLAGS` to set
cflags and ldflags manually.

Change-Id: I99df547046bb9820ab502f89f6d4452c1bc0cfd4
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59048
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:31:07 +00:00
Thomas Heijligen
41f20c749e Makefile: Rework NI-845x detection
Since the NI-845x is a Windows only proprietary library, disable it by
default. Use `HAS_LIB_NI845X=yes` to enable it. The default search path
is `${PROGRAMFILES}\National Instruments\NI-845x\MS Visual C` and can be
overwritten by `CONFIG_NI845X_LIBRARY_PATH`. Use
`CONFIG_LIB_NI845X_CFLAGS` and `CONFIG_LIB_NI845X_LDFLAGS` for setting
the cflags and ld flags manually.

Change-Id: I918c3605a5ac168708a6a10fd92ee2a1aae9729b
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59047
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:30:54 +00:00
Thomas Heijligen
22e5af78fe Makefile: Make pkg-config mandatory to find libftdi1
Use `make HAS_LIBFTDI1=yes/no` to override the pkg-config detection and
`CONFIG_LIBFTDI1_CFLAGS` and `CONFIG_LIBFTDI1_LDFLAGS` to set cflags and
ldflags manually.

Change-Id: I41f5186d9f3e063c12c8c6eea888d0b0bf534259
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58623
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:30:23 +00:00
Thomas Heijligen
d87fd9cf3d Makefile: Revise build options for Linux specific headers
Clean up the feature target by outsourcing the test to an own variable.
Change the print output and don't write to the build-details file.

This is in preparation for further changes.

Change-Id: I18fc27252afb49fa7d1f2787faee2b5b669275aa
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58627
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-11-07 16:59:40 +00:00
Thomas Heijligen
2dae0b764f Makefile: Revise utsname and clock_gettime test
Clean up the feature target by outsourcing the test to an own variable.
Change the print output and don't write to the build-details file.
HAS_CLOCK_GETTIME=no replaces DISABLE_CLOCK_GETTIME=yes

This is in preparation for further changes.

Change-Id: Ie1f43b3d5a8ad79bff3f9bbc21f359ec35abc42a
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58618
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-11-07 16:59:32 +00:00
Thomas Heijligen
36fa20d176 Makefile: Revise C compiler check
Clean up the compiler target by outsourcing the test to an own variable.
Change the print output and don't write to the build-details file.

This is in preparation for further changes.

Change-Id: I3d6f08ef030744c772b4ec0dc2c9e614fb90461d
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58616
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-11-01 14:25:46 +00:00
Thomas Heijligen
ba275d8bdb Makefile: move determination test for OS to Makefile.d
Move the test code for OS detection in a extra directory to split it
from the main flashrom code.

Change-Id: Id911f17f4100f242e1fde10d23a8459ddf38b369
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58015
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-15 14:35:05 +00:00
Thomas Heijligen
c99945d962 Makefile: move functions and macros to own file
Move all define statements in its own file to tidy up the main
Makefile.

Change-Id: I451f2eeab2773982e02b2f2fdc9e8abe1cc87630
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/57935
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2021-09-28 22:09:58 +00:00