Anastasia Klimchuk has submitted this change. ( https://review.coreboot.org/c/flashrom/+/75234?usp=email )
(
4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Makefile: Simplify the NI-845X detection ......................................................................
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 --- M Makefile 1 file changed, 3 insertions(+), 13 deletions(-)
Approvals: build bot (Jenkins): Verified Miklós Márton: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve Alexander Goncharov: Looks good to me, but someone else must approve Stefan Reinauer: Looks good to me, approved
diff --git a/Makefile b/Makefile index 5827cab..bc3eecb 100644 --- a/Makefile +++ b/Makefile @@ -211,19 +211,9 @@ 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)