mirror of
https://github.com/Fishwaldo/open-zwave.git
synced 2025-03-15 11:31:40 +00:00
Support building on SmartOS
This commit is contained in:
parent
8bbcfb2579
commit
5d9d109e8b
4 changed files with 19 additions and 1 deletions
|
@ -60,6 +60,9 @@ endif
|
|||
else ifeq ($(UNAME),NetBSD)
|
||||
CFLAGS += -I/usr/pkg/include/libusb-1.0
|
||||
LDFLAGS+= -shared -L/usr/pkg/lib -lusb-1.0 -Wl,-rpath=/usr/pkg/lib
|
||||
else ifeq ($(UNAME),SunOS)
|
||||
CFLAGS+= -I$(PREFIX)/include/libusb-1.0
|
||||
LDFLAGS+= -shared -lusb-1.0 -liconv
|
||||
else
|
||||
LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB_NAME)
|
||||
LIBS += -ludev
|
||||
|
@ -77,6 +80,8 @@ else ifeq ($(UNAME),FreeBSD)
|
|||
SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/libusb
|
||||
else ifeq ($(UNAME),NetBSD)
|
||||
SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/libusb
|
||||
else ifeq ($(UNAME),SunOS)
|
||||
SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/libusb
|
||||
else
|
||||
SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/linux
|
||||
endif
|
||||
|
@ -95,6 +100,8 @@ else ifeq ($(UNAME),FreeBSD)
|
|||
hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/libusb/*.c))
|
||||
else ifeq ($(UNAME),NetBSD)
|
||||
hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/libusb/*.c))
|
||||
else ifeq ($(UNAME),SunOS)
|
||||
hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/libusb/*.c))
|
||||
else
|
||||
hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/linux/*.c)) # we do not want the libusb version
|
||||
endif
|
||||
|
|
|
@ -55,6 +55,8 @@ endif
|
|||
|
||||
else ifeq ($(UNAME),NetBSD)
|
||||
LDFLAGS+= -L/usr/pkg/lib -lusb-1.0
|
||||
else ifeq ($(UNAME),SunOS)
|
||||
LDFLAGS+= -lusb-1.0
|
||||
endif
|
||||
|
||||
$(OBJDIR)/MinOZW: $(patsubst %.cpp,$(OBJDIR)/%.o,$(minozwsrc))
|
||||
|
|
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#define LOG(...) do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#if defined(__NetBSD__) || defined(__sun)
|
||||
#define ICONV_CONST const
|
||||
#else
|
||||
#define ICONV_CONST
|
||||
|
|
|
@ -38,6 +38,15 @@
|
|||
#include <libudev.h>
|
||||
#endif
|
||||
|
||||
#ifdef __sun
|
||||
// SunOS doesn't have the cfsetspeed convenience function.
|
||||
int
|
||||
cfsetspeed(struct termios *tios, speed_t speed)
|
||||
{
|
||||
return (cfsetispeed(tios, speed) || cfsetospeed(tios, speed));
|
||||
}
|
||||
#endif
|
||||
|
||||
using namespace OpenZWave;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue