diff options
author | Thomas Heijligen <thomas.heijligen@secunet.com> | 2023-05-15 20:02:10 +0200 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2023-07-13 09:26:20 +0000 |
commit | f317a11ef10c500fb9cb6e638b24626d1e309adf (patch) | |
tree | 305bf3166a6eca655b8e334c1ff9ba2a14714d93 | |
parent | 751b16e56c64e8656c922f9007dad07f2ba16030 (diff) | |
download | flashrom-f317a11ef10c500fb9cb6e638b24626d1e309adf.tar.gz flashrom-f317a11ef10c500fb9cb6e638b24626d1e309adf.tar.bz2 flashrom-f317a11ef10c500fb9cb6e638b24626d1e309adf.zip |
Makefile: Simplify the NI-845X detection
The current auto detection is kind of broken. Since the NI-845X driver
package is likely not changing, hardcode `C:\Program Files
(x86)\National Instuments\NI-845x\MS Visual C` as default path to search
for the library and header. This can be overridden by setting
`CONFIG_NI845X_LIBRARY_PATH` to the custom path.
TEST=Run make HAS_LIB_NI845X=yes CONFIG_NI845X=yes successfully on MSYS2
MINGW32
Change-Id: I2115c30d0884e35eb549a31beef04d966ba4f491
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75234
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
-rw-r--r-- | Makefile | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -211,19 +211,9 @@ CONFIG_LIBFTDI1_VERSION := $(call dependency_version, libftdi1) CONFIG_LIBFTDI1_CFLAGS := $(call dependency_cflags, libftdi1) CONFIG_LIBFTDI1_LDFLAGS := $(call dependency_ldflags, libftdi1) -# Hack to keep legacy auto detection of Program Files (x86), Only active if none of the CONFIG_ variables for ni845x are set. -ifeq ($(CONFIG_NI845X_LIBRARY_PATH)$(CONFIG_LIB_NI845X_CFLAGS)$(CONFIG_LIB_NI845X_LDFLAGS),) -PROGRAMFILES_X86 = $(shell env | sed -n "s/^PROGRAMFILES(X86)=//p") -ifneq ($(PROGRAMFILES_X86DIR),) -ifneq ($(PROGRAMFILES_X86DIR), ${PROGRAMFILES}) -NI854_X86_LIBRARY_PATH := '${PROGRAMFILES_X86}\National Instruments\NI-845x\MS Visual C' -endif -endif -endif - -CONFIG_NI845X_LIBRARY_PATH := '${PROGRAMFILES}\National Instruments\NI-845x\MS Visual C' -CONFIG_LIB_NI845X_CFLAGS := -I$(CONFIG_NI845X_LIBRARY_PATH) $(if NI854_X86_LIBRARY_PATH, -I${NI854_X86_LIBRARY_PATH}) -CONFIG_LIB_NI845X_LDFLAGS := -L$(CONFIG_NI845X_LIBRARY_PATH) $(if NI854_X86_LIBRARY_PATH, -L${NI854_X86_LIBRARY_PATH}) -lni845x +CONFIG_NI845X_LIBRARY_PATH := 'C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C' +CONFIG_LIB_NI845X_CFLAGS := -I$(CONFIG_NI845X_LIBRARY_PATH) +CONFIG_LIB_NI845X_LDFLAGS := -L$(CONFIG_NI845X_LIBRARY_PATH) -lni845x CONFIG_LIBJAYLINK_VERSION := $(call dependency_version, libjaylink) CONFIG_LIBJAYLINK_CFLAGS := $(call dependency_cflags, libjaylink) |