-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
83 lines (64 loc) · 1.99 KB
/
Makefile
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
#
# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=paho.mqtt.c
PKG_VERSION:=1.3.1
PKG_RELEASE:=1
PKG_SOURCE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/eclipse/paho.mqtt.c/archive/
PKG_MD5SUM:=1b709fd42bf5f1e52ae8f07a620a2a83
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_MAINTAINER:=HaiBac Ngo <[email protected]>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS = -DPAHO_BUILD_SAMPLES=TRUE -DPAHO_WITH_SSL=TRUE
TARGET_CFLAGS += $(FPIC)
define Package/paho.mqtt.c/Default
TITLE:= An Eclipse Paho C client library for MQTT for Windows, Linux and MacOS
URL:=http://eclipse.org/paho
endef
define Package/paho.mqtt.c/Default/description
An Eclipse Paho C client library for MQTT for Windows, Linux and MacOS
endef
define Package/libpaho.mqtt.c
$(call Package/paho.mqtt.c/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libpthread +libopenssl
endef
define Package/libpaho.mqtt.c/description
$(call Package/paho.mqtt.c/Default/description)
endef
define Package/paho.mqtt.c-cli
$(call Package/paho.mqtt.c/Default)
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libpaho.mqtt.c
TITLE+= (cli)
endef
define Package/paho.mqtt.c-cli/description
$(call Package/paho.mqtt.c/Default/description)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/MQTT*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpaho-mqtt3*.so* $(1)/usr/lib/
endef
define Package/libpaho.mqtt.c/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpaho-mqtt3*.so* $(1)/usr/lib/
endef
define Package/paho.mqtt.c-cli/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libpaho.mqtt.c))
$(eval $(call BuildPackage,paho.mqtt.c-cli))