forked from ZigFisher/glutinium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (37 loc) · 1.11 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
#
# 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:=megatec
PKG_VERSION:=2018-10-01
PKG_RELEASE:=1
PKG_MAINTAINER:=Igor Zalatov <[email protected]>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Simple utility for Megatec Protocol UPS
MAINTAINER:=https://habr.com/post/397637/
endef
define Package/megatec/description
Simple utility for Megatec Protocol UPS
Idea and basic c++ source file get from https://habr.com/post/397637/ (Russian)
endef
define Build/Prepare
$(INSTALL_DIR) $(PKG_BUILD_DIR)
$(INSTALL_DATA) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -O -g -D LINUX \
-o $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/megatec_v4.c
endef
define Package/megatec/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))