b349d00b7c1a81380b93c6ad9721cea838d460be
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / ola / ola.mk
1 ################################################################################
2 #
3 # ola
4 #
5 ################################################################################
6
7 OLA_VERSION = 0.9.4
8 OLA_SITE = $(call github,OpenLightingProject,ola,$(OLA_VERSION))
9
10 OLA_LICENSE = LGPLv2.1+ (libola, libolacommon, Python bindings), GPLv2+ (libolaserver, olad, Python examples and tests)
11 OLA_LICENSE_FILES = LICENCE GPL LGPL
12 OLA_INSTALL_STAGING = YES
13 OLA_AUTORECONF = YES
14
15 # util-linux provides uuid lib
16 OLA_DEPENDENCIES = protobuf util-linux host-bison host-flex host-ola
17
18 OLA_CONF_OPTS = \
19         ac_cv_have_pymod_google_protobuf=yes \
20         --disable-gcov \
21         --disable-tcmalloc \
22         --disable-unittests \
23         --disable-root-check \
24         --disable-java-libs \
25         --disable-fatal-warnings \
26         --with-ola-protoc-plugin=$(HOST_DIR)/usr/bin/ola_protoc_plugin
27
28 HOST_OLA_DEPENDENCIES = host-util-linux host-protobuf
29
30 # When building the host part, disable as much as possible to speed up
31 # the configure step and avoid missing host dependencies.
32 HOST_OLA_CONF_OPTS = \
33         --disable-all-plugins \
34         --disable-slp \
35         --disable-osc \
36         --disable-uart \
37         --disable-libusb \
38         --disable-libftdi \
39         --disable-http  \
40         --disable-examples \
41         --disable-unittests \
42         --disable-doxygen-html \
43         --disable-doxygen-doc
44
45 # On the host side, we only need ola_protoc_plugin, so build and install this
46 # only.
47 HOST_OLA_MAKE_OPTS = protoc/ola_protoc_plugin
48 define HOST_OLA_INSTALL_CMDS
49         $(INSTALL) -D -m 0755 $(@D)/protoc/ola_protoc_plugin $(HOST_DIR)/usr/bin/ola_protoc_plugin
50 endef
51
52 # sets where to find python libs built for target and required by ola
53 OLA_CONF_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
54 OLA_MAKE_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
55
56 ## OLA Bindings and Interface selections
57
58 ifeq ($(BR2_PACKAGE_OLA_WEB),y)
59 OLA_CONF_OPTS += --enable-http
60 OLA_DEPENDENCIES += libmicrohttpd
61 else
62 OLA_CONF_OPTS += --disable-http
63 endif
64
65 ifeq ($(BR2_PACKAGE_OLA_SLP),y)
66 OLA_CONF_OPTS += --enable-slp
67 else
68 OLA_CONF_OPTS += --disable-slp
69 endif
70
71 ifeq ($(BR2_PACKAGE_OLA_PYTHON_BINDINGS),y)
72 OLA_CONF_OPTS += --enable-python-libs
73 OLA_DEPENDENCIES += python python-protobuf
74 else
75 OLA_CONF_OPTS += --disable-python-libs
76 endif
77
78 ## OLA Examples and Tests
79
80 ifeq ($(BR2_PACKAGE_OLA_EXAMPLES),y)
81 OLA_CONF_OPTS += --enable-examples
82 OLA_DEPENDENCIES += ncurses
83 else
84 OLA_CONF_OPTS += --disable-examples
85 endif
86
87 ifeq ($(BR2_PACKAGE_OLA_RDM_TESTS),y)
88 OLA_CONF_OPTS += --enable-rdm-tests
89 else
90 OLA_CONF_OPTS += --disable-rdm-tests
91 endif
92
93 ## OLA Plugin selections
94
95 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_E131),y)
96 OLA_CONF_OPTS += --enable-e131
97 else
98 OLA_CONF_OPTS += --disable-e131
99 endif
100
101 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_ARTNET),y)
102 OLA_CONF_OPTS += --enable-artnet
103 else
104 OLA_CONF_OPTS += --disable-artnet
105 endif
106
107 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_OPENDMX),y)
108 OLA_CONF_OPTS += --enable-opendmx
109 else
110 OLA_CONF_OPTS += --disable-opendmx
111 endif
112
113 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_DUMMY),y)
114 OLA_CONF_OPTS += --enable-dummy
115 else
116 OLA_CONF_OPTS += --disable-dummy
117 endif
118
119 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_ESPNET),y)
120 OLA_CONF_OPTS += --enable-espnet
121 else
122 OLA_CONF_OPTS += --disable-espnet
123 endif
124
125 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_KINET),y)
126 OLA_CONF_OPTS += --enable-kinet
127 else
128 OLA_CONF_OPTS += --disable-kinet
129 endif
130
131 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_OSC),y)
132 OLA_CONF_OPTS += --enable-osc
133 OLA_DEPENDENCIES += liblo
134 else
135 OLA_CONF_OPTS += --disable-osc
136 endif
137
138 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_MILINT),y)
139 OLA_CONF_OPTS += --enable-milinst
140 else
141 OLA_CONF_OPTS += --disable-milinst
142 endif
143
144 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_PATHPORT),y)
145 OLA_CONF_OPTS += --enable-pathport
146 else
147 OLA_CONF_OPTS += --disable-pathport
148 endif
149
150 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_SANDNET),y)
151 OLA_CONF_OPTS += --enable-sandnet
152 else
153 OLA_CONF_OPTS += --disable-sandnet
154 endif
155
156 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_SHOWNET),y)
157 OLA_CONF_OPTS += --enable-shownet
158 else
159 OLA_CONF_OPTS += --disable-shownet
160 endif
161
162 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_STAGEPROFI),y)
163 OLA_CONF_OPTS += --enable-stageprofi --enable-libusb
164 else
165 OLA_CONF_OPTS += --disable-stageprofi
166 endif
167
168 ifeq ($(BR2_PACKAGE_OLA_PLUGIN_USBPRO),y)
169 OLA_CONF_OPTS += --enable-usbpro --enable-libusb
170 else
171 OLA_CONF_OPTS += --disable-usbpro
172 endif
173
174 $(eval $(autotools-package))
175 $(eval $(host-autotools-package))