diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk index 78c6e10c58..b24d1eacf0 100644 --- a/package/openocd/openocd.mk +++ b/package/openocd/openocd.mk @@ -56,8 +56,14 @@ OPENOCD_DEPENDENCIES = \ $(if $(BR2_PACKAGE_LIBUSB),libusb) \ $(if $(BR2_PACKAGE_LIBUSB_COMPAT),libusb-compat) \ $(if $(BR2_PACKAGE_LIBHID),libhid) \ - $(if $(BR2_PACKAGE_HIDAPI),hidapi) \ - $(if $(BR2_PACKAGE_LIBGPIOD),libgpiod) + $(if $(BR2_PACKAGE_HIDAPI),hidapi) + +ifeq ($(BR2_PACKAGE_LIBGPIOD),y) +OPENOCD_DEPENDENCIES += libgpiod +OPENOCD_CONF_OPTS += --enable-linuxgpiod +else +OPENOCD_CONF_OPTS += --disable-linuxgpiod +endif # Adapters OPENOCD_CONF_OPTS += \