mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00
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>
This commit is contained in:
parent
751b16e56c
commit
f317a11ef1
16
Makefile
16
Makefile
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user