16 Commits

Author SHA1 Message Date
Sean McBride
6bd5658dd7 darwin: Configure Xcode project to specify tab/space, indent amount
All source files are now tagged as using tabs of 4 spaces, except
darwin_usb.c and darwin_usb.h which use spaces of 2 spaces. This allows
editing files in Xcode without it messing up any particular files.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-08 10:25:13 -08:00
Chris Dickens
068b594306 core: Remove use of gettimeofday()
Prior to this commit, gettimeofday() was being used for timestamps
in debug messages. This function has been marked as deprecated in
the latest POSIX specification and furthermore is not supported on
Windows, thus requiring our own implementation as usbi_gettimeofday().

This commit changes the logging code to obtain timestamps using the
clock_gettime() function provided by the backend. The implementation of
usbi_gettimeofday() for Windows was actually equivalent to that of the
USBI_CLOCK_REALTIME implementation for clock_gettime(), so this
eliminates code duplication. In addition, the USBI_CLOCK_REALTIME
implementation has been updated for Windows to leverage the
timespec_get() function available in VS 2015 and later.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-01-12 15:03:16 -08:00
Ludovic Rousseau
79cc25a0a0 darwin: build hotplugtest sample in Xcode
The Xcode project now also builds the hotplugtest (from examples/hotplugtest.c)
target.
2016-03-06 13:37:14 +01:00
Ludovic Rousseau
58bf25b274 darwin: change Xcode project end-of-line
The end of line character was CR (0x0D) instead of NL (0x0A).

It looks like the mistake is from
1eff220474
2015-01-25 13:56:16 +01:00
Sean McBride
7200c567ea Use @rpath in Xcode project
In the Xcode project, set:

LD_DYLIB_INSTALL_NAME = @rpath

Such that the built dylib's install name uses rpath, which is
generally what one wants.
2014-05-06 01:28:08 -06:00
Sean McBride
25e8276597 Removed obsolete comment related to libusbx fork 2014-03-21 21:43:46 -06:00
Sean McBride
8619aed909 Enabled LTO optimization in release in Xcode project 2014-03-21 21:43:40 -06:00
Sean McBride
388a8f7afd Enabled additional warnings in Xcode project 2014-03-21 21:43:12 -06:00
hjelmn@cs.unm.edu
1eff220474 Misc: Revert all references to libusb/libusb.info 2014-01-08 23:51:01 +00:00
Sean McBride
4cb9ae0c22 fixed link errors by adding missing files to Xcode project 2013-07-30 10:44:21 -06:00
Sean McBride
8f13c72409 make targets for examples depend on library target. Generate library named libusb-1.0.0.dylib not libusbx.dylib. Added several xcconfig files to make source control and documentation easier. Reorganised a few files' positions within the project. Disable strict aliasing since libusbx breaks strict aliasing rules anyway. Set project format as 3.1-compatible.
Conflicts:
	Xcode/libusbx.xcodeproj/project.pbxproj
2013-07-30 10:43:34 -06:00
Ludovic Rousseau
059e648ab9 Xcode: build for 32 and 64 bits 2013-07-30 10:42:48 -06:00
Ludovic Rousseau
bd57a42aba Xcode: remove implicit/default configuration 2013-07-30 10:42:31 -06:00
Ludovic Rousseau
a0d7a89c33 Add minimal config.h for Xcode
Xcode do not use ./configure so the config.h file needs to be generated
by hand.
This config.h is the minimal file for libusbx built using Xcode.
2013-07-30 10:41:44 -06:00
Ludovic Rousseau
b11f8e08e0 Adapt Xcode project to the new paths 2013-07-30 10:41:24 -06:00
Ludovic Rousseau
1640bf7f95 Move Xcode project in Xcode/ directory
This is to use Xcode special config.h file in a independent directory.
The same is already done for MS Visual C with msvc/ directory.
2013-07-30 10:40:52 -06:00