aboutsummaryrefslogtreecommitdiffstats
path: root/testing/open-zwave-control-panel/makefile.patch
blob: 5baea5a4cad0a735749ce7e12878fa5de717f354 (plain) (blame)
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
--- ./Makefile
+++ ./Makefile.new
@@ -13,59 +13,45 @@
 RANLIB := $(CROSS_COMPILE)ranlib
 
 DEBUG_CFLAGS    := -Wall -Wno-unknown-pragmas -Wno-inline -Wno-format -g -DDEBUG -ggdb -O0
-RELEASE_CFLAGS  := -Wall -Wno-unknown-pragmas -Werror -Wno-format -O3 -DNDEBUG
+RELEASE_CFLAGS  := -Wall -Wno-unknown-pragmas -Wno-format -O3 -DNDEBUG
 
 DEBUG_LDFLAGS	:= -g
 
 # Change for DEBUG or RELEASE
-CFLAGS	:= -c $(DEBUG_CFLAGS)
-LDFLAGS	:= $(DEBUG_LDFLAGS)
+CFLAGS	:= -c $(RELEASE_CFLAGS)
+LDFLAGS	:= $(RELEASE_CFLAGS)
 
-OPENZWAVE := ../open-zwave/
-LIBMICROHTTPD := -L/usr/local/lib/ -lmicrohttpd
+OPENZWAVE := /usr/include/openzwave
+LIBMICROHTTPD := -L/usr/lib/ -lmicrohttpd
 
-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/ \
+	-I /usr/include/
 
 # Remove comment below for gnutls support
-#GNUTLS := -lgnutls
+GNUTLS := -lgnutls
 
 # for Linux uncomment out next three lines
 LIBZWAVE := $(wildcard $(OPENZWAVE)/*.a)
-#LIBUSB := -ludev
-#LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) -lresolv
+LIBUSB := -ludev
+LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) -lresolv -ltinyxml -lopenzwave
 
-# for Mac OS X comment out above 2 lines and uncomment next 5 lines
-#ARCH := -arch i386 -arch x86_64
-#CFLAGS += $(ARCH)
-#LIBZWAVE := $(wildcard $(OPENZWAVE)/cpp/lib/mac/*.a)
-LIBUSB := -framework IOKit -framework CoreFoundation
-LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) $(ARCH) -lresolv
-
 %.o : %.cpp
 	$(CXX) $(CFLAGS) $(INCLUDES) -o $@ $<
 
 %.o : %.c
 	$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
 
-all: defs ozwcp
+all: ozwcp
 
+ozwcp.o: ozwcp.h webserver.h $(OPENZWAVE)/Options.h $(OPENZWAVE)/Manager.h \
+	$(OPENZWAVE)/Node.h $(OPENZWAVE)/Group.h \
+	$(OPENZWAVE)/Notification.h $(OPENZWAVE)/platform/Log.h
 
-defs:
-ifeq ($(LIBZWAVE),)
-	@echo Please edit the Makefile to avoid this error message.
-	@exit 1
-endif
-
-ozwcp.o: ozwcp.h webserver.h $(OPENZWAVE)/cpp/src/Options.h $(OPENZWAVE)/cpp/src/Manager.h \
-	$(OPENZWAVE)/cpp/src/Node.h $(OPENZWAVE)/cpp/src/Group.h \
-	$(OPENZWAVE)/cpp/src/Notification.h $(OPENZWAVE)/cpp/src/platform/Log.h
-
-webserver.o: webserver.h ozwcp.h $(OPENZWAVE)/cpp/src/Options.h $(OPENZWAVE)/cpp/src/Manager.h \
-	$(OPENZWAVE)/cpp/src/Node.h $(OPENZWAVE)/cpp/src/Group.h \
-	$(OPENZWAVE)/cpp/src/Notification.h $(OPENZWAVE)/cpp/src/platform/Log.h
+webserver.o: webserver.h ozwcp.h $(OPENZWAVE)/Options.h $(OPENZWAVE)/Manager.h \
+	$(OPENZWAVE)/Node.h $(OPENZWAVE)/Group.h \
+	$(OPENZWAVE)/Notification.h $(OPENZWAVE)/platform/Log.h
 
 ozwcp:	ozwcp.o webserver.o zwavelib.o $(LIBZWAVE)
 	$(LD) -o $@ $(LDFLAGS) ozwcp.o webserver.o zwavelib.o $(LIBS)