Commit graph

31 commits

Author SHA1 Message Date
Tormod Volden
43db4d97d7 .gitignore: Ignore test binaries and logs
Closes #1370

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2023-12-09 10:38:56 +01:00
Ingvar Stepanyan
fd315026f4 Add WebUSB testing via node-usb 2023-11-30 11:52:26 +01:00
Sonatique
285b292d73 msvc: Add configurations with /MT compilation flag
Allows statically linking vc++ runtime dependencies inside libusb-1.0
Windows libraries.

'Release' and 'Debug' configurations produce /MD compiled binaries while
the new 'Release-MT' and 'Debug-MT" configurations produce /MT compiled
binaries.

The /MT flag causes the application to include the multithread, static
version of the vc++ run-time library, whereas the default flag /MD will
cause the vc++ run-time library to be dynamically linked run-time. Using
/MT thus builds a standalone libusb DLL that doesn't require a vc++
runtime DLL to be shipped along with it.

For the official description of /MT see:
https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library

Closes #1188
2023-01-18 13:45:23 +01:00
Nathan Hjelm
17bf45baee Add tags and cscope.out to .gitignore
Fixes #1061

Signed-off-by: Nathan Hjelm <hjelmn@google.com>
2023-01-09 21:15:50 -07:00
Sylvain
f2fd5bb6a3 git ignore "build" folder
Fixed #1203

