mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Make work on OSX.
This commit is contained in:
11
Makefile
11
Makefile
@@ -1,4 +1,4 @@
|
||||
PACKAGES = zlib sqlite3 protobuf libudev
|
||||
PACKAGES = zlib sqlite3 protobuf
|
||||
|
||||
export CFLAGS = \
|
||||
-ffunction-sections -fdata-sections
|
||||
@@ -14,6 +14,14 @@ export LDOPTFLAGS = -Os
|
||||
export CDBGFLAGS = -O0 -g
|
||||
export LDDBGFLAGS = -O0 -g
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
else
|
||||
ifeq ($(shell uname),Darwin)
|
||||
else
|
||||
PACKAGES += libudev
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
export PROTOC = /mingw32/bin/protoc
|
||||
export CC = /mingw32/bin/gcc
|
||||
@@ -50,6 +58,7 @@ RANLIB += -c -no_warning_for_no_symbols
|
||||
export CC = clang
|
||||
export CXX = clang++
|
||||
export COBJC = clang
|
||||
export LDFLAGS += -framework IOKit -framework CoreFoundation
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "libusbp.hpp"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#define TIMEOUT 5000
|
||||
#define MAX_TRANSFER (32*1024)
|
||||
|
||||
/* Hacky: the board always operates in little-endian mode. */
|
||||
@@ -70,11 +69,6 @@ public:
|
||||
_interface(_device, 0, false),
|
||||
_handle(_interface)
|
||||
{
|
||||
_handle.set_timeout(FLUXENGINE_CMD_OUT_EP, TIMEOUT);
|
||||
_handle.set_timeout(FLUXENGINE_CMD_IN_EP, TIMEOUT);
|
||||
_handle.set_timeout(FLUXENGINE_DATA_OUT_EP, TIMEOUT);
|
||||
_handle.set_timeout(FLUXENGINE_DATA_IN_EP, TIMEOUT);
|
||||
|
||||
int version = getVersion();
|
||||
if (version != FLUXENGINE_VERSION)
|
||||
Error() << "your FluxEngine firmware is at version " << version
|
||||
|
||||
Reference in New Issue
Block a user