summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2019-04-05 15:08:35 +0200
committerNico Huber <nico.h@gmx.de>2019-07-10 18:59:55 +0000
commitb221cd7048f9cde1fe789e686a0e0adaf9a688b3 (patch)
tree9937847a661fbf7b83ee7d341daf59367d4d3a6e /Makefile
parentd2d3993a25c3236d397209f9c2118c3b17ce4f95 (diff)
downloadflashrom-b221cd7048f9cde1fe789e686a0e0adaf9a688b3.tar.gz
flashrom-b221cd7048f9cde1fe789e686a0e0adaf9a688b3.tar.bz2
flashrom-b221cd7048f9cde1fe789e686a0e0adaf9a688b3.zip
pickit2_spi: update to libusb1 and drop libusb0 dependency
TESTED: read, write, verify Change-Id: Icfc5372aa1789d35ed22d68297d5e68a74d40388 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/32213 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile51
1 files changed, 2 insertions, 49 deletions
diff --git a/Makefile b/Makefile
index 7a21d1244..545e84a70 100644
--- a/Makefile
+++ b/Makefile
@@ -690,15 +690,12 @@ $(foreach var, $(filter CONFIG_%, $(.VARIABLES)),\
$(eval $(var)=yes)))
endif
-# Disable feature groups
-ifeq ($(CONFIG_ENABLE_LIBUSB0_PROGRAMMERS), no)
-override CONFIG_PICKIT2_SPI = no
-endif
ifeq ($(CONFIG_ENABLE_LIBUSB1_PROGRAMMERS), no)
override CONFIG_CH341A_SPI = no
override CONFIG_DEDIPROG = no
override CONFIG_DIGILENT_SPI = no
override CONFIG_DEVELOPERBOX_SPI = no
+override CONFIG_PICKIT2_SPI = no
endif
ifeq ($(CONFIG_ENABLE_LIBPCI_PROGRAMMERS), no)
override CONFIG_INTERNAL = no
@@ -863,7 +860,7 @@ endif
ifeq ($(CONFIG_PICKIT2_SPI), yes)
FEATURE_CFLAGS += -D'CONFIG_PICKIT2_SPI=1'
PROGRAMMER_OBJS += pickit2_spi.o
-NEED_LIBUSB0 += CONFIG_PICKIT2_SPI
+NEED_LIBUSB1 += CONFIG_PICKIT2_SPI
endif
ifneq ($(NEED_LIBFTDI), )
@@ -1034,11 +1031,6 @@ endif
endif
-ifneq ($(NEED_LIBUSB0), )
-CHECK_LIBUSB0 = yes
-FEATURE_CFLAGS += -D'NEED_LIBUSB0=1'
-USBLIBS := $(call debug_shell,[ -n "$(PKG_CONFIG_LIBDIR)" ] && export PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" ; $(PKG_CONFIG) --libs libusb || printf "%s" "-lusb")
-endif
ifneq ($(NEED_LIBUSB1), )
CHECK_LIBUSB1 = yes
@@ -1190,23 +1182,6 @@ int main(int argc, char **argv)
endef
export PCI_GET_DEV_TEST
-define LIBUSB0_TEST
-#include "platform.h"
-#if IS_WINDOWS
-#include <lusb0_usb.h>
-#else
-#include <usb.h>
-#endif
-int main(int argc, char **argv)
-{
- (void) argc;
- (void) argv;
- usb_init();
- return 0;
-}
-endef
-export LIBUSB0_TEST
-
define LIBUSB1_TEST
#include <stddef.h>
#include <libusb.h>
@@ -1272,28 +1247,6 @@ ifeq ($(CHECK_LIBPCI), yes)
rm -f .test.c .test.o .test$(EXEC_SUFFIX); exit 1; }; }; } 2>>$(BUILD_DETAILS_FILE); echo $? >&3 ; } | tee -a $(BUILD_DETAILS_FILE) >&4; } 3>&1;} | { read rc ; exit ${rc}; } } 4>&1
@rm -f .test.c .test.o .test$(EXEC_SUFFIX)
endif
-ifeq ($(CHECK_LIBUSB0), yes)
- @printf "Checking for libusb-0.1/libusb-compat headers... " | tee -a $(BUILD_DETAILS_FILE)
- @echo "$$LIBUSB0_TEST" > .test.c
- @printf "\nexec: %s\n" "$(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o" >>$(BUILD_DETAILS_FILE)
- @{ { { { { $(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >&2 && \
- echo "found." || { echo "not found."; echo; \
- echo "The following features require libusb-0.1/libusb-compat: $(NEED_LIBUSB0)."; \
- echo "Please install libusb-0.1 headers or libusb-compat headers or disable all features"; \
- echo "mentioned above by specifying make CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=no"; \
- echo "See README for more information."; echo; \
- rm -f .test.c .test.o; exit 1; }; } 2>>$(BUILD_DETAILS_FILE); echo $? >&3 ; } | tee -a $(BUILD_DETAILS_FILE) >&4; } 3>&1;} | { read rc ; exit ${rc}; } } 4>&1
- @printf "Checking if libusb-0.1 is usable... " | tee -a $(BUILD_DETAILS_FILE)
- @printf "\nexec: %s\n" "$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USBLIBS)" >>$(BUILD_DETAILS_FILE)
- @{ { { { { $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USBLIBS) >&2 && \
- echo "yes." || { echo "no."; \
- echo "The following features require libusb-0.1/libusb-compat: $(NEED_LIBUSB0)."; \
- echo "Please install libusb-0.1 or libusb-compat or disable all features"; \
- echo "mentioned above by specifying make CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=no"; \
- echo "See README for more information."; echo; \
- rm -f .test.c .test.o .test$(EXEC_SUFFIX); exit 1; }; } 2>>$(BUILD_DETAILS_FILE); echo $? >&3 ; } | tee -a $(BUILD_DETAILS_FILE) >&4; } 3>&1;} | { read rc ; exit ${rc}; } } 4>&1
- @rm -f .test.c .test.o .test$(EXEC_SUFFIX)
-endif
ifeq ($(CHECK_LIBUSB1), yes)
@printf "Checking for libusb-1.0 headers... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$LIBUSB1_TEST" > .test.c