Signed-off-by: Nathan Hjelm <hjelmn@google.com>
2023-01-09 20:48:08 -07:00
Ingvar Stepanyan
ff8fe9397d Add Emscripten backend for WebAssembly + WebUSB support
Fixes #501
Closes #1057
2022-06-26 20:44:54 +02:00
Chris Dickens
9d23ed25b4 build: Fix Android and Xcode compilation errors/warnings
Commit f69548c3b3 ("examples: Enable all examples to build on all
platforms") modified dpfp and sam3u_benchmark to be buildable on any
platform, however there were some oversights and regressions introduced
for Android and Xcode.

Update the Android and Xcode build files to account for the removal of
dpfp_threaded.c as well as the inclusion of config.h from examples
and/or tests source.

Additionally switch the threaded version of dpfp to use sem_open()
instead of sem_init() as the latter is in fact deprecated on MacOS.

Closes #808

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2020-11-16 13:03:52 -08:00
Chris Dickens
09d0312fbb Xcode: Update project file
Add '-fvisibility=hidden' to the additional compiler flags of the libusb
target so that internal library symbols are hidden.

Add '-pthread' to the additional compiler flags of the targets that
directly use pthread functionality

Add the 'sam3u_benchmark' and 'testlibusb' targets so that all examples
are now built and fix build warnings that occur when building
'sam3u_benchmark'.

Fix target dependencies so that all targets are able to build without
issues.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2020-03-30 16:53:43 -07:00
Chris Dickens
4a5540a925 autotools: Fix a number of issues
Change the name of the project to be what it actually is called
everywhere: libusb-1.0. This allows the public libusb.h header file to
be tracked by automake through pkginclude_HEADERS.

Decouple the doc directory from automake. There aren't any targets that
automake understands, so the build uselessly recurses into the directory.
Update the makefile targets with the correct dependencies so that the
docs aren't regenerated unnecessarily. Update the doxygen config file to
include the version, exclude irrelevant source files and create the
output into 'api-1.0' instead of 'html'. Also fix a deprecation tag for
the libusb_get_port_path() function and add Solaris to the list of
supported platforms.

Fix the 'dist' target. Clean up the README file to remote the GitHub
Markdown and remove the .gitattributes file from the msvc directory.
Add doc/libusb.png to EXTRA_DIST.

Enhance the {dist,doc}-upload targets to look at the SF_USER environment
variable to get the SourceForge username. This allows maintainers (like
me!) to have a local username that is different from their SourceForge
username. Switch the docs-upload recipe to use rsync with --delete to
clean up obsolete files.

Fix the Windows shared library (DLL) targets. The dependencies for the
RC file were incorrect, leading to cases of missed recompilation. The
'all' rule should not be overridden, so define an 'all-local' rule when
necessary. Fix the rule for running dlltool on the just generated DLL so
that it only fires when the correct dependencies change and do not
bother to run the rule when not building a DLL.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2020-03-25 00:09:26 -07:00
Chris Dickens
de4a59af87 Misc: Clean up Visual Studio project files
Commit a9b34d170a ("Adding support for ARM & ARM64 Windows Platform")
introduced a dependency on a particular version of the Windows 10 SDK
for *all* platforms. This is particularly annoying for most users who
will only be building for Windows. Fix this by specifying the SDK
dependency only for the ARM/ARM64 platforms and bump to the latest.

Commit 77037c4dd6 ("Adds /utf-8 to compile options") added this compiler
option to all versions of the Visual Studio project files. This results
in a number of warnings with the older versions that don't recognize
this option. Fix this by keeping this option only for 2015 and newer.

Explicitly specify library dependencies for non-static targets. With a
small change in the UsbDk backend we can completely remove all
depenencies other than kernel32.lib.

Lastly, remove the 'MinimalRebuild' option for 2015 and newer project
files as this option is now deprecated and results in a warning for each
project.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2020-01-21 15:38:56 -08:00
Sean McBride
3bffd5ca31 Added some Xcode-related items to .gitignore
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-08 10:25:45 -08:00
Andy McFadden
b06b4d101b git: Don't ignore platform config.h
The android and Xcode config.h headers were being ignored.
2017-03-31 08:54:21 +02:00
Chris Dickens
9462d1561d .gitignore: Add some new entries
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-02-20 00:24:51 -08:00
Chris Dickens
96f8273c5e Windows: Add Visual Studio 2017 support
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-01-06 10:59:43 -08:00
Chris Dickens
c5c4c7cba7 Misc: Add .amend to .gitignore
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2016-05-29 19:19:51 -07:00
Andrew Fernandes
650e22508f Android: Build for all Android architectures
* Don't limit support to ARM only (adds MIPS support)
* Also add a workaround for a MIPS NDK linker bug
* Also add a gitignore entry required to run bootstrap.sh on OS X
* Closes #134
2013-12-28 22:58:06 +00:00
Joshua Blake
805cc3ec40 Windows: Add Visual Studio 2013 solution files
* Also update gitignore
* Closes #162
2013-12-13 00:52:54 +00:00
Peter Stuge
f51b19db34 examples: Add sam3u_benchmark isochronous example by Harald Welte
Copied with the author's permission under LGPL-2.1 from
usb-benchmark-project/host/benchmark.c in
git://git.gnumonks.org/sam3u-tests.git commit
74959f7ee88f1597286cd435f312a8ff52c56b7e

http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=sam3u-tests.git;a=blob;f=usb-benchmark-project/host/benchmark.c;h=74959f7ee88f1597286cd435f312a8ff52c56b7e

An Atmel SAM3U test firmware is also available in the above repository.

Conflicts:
	.gitignore

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-30 14:21:00 +02:00
Nathan Hjelm
7801ff94fa Add hotplug support.
The internal API is changing as follows:
 - Adding two new functions. usbi_connect_device, and usbi_disconnect_device.
   Backends must call these functions to add them to the context's device list
   at one of two places: initial enumeration (done at init), and on device
   attach and removal. These functions need to be called once per context.
 - Backends that support hotplug should not provide a get_device_list funtion.
   This function is now deprecated and will likely be removed once all backends
   support hotplug.

The external API is changing as follows:
 - Two new functions have been added to register and deregister callbacks for
   hotplug notification: libusb_hotplug_register_callback(),
   libusb_hotplug_deregister_callback(). Hotplug callbacks are called by
   libusb_handle_events(). Details of the new API can be found in libusb.h.
 - A new capability check has been added to check for hotplug support. See
   LIBUSB_CAP_HAS_HOTPLUG.

Aa suggested by Xiaofan add new example has been added to show how to use
the new external hotplug API. See examples/hotplugtest.c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-15 17:28:06 +02:00
Pete Batard
2948008951 Fixup .gitignore for examples and tests now living in subdirs
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-15 17:20:01 +02:00
Toby Gray
5bdea90cfe WinCE: Add support for WinCE (Solution files) 2013-01-23 00:41:00 +00:00
Toby Gray
21cf6e4748 Tests: Add libusbx stress test
See https://github.com/tobygray/libusbx/tree/testing as well
as http://libusbx.1081486.n5.nabble.com/Libusbx-devel-Crashes-tt433.html#a438
2012-11-25 01:32:59 +00:00
Pete Batard
c581017c2c Autotools: Fix make distcheck and add ChangeLog 2012-03-30 13:16:50 +01:00
Pete Batard
743fd77dcb Examples: add xusb sample
* Also improvements to WDK build scripts:
  cd to original dir on error, use 2 cores if available
2012-03-28 00:31:50 +01:00
Peter Stuge
4afbc78fe0 Rename the lsusb example program to listdevs
This is intended to reduce confusion with the much more significant
lsusb utility which is part of the usbutils package.
2012-02-08 15:59:11 +01:00
Peter Stuge
384a528ed7 Tidy .gitignore a little
There's no xusb, we need a glob pattern for matching .exe files, and
fpusb tarballs aren't very common in the libusb source dir.
2011-10-17 16:25:50 +02:00
Peter Stuge
51af85d03a .gitignore: Add m4 subdirectory created by libtool 2011-06-13 22:06:31 +02:00
Pete Batard
c1e7543141 Windows: MS project files part 1 - support files & preliminaries
* adds the MSVC support files used by MSVC6, VS2005 and WDK
* also adds missing defines required by MS compilers in libusb.h
* also anticipatory sets .gitattributes for CRLF handling
* also adds manually maintained .def file for import lib generation

References #57.
2011-06-13 22:06:30 +02:00
Michael Plante
a2fa855ce3 added doxygen, dpfp, msvc, and xusb stuff to gitignore 2010-05-31 20:02:38 -05:00
Daniel Drake
ead09cde68 API documentation
Hopefully mostly complete. Some constants were renamed and move into
enums.
2008-03-20 21:19:45 +00:00
Daniel Drake
852bba4754 Initial commit
Basic library structure which supports enumerating detected USB devices
2007-12-02 22:54:59 +00:00