Commit Graph

18 Commits

Author SHA1 Message Date
Alan Ott
74440e2dbb FreeBSD: Add FreeBSD implementation.
This adds a FreeBSD implementation to HIDAPI using the libusb back-end. The
libusb/ folder now contains the libusb implementation and associated
Makefiles for Linux and FreeBSD. All libusb code has been removed from the
linux/ folder, so that the code in libusb/ can be shared by both (and
future) platforms.

This commit renames linux/hid-libusb.c to libusb/hid.c. Make sure to
use git log --follow to see full history of that file.

This code was written by:
 Alex Dupre <ale@FreeBSD.org>
 Alan Ott <alan@signal11.us>
2012-05-02 18:55:28 -04:00
Alan Ott
c30dfd8c97 Linux: add -lrt to link with librt.
This is required for some distributions but not others.
2012-05-02 14:42:26 -04:00
Frode Austvik
992fef24d5 Fixed a typo that made the shared libraries be empty. Added the hidtest-* binaries to the list of files ignored by git. 2012-03-29 18:53:08 -04:00
Alan Ott
59b9428199 Linux: Clean up Makefile
Create separate targets for libusb and hidraw implementations.
Build shared libraries in a more standard way.
Add Comments.
2012-03-28 17:58:30 -04:00
Frode Austvik
d0b493183e Linux: Added make targets for building shared libraries. 2012-03-28 17:06:48 -04:00
Paul Menzel
75bfadb04e linux/Makefile: Add spaces and lines for better readability 2011-08-26 18:08:45 -04:00
Paul Menzel
9b31061613 linux/Makefile: Add support for cross compilation
0. VDR`s `Makefile` was taken as a template [1].
1. Separate variables for flags for `CC` and `CXX` were introduced. `-c` is now passed explicitly. Further flags for `CXX` could be added like in VDR’s `Makefile`.
2. Separate variable `INCLUDES` defined which is only used for the libraries(?).

[1] http://git.gekrumbel.de/vdr.git?p=vdr.git;a=blob;f=Makefile;hb=bd61fee1e9328aec470c319494cccb90e53302c2
--
Please note that this is not build tested.
2011-08-26 18:08:45 -04:00
Paul Menzel
359138c8b6 linux/Makefile: Add $(LDFLAGS) to the linker calls
Some cross compiling frame works like OpenEmbedded [1] pass this variable along.

[1] http://www.openembedded.org/
2011-08-26 18:08:45 -04:00
Paul Menzel
ab3ba2e2a6 linux/Makefile: Do not override predefined CC or CXX
This is especially important for cross compilation.
2011-08-26 18:08:45 -04:00
Paul Menzel
ceb858109a linux/Makefile: Use $(CXX) instead of g++ 2011-08-26 18:08:45 -04:00
Ludovic Rousseau
49122c26d5 Append instead of overwrite CFLAGS
The user may have a custom CFLAGS with debug flags like -Wextra. These
flags should be used instead of overwritten
2011-01-07 10:17:39 -05:00
Ludovic Rousseau
02c55187a7 Use explicit file names
*.o does not match ../hidtest/hidtest.o so we must use an explicit list
of .o file names
2011-01-07 10:17:30 -05:00
Ludovic Rousseau
81382f21d8 Make "make clean" idempotent
Do not fail if the files to remove do not exist
2011-01-07 10:17:24 -05:00
Ludovic Rousseau
025d81a5a3 use pkg-config to find udev library 2010-11-21 16:18:09 -05:00
Ludovic Rousseau
b8ceae83b8 Do not ovewrite CFLAGS
Signed-off-by: Alan Ott <alan@signal11.us>
2010-10-08 22:07:13 -04:00
Alan Ott
28ab1e6ac1 Changed to use pkg-config 2010-08-17 22:50:31 -04:00
Alan Ott
461963e4b7 Libusb implementation for Linux. 2010-08-16 17:02:20 -04:00
Alan Ott
0782bc31f0 README and Makefile for Linux. 2010-07-03 15:26:16 -04:00