-
Notifications
You must be signed in to change notification settings - Fork 54
/
Makefile
60 lines (43 loc) · 1.29 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
# Copyright (C) 2016 Onion Corporation
#
# Author: Lazar Demin <[email protected]>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=omega2-ctrl
PKG_VERSION:=0.3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e7152ba869b1af10e3c4d22938100962eb1d9b0e
PKG_SOURCE_URL:=https://github.com/OnionIoT/omega2-ctrl.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
# application package
define Package/$(PKG_NAME)
SECTION:=onion
CATEGORY:=Onion
SUBMENU:=Utilities
TITLE:=Utility to control the Omega2's low-level hardware
endef
define Package/$(PKG_NAME)/description
Utility to control the Omega2's low-level hardware
endef
#TARGET_LIB += -lpthread -lcurl -loniondebug -ljson-c -lubus -lubox -lblobmsg_json -luci
TARGET_CFLAGS += $(FPIC)
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
LIB="$(TARGET_LIB)"
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
# install the binary
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/omega2-ctrl $(1)/usr/bin/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))