Thomas Heijligen has uploaded this change for review.
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>
---
M Makefile
1 file changed, 22 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/34/75234/1
diff --git a/Makefile b/Makefile
index da5203e..c2fc605 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)
To view, visit change 75234. To unsubscribe, or for help writing mail filters, visit settings.