summarylogtreecommitdiffstats
path: root/openzwave-system-libs.patch
blob: 25525ce7b4ccd5b25084972ec2f9e3464f657fd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
diff -rupN open-zwave.orig/cpp/build/Makefile open-zwave/cpp/build/Makefile
--- open-zwave.orig/cpp/build/Makefile	2019-07-18 09:49:01.185154576 +0200
+++ open-zwave/cpp/build/Makefile	2019-07-18 09:58:36.413855845 +0200
@@ -23,7 +23,7 @@ DEBUG_LDFLAGS	:= -g
 
 #default Libraries we should link with
 ifneq ($(UNAME),FreeBSD)
-LIBS += -lresolv
+LIBS += -lresolv -ltinyxml
 endif
 
 top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../)
@@ -84,47 +84,19 @@ endif
 #where to put the temporary library
 LIBDIR	?= $(top_builddir)
 
-INCLUDES	:= -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/
+INCLUDES	:= -I $(top_srcdir)/cpp/src
 
 
 ifeq ($(USE_HID),1)
-INCLUDES += -I $(top_srcdir)/cpp/hidapi/hidapi/
+INCLUDES += -I /usr/include/hidapi/
 CFLAGS += -DUSE_HID
-
-ifeq ($(UNAME),Darwin)
-SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/mac
-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
-LIBS += -ludev
-endif
+LIBS += -ludev -lhidapi-libusb
 endif # USE_HID
 
-SOURCES		:= $(top_srcdir)/cpp/src $(top_srcdir)/cpp/src/command_classes $(top_srcdir)/cpp/tinyxml \
-	$(top_srcdir)/cpp/src/value_classes $(top_srcdir)/cpp/src/platform $(top_srcdir)/cpp/src/platform/unix $(SOURCES_HIDAPI) $(top_srcdir)/cpp/src/aes/
-VPATH = $(top_srcdir)/cpp/src:$(top_srcdir)/cpp/src/command_classes:$(top_srcdir)/cpp/tinyxml:\
-	$(top_srcdir)/cpp/src/value_classes:$(top_srcdir)/cpp/src/platform:$(top_srcdir)/cpp/src/platform/unix:$(SOURCES_HIDAPI):$(top_srcdir)/cpp/src/aes/
-
-tinyxml := $(notdir $(wildcard $(top_srcdir)/cpp/tinyxml/*.cpp))
-
-ifeq ($(USE_HID),1)
-ifeq ($(UNAME),Darwin)
-hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/mac/*.c))
-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
-endif # USE_HID
+SOURCES		:= $(top_srcdir)/cpp/src $(top_srcdir)/cpp/src/command_classes \
+	$(top_srcdir)/cpp/src/value_classes $(top_srcdir)/cpp/src/platform $(top_srcdir)/cpp/src/platform/unix $(top_srcdir)/cpp/src/aes/
+VPATH = $(top_srcdir)/cpp/src:$(top_srcdir)/cpp/src/command_classes:\
+	$(top_srcdir)/cpp/src/value_classes:$(top_srcdir)/cpp/src/platform:$(top_srcdir)/cpp/src/platform/unix:$(top_srcdir)/cpp/src/aes/
 
 ifeq ($(BITBAKE_ENV),1)
 ar_option := "rc"
@@ -147,8 +119,6 @@ printversion:
 	@echo "Building OpenZWave Version $(GITVERSION)"	
 
 
--include $(patsubst %.cpp,$(DEPDIR)/%.d,$(tinyxml))
--include $(patsubst %.c,$(DEPDIR)/%.d,$(hidapi))
 -include $(patsubst %.cpp,$(DEPDIR)/%.d,$(cclasses))
 -include $(patsubst %.cpp,$(DEPDIR)/%.d,$(vclasses))
 -include $(patsubst %.cpp,$(DEPDIR)/%.d,$(pform))
@@ -167,9 +137,7 @@ $(top_srcdir)/cpp/src/vers.cpp:
 
 #$(OBJDIR)/vers.o:	$(top_builddir)/vers.cpp
 
-$(LIBDIR)/libopenzwave.a:	$(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \
-			$(patsubst %.c,$(OBJDIR)/%.o,$(hidapi)) \
-			$(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \
+$(LIBDIR)/libopenzwave.a:	$(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \
 			$(patsubst %.cpp,$(OBJDIR)/%.o,$(cclasses)) \
 			$(patsubst %.cpp,$(OBJDIR)/%.o,$(vclasses)) \
 			$(patsubst %.cpp,$(OBJDIR)/%.o,$(pform)) \
@@ -179,9 +147,7 @@ $(LIBDIR)/libopenzwave.a:	$(patsubst %.c
 	@$(AR) $(ar_option) $@ $+
 	@$(RANLIB) $@
 
-$(LIBDIR)/$(SHARED_LIB_NAME):	$(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \
-			$(patsubst %.c,$(OBJDIR)/%.o,$(hidapi)) \
-			$(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \
+$(LIBDIR)/$(SHARED_LIB_NAME):	$(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \
 			$(patsubst %.cpp,$(OBJDIR)/%.o,$(cclasses)) \
 			$(patsubst %.cpp,$(OBJDIR)/%.o,$(vclasses)) \
 			$(patsubst %.cpp,$(OBJDIR)/%.o,$(pform)) \