File: 0001-Makefile.patch

package info (click to toggle)
openzwave-controlpanel 1.6~git20200306.4b8a39d-2
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 536 kB
  • sloc: cpp: 6,407; javascript: 1,415; makefile: 101; sh: 59
file content (71 lines) | stat: -rw-r--r-- 2,256 bytes parent folder | download
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
From: Dara Adib <daradib@ocf.berkeley.edu>
Date: Wed, 21 Dec 2016 16:55:01 -0500
Subject: Makefile

Upstream Makefile was configured to build on Mac OS X.

Changes:
 - Build against libraries packaged in Debian.
 - Omit indirect libraries to avoid useless dependencies.
 - Append some CFLAGS instead of defining all CFLAGS
   to allow hardening with Debian defaults.
---
 Makefile | 33 ++++++++++++++-------------------
 1 file changed, 14 insertions(+), 19 deletions(-)

Forwarded: not-needed
--- a/Makefile
+++ b/Makefile
@@ -17,11 +17,10 @@
 
 DEBUG_LDFLAGS	:= -g
 
-# Change for DEBUG or RELEASE
-CFLAGS	:= -c $(DEBUG_CFLAGS)
-LDFLAGS	:= $(DEBUG_LDFLAGS) -v
+CFLAGS += -c -Wall -Wno-unknown-pragmas -Wno-format -Wno-format-security
 
-LIBMICROHTTPD := -L/usr/local/lib/ -lmicrohttpd
+LIBMICROHTTPD := -lmicrohttpd
+LIBTINYXML := -ltinyxml
 
 # Remove comment below for gnutls support
 #GNUTLS := -lgnutls
@@ -42,24 +41,14 @@
 LIBUSB := -ludev
 endif
 
-# Check if library exists in either parrent directory or ../open-zwave
-OPENZWAVE := ..
-LIBZWAVE := $(wildcard $(OPENZWAVE)/$(LIBZWAVE_PAT))
-ifeq ($(LIBZWAVE),)
-  OPENZWAVE := ../open-zwave
-  LIBZWAVE := $(wildcard $(OPENZWAVE)/$(LIBZWAVE_PAT))
-  ifeq ($(LIBZWAVE),)
-    $(error OpenZWave library "$(LIBZWAVE_PAT)" not found in either .. or ../open-zwave folder)
-  endif
-endif
-$(info OpenZWave library found: $(LIBZWAVE))
+OPENZWAVE := /usr/include/openzwave
+LIBZWAVE := -lopenzwave
 
-LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) $(ARCH) -lresolv
+LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) $(LIBTINYXML) -pthread $(LIBUSB) $(ARCH) -lresolv
 
-INCLUDES := -I $(OPENZWAVE)/cpp/src -I $(OPENZWAVE)/cpp/src/command_classes/ \
-	-I $(OPENZWAVE)/cpp/src/value_classes/ -I $(OPENZWAVE)/cpp/src/platform/ \
-	-I $(OPENZWAVE)/cpp/src/platform/unix -I $(OPENZWAVE)/cpp/tinyxml/ \
-	-I /usr/local/include/
+INCLUDES := -I $(OPENZWAVE) -I $(OPENZWAVE)/command_classes \
+       -I $(OPENZWAVE)/value_classes -I $(OPENZWAVE)/platform \
+       -I $(OPENZWAVE)/platform/unix -I $(OPENZWAVE)/tinyxml
 
 %.o : %.cpp
 	$(CXX) $(CFLAGS) $(INCLUDES) -o $@ $<
@@ -80,4 +69,4 @@
 	rm -f ozwcp *.o
 
 # dummy target, for debugging Makefile
-dummy:
\ No newline at end of file
+dummy: