aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2021-06-27 14:31:37 +0200
committerNico Huber <nico.h@gmx.de>2021-07-12 11:01:59 +0000
commitbe62deac889a546b854eb3d5057e18ed3f87b662 (patch)
treec23ea491240411d2f3a425c8c09c628dfdd23f7e /Makefile
parente0d889a0f0cf71c51eb49501d799f3f8df3e623e (diff)
downloadflashrom-be62deac889a546b854eb3d5057e18ed3f87b662.tar.gz
flashrom-be62deac889a546b854eb3d5057e18ed3f87b662.tar.bz2
flashrom-be62deac889a546b854eb3d5057e18ed3f87b662.zip
Makefile: Move $(NEED_LIBFTDI) block to similar ones
Change-Id: I27eae3803a114f332a6f0713cf9bc90163030e1b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/55871 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 3660459d..075eec6a 100644
--- a/Makefile
+++ b/Makefile
@@ -1005,16 +1005,6 @@ FEATURE_CFLAGS += -D'CONFIG_REALTEK_MST_I2C_SPI=1'
PROGRAMMER_OBJS += realtek_mst_i2c_spi.o
endif
-ifneq ($(NEED_LIBFTDI), )
-FTDILIBS := $(call debug_shell,[ -n "$(PKG_CONFIG_LIBDIR)" ] && export PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" ; $(PKG_CONFIG) --libs libftdi1 || $(PKG_CONFIG) --libs libftdi || printf "%s" "-lftdi -lusb")
-FEATURE_CFLAGS += $(call debug_shell,grep -q "FT232H := yes" .features && printf "%s" "-D'HAVE_FT232H=1'")
-FTDI_INCLUDES := $(call debug_shell,[ -n "$(PKG_CONFIG_LIBDIR)" ] && export PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" ; $(PKG_CONFIG) --cflags-only-I libftdi1)
-FEATURE_CFLAGS += $(FTDI_INCLUDES)
-FEATURE_LIBS += $(call debug_shell,grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)")
-# We can't set NEED_LIBUSB1 here because that would transform libftdi auto-enabling
-# into a hard requirement for libusb, defeating the purpose of auto-enabling.
-endif
-
ifeq ($(CONFIG_DUMMY), yes)
FEATURE_CFLAGS += -D'CONFIG_DUMMY=1'
PROGRAMMER_OBJS += dummyflasher.o
@@ -1219,6 +1209,16 @@ endif
endif
endif
+ifneq ($(NEED_LIBFTDI), )
+FTDILIBS := $(call debug_shell,[ -n "$(PKG_CONFIG_LIBDIR)" ] && export PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" ; $(PKG_CONFIG) --libs libftdi1 || $(PKG_CONFIG) --libs libftdi || printf "%s" "-lftdi -lusb")
+FEATURE_CFLAGS += $(call debug_shell,grep -q "FT232H := yes" .features && printf "%s" "-D'HAVE_FT232H=1'")
+FTDI_INCLUDES := $(call debug_shell,[ -n "$(PKG_CONFIG_LIBDIR)" ] && export PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" ; $(PKG_CONFIG) --cflags-only-I libftdi1)
+FEATURE_CFLAGS += $(FTDI_INCLUDES)
+FEATURE_LIBS += $(call debug_shell,grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)")
+# We can't set NEED_LIBUSB1 here because that would transform libftdi auto-enabling
+# into a hard requirement for libusb, defeating the purpose of auto-enabling.
+endif
+
ifneq ($(NEED_LIBJAYLINK), )
CHECK_LIBJAYLINK = yes
JAYLINKLIBS += $(call debug_shell,[ -n "$(PKG_CONFIG_LIBDIR)" ] && export PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)"; $(PKG_CONFIG) --libs libjaylink)