xref: /OK3568_Linux_fs/buildroot/package/openzwave/openzwave.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# openzwave
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunOPENZWAVE_VERSION = 62444b0f979c337d2091d77d89cf63c2ae9775cf
8*4882a593SmuzhiyunOPENZWAVE_SITE = $(call github,OpenZWave,open-zwave,$(OPENZWAVE_VERSION))
9*4882a593SmuzhiyunOPENZWAVE_LICENSE = LGPL-3.0+, GPL-3.0 (examples), Apache-2.0 (sh2ju.sh)
10*4882a593SmuzhiyunOPENZWAVE_LICENSE_FILES = LICENSE licenses/license.txt licenses/lgpl.txt \
11*4882a593Smuzhiyun	licenses/gpl.txt licenses/Apache-License-2.0.txt
12*4882a593SmuzhiyunOPENZWAVE_DEPENDENCIES = tinyxml
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunOPENZWAVE_INSTALL_STAGING = YES
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun# Set instlibdir to install libopenzwave.so* in the correct directory
17*4882a593Smuzhiyun# otherwise openzwave will check that /lib64 exists (on the host) to
18*4882a593Smuzhiyun# know if the library should be installed in $(PREFIX)/lib or $(PREFIX)/lib64.
19*4882a593Smuzhiyun# Set pkgconfigdir to /lib/pkgconfig to install libopenzwave.pc in the
20*4882a593Smuzhiyun# correct directory otherwise openzwave will call
21*4882a593Smuzhiyun# "pkg-config --variable pc_path pkg-config" which returns an incorrect value.
22*4882a593Smuzhiyun# Set sysconfdir to /etc/openzwave to install openzwave configuration files in
23*4882a593Smuzhiyun# the correct directory otherwise openzwave will install configuration files in
24*4882a593Smuzhiyun# $(PREFIX)/etc/openzwave.
25*4882a593Smuzhiyun# Disable doxygen documentation.
26*4882a593Smuzhiyun# Set {DEBUG,RELEASE}_CFLAGS to remove -Werror.
27*4882a593SmuzhiyunOPENZWAVE_MAKE_OPTS = \
28*4882a593Smuzhiyun	CROSS_COMPILE="$(TARGET_CROSS)" \
29*4882a593Smuzhiyun	PREFIX=/usr \
30*4882a593Smuzhiyun	instlibdir=/usr/lib \
31*4882a593Smuzhiyun	pkgconfigdir=/usr/lib/pkgconfig \
32*4882a593Smuzhiyun	sysconfdir=/etc/openzwave \
33*4882a593Smuzhiyun	DOXYGEN= \
34*4882a593Smuzhiyun	DEBUG_CFLAGS="-fPIC -std=c++11" \
35*4882a593Smuzhiyun	RELEASE_CFLAGS="-fPIC -std=c++11" \
36*4882a593Smuzhiyun	USE_BI_TXML=0
37*4882a593Smuzhiyun
38*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_HAS_UDEV),y)
39*4882a593SmuzhiyunOPENZWAVE_DEPENDENCIES += host-pkgconf udev
40*4882a593SmuzhiyunOPENZWAVE_MAKE_OPTS += USE_HID=1
41*4882a593Smuzhiyunelse
42*4882a593SmuzhiyunOPENZWAVE_MAKE_OPTS += USE_HID=0
43*4882a593Smuzhiyunendif
44*4882a593Smuzhiyun
45*4882a593Smuzhiyundefine OPENZWAVE_BUILD_CMDS
46*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(MAKE) $(OPENZWAVE_MAKE_OPTS) -C $(@D)
47*4882a593Smuzhiyunendef
48*4882a593Smuzhiyun
49*4882a593Smuzhiyundefine OPENZWAVE_INSTALL_STAGING_CMDS
50*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(MAKE) $(OPENZWAVE_MAKE_OPTS) -C $(@D) \
51*4882a593Smuzhiyun		DESTDIR=$(STAGING_DIR) install
52*4882a593Smuzhiyunendef
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun# Delete unneeded ozw_config binary from target directory as this is an utility
55*4882a593Smuzhiyun# application used to get the openzwave build configuration.
56*4882a593Smuzhiyundefine OPENZWAVE_INSTALL_TARGET_CMDS
57*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(MAKE) $(OPENZWAVE_MAKE_OPTS) -C $(@D) \
58*4882a593Smuzhiyun		DESTDIR=$(TARGET_DIR) install
59*4882a593Smuzhiyun	rm -f $(TARGET_DIR)/usr/bin/ozw_config
60*4882a593Smuzhiyunendef
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun$(eval $(generic-package))
63