* remove custom homebrew tap - uhubctl is included in homebrew core now.
* remove bitbake recipe - it does not seem to be used for years now,
and it should not have been committed in first place.
* add `installing` paragraph to readme. since most relevant OS include uhubctl
in standard package managers now, most people don't want to compile it,
but instead know how to install it quickly.
* update short links to not use bit.ly as it became very spammy now.
* update few expired links to point to archive.org cache.
* add `all` target to Makefile (FreeBSD ports want `all` target to always exist).
Fixed all warnings when compiling with `c++ -std=c++11 ...`:
* bzero() appears to be deprecated, replaced with memset()
* fixed few const warnings
* suppressed zero array warnings (emitted by libusb headers)
* No need to check for both __gnu_linux__ and __linux__, latter is enough.
* Require libusb 1.0.13 to build - this makes LIBUSB_API_VERSION always defined.
* Include `<libusb.h>` not `<libusb-1.0/libusb.h>` - this will always work
if `pkg-config` is detected. For backwards compatibility still try building
without `pkg-config` present, but it is much less reliable and will not work on Mac.
* Bump copyright year.
Homebrew is forcing `--no-tags` for cloned repos.
Because we used `git describe --always` brew was choosing raw commit id as version, which is quite bad.
By removing `--always` we will use contents of VERSION file as a backup.
Remove custom handling for different platforms for CFLAGS and LDFLAGS
and prefer using pkg-config when available.
However, this is tested to still build ok on Linux on Mac howebrew
even if pkg-config is not available.
Closes#292, should also simplify issues raised by #142, #147, #289 and 5db248771e.
This adds support to be able to build and use uhubctl on NetBSD by using pkg-config to get proper CFLAGS and LDFLAGS.
Perhaps we should use pkg-config universally across all platforms,
but I don't want to potentially break support for existing plaftorms
because pkg-config does not seem to be unconditionally available everywhere.
This fixes issue #100.
We prefer to determine version from git tags (using git describe).
However, sometimes people don't use git or don't have it installed,
which leads to empty version used.
To solve this, we use version from VERSION file as a backup.
Add cross-compile functionality to the Makefile and add an "install"
target. This makes uhubctl "Yocto Project Compatible".
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>