Skip to content

Commit

Permalink
Merge pull request #2263 from jimklimov/issue-build-without-usb
Browse files Browse the repository at this point in the history
Fix builds `--without-usb`
  • Loading branch information
jimklimov authored Jan 12, 2024
2 parents aeb0c3c + 2643359 commit 1450567
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ https://github.com/networkupstools/nut/milestone/10
* Set the `DesktopFileName` in `scripts/python/app/NUT-Monitor-py3qt5`,
this binds the application with the desktop file and allow the Desktop
implementation to display the proper icon and application name. [#2205]
* Original recipe for `apc_modbus` strictly required USB support even if
building NUT without it. [#2262]

- nut-usbinfo.pl, nut-scanner and libnutscan:
* USB VendorID:ProductID support list files generated by the script for
Expand Down
12 changes: 10 additions & 2 deletions drivers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,16 @@ generic_modbus_SOURCES = generic_modbus.c
generic_modbus_LDADD = $(LDADD_DRIVERS) $(LIBMODBUS_LIBS)
adelsystem_cbi_SOURCES = adelsystem_cbi.c
adelsystem_cbi_LDADD = $(LDADD_DRIVERS) $(LIBMODBUS_LIBS)
apc_modbus_SOURCES = apc_modbus.c $(LIBUSB_IMPL) hidparser.c usb-common.c
apc_modbus_LDADD = $(LDADD_DRIVERS) $(LIBMODBUS_LIBS) $(LIBUSB_LIBS)

# APC Modbus driver (with support of modbus over different media)
# Note that a version of libmodbus built with USB support is also needed
# for USB connections. Legacy versions work for Serial and TCP links.
apc_modbus_SOURCES = apc_modbus.c
apc_modbus_LDADD = $(LDADD_DRIVERS) $(LIBMODBUS_LIBS)
if WITH_USB
apc_modbus_SOURCES += $(LIBUSB_IMPL) hidparser.c usb-common.c
apc_modbus_LDADD += $(LIBUSB_LIBS)
endif

# Huawei UPS2000 driver
# (this is both a Modbus and a serial driver)
Expand Down

0 comments on commit 1450567

Please sign in to comment.