Make work on OSX.

This commit is contained in:
dg
2021-12-12 15:40:12 +00:00
parent 08615a5954
commit 05981ac46c
2 changed files with 10 additions and 7 deletions

View File

@@ -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

View File

@@ -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