owfs: make libow features configurable
authorMarcin Jurkowski <marcin1j@gmail.com>
Wed, 6 Mar 2013 09:31:17 +0000 (09:31 +0000)
committerMarcin Jurkowski <marcin1j@gmail.com>
Mon, 31 Aug 2015 23:20:27 +0000 (01:20 +0200)
commitd6fe15a85c4690f34a73af77c6cf6f316acf75b6
treef1152e5b90dfae4e07aaa6c5b491b9a26db734c7
parent7000746a30d6136a178e3a4f0a4ecf60b569b51d
owfs: make libow features configurable

Owfs shared library is quite large (700+ kB) by embedded devices standards.
The code for many different bus master and slave devices is compiled
into single big .so library. Had it been designed as modular,
dynamic-loadable plugins, we could split them into separate packages,
allowing user to install only the plugins he needs.

It's however possible to enable or disable libow features at compile time.
Here are some examples how much space can be saved turning off support for
unneeded devices and features:
 - By disabling USB adapter support libusb and libusb-compat is no
   longer needed, saving ~70kB of space. Bus masters using usbserial.ko
   kernel driver don't need this.
 - By disabling debug messages it's possible to reduce shared library
   size by 130kB.

This patch adds a menu allowing user to select libow features one wants
built in:
 - Bus master support: USB adapters through libusb, i2c adapters, kernel w1
   adapters
 - General features: zeroconf device announcement, debug messages, owtraffic
   bus reports
Default config options preserve previous library configuration i.e.
everything is selected except for owtraffic (which was disabled) and
kernel w1 driver (whose netlink interface has been broken since 2011).

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
utils/owfs/Config.in [new file with mode: 0644]
utils/owfs/Makefile