mirror of
https://github.com/Fishwaldo/open-zwave.git
synced 2025-07-09 22:49:10 +00:00
fixed issue 350 - FreeBSD Support
This commit is contained in:
parent
67725ac732
commit
7232ac5533
6 changed files with 36 additions and 1 deletions
|
@ -15,6 +15,7 @@ Version 1.3
|
|||
- Standardize some of the Logging Messages so its easier to parse (Justin)
|
||||
- Implemented Issue 325 - Add a GetChangeVerfied method to the Manager and Value classes to
|
||||
determine if a Value is checked upon refresh from a device (Justin)
|
||||
- Fixed issue 350 - FreeBSD Makefile updates and a few patches (Justin)
|
||||
|
||||
Version 1.2
|
||||
- Released on 15/10/14
|
||||
|
|
|
@ -30,7 +30,13 @@ CFLAGS += -c -DDARWIN -arch i386 -arch x86_64
|
|||
LDFLAGS += -arch i386 -arch x86_64
|
||||
LIBS += -framework IOKit -framework CoreFoundation -arch i386 -arch x86_64
|
||||
else ifeq ($(UNAME),FreeBSD)
|
||||
|
||||
# FreeBSD 10 has native iconv.h; for older, we look in /usr/local, and libiconv must be installed from ports.
|
||||
ifeq (,$(wildcard /usr/include/iconv.h))
|
||||
CFLAGS += -I/usr/local/include
|
||||
endif
|
||||
LDFLAGS+= -lusb
|
||||
|
||||
else
|
||||
LDFLAGS += -Wl,-soname,libopenzwave.so.$(VERSION)
|
||||
LIBS += -ludev
|
||||
|
@ -144,6 +150,10 @@ $(top_builddir)/Doxyfile: $(top_srcdir)/docs/Doxyfile.in
|
|||
-e 's|[@]TOPSRC_DIR@|$(top_srcdir)|g' \
|
||||
< "$<" > "$@"
|
||||
|
||||
# If we dont have DOT, we will fail building doxygen
|
||||
ifeq ($(DOT),)
|
||||
undefine DOXYGEN
|
||||
endif
|
||||
|
||||
ifeq ($(DOXYGEN),)
|
||||
doc:
|
||||
|
|
|
@ -15,6 +15,8 @@ SVNVERSION := $(shell which svnversion)
|
|||
UNAME := $(shell uname -s)
|
||||
#the location of Doxygen to generate our api documentation
|
||||
DOXYGEN := $(shell which doxygen)
|
||||
#dot is required for doxygen (part of Graphviz)
|
||||
DOT := $(shell which dot)
|
||||
#the machine type we are building on (i686 or x86_64)
|
||||
MACHINE := $(shell uname -m)
|
||||
#the location of xmllink for checking our config files
|
||||
|
@ -38,9 +40,16 @@ endif
|
|||
VERSION := $(VERSION_MAJ).$(VERSION_MIN)
|
||||
|
||||
# support Cross Compiling options
|
||||
ifeq ($(UNAME),FreeBSD)
|
||||
# Actually hide behind c++ which works for both clang based 10.0 and earlier(?)
|
||||
CC := $(CROSS_COMPILE)cc
|
||||
CXX := $(CROSS_COMPILE)c++
|
||||
LD := $(CROSS_COMPILE)c++
|
||||
else
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
LD := $(CROSS_COMPILE)g++
|
||||
endif
|
||||
ifeq ($(UNAME),Darwin)
|
||||
AR := libtool -static -o
|
||||
RANLIB := ranlib
|
||||
|
|
|
@ -37,6 +37,15 @@ ifeq ($(UNAME),Darwin)
|
|||
CFLAGS += -DDARWIN
|
||||
endif
|
||||
|
||||
# Dup from main makefile, but that is not included when building here..
|
||||
ifeq ($(UNAME),FreeBSD)
|
||||
ifeq (,$(wildcard /usr/include/iconv.h))
|
||||
CFLAGS += -I/usr/local/include
|
||||
LDFLAGS+= -L/usr/local/lib -liconv
|
||||
endif
|
||||
LDFLAGS+= -lusb
|
||||
endif
|
||||
|
||||
$(OBJDIR)/MinOZW: $(patsubst %.cpp,$(OBJDIR)/%.o,$(minozwsrc))
|
||||
@echo "Linking $(OBJDIR)/MinOZW"
|
||||
$(LD) $(LDFLAGS) -o $@ $< $(LIBS) -pthread
|
||||
|
|
|
@ -61,6 +61,9 @@ extern "C" {
|
|||
|
||||
#ifndef __FreeBSD__
|
||||
#define DETACH_KERNEL_DRIVER
|
||||
#else
|
||||
/* Get __FreeBSD_version */
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
/* Uncomment to enable the retrieval of Usage and Usage Page in
|
||||
|
@ -249,7 +252,7 @@ static int get_usage(uint8_t *report_descriptor, size_t size,
|
|||
}
|
||||
#endif /* INVASIVE_GET_USAGE */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#ifdef defined(__FreeBSD__) && __FreeBSD_version < 1000000
|
||||
/* The FreeBSD version of libusb doesn't have this funciton. In mainline
|
||||
libusb, it's inlined in libusb.h. This function will bear a striking
|
||||
resemblence to that one, because there's about one way to code it.
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
#define _Value_H
|
||||
|
||||
#include <string>
|
||||
#ifdef __FreeBSD__
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include "Defs.h"
|
||||
#include "platform/Ref.h"
|
||||
#include "value_classes/ValueID.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue