74 lines
1.8 KiB
Makefile
74 lines
1.8 KiB
Makefile
#
|
|
# Copyright (C) 2018-2021 skjaro
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v3.
|
|
# See /LICENSE for more information.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=usbserial-dw
|
|
PKG_VERSION:=0.2.0
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL:=https://git.bh.ttx.sk/jaro/usbserial-dw.git
|
|
PKG_MIRROR_HASH:=
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
PKG_SOURCE_VERSION:=6179fdee75ee3fcdb766aef5eb791c38e75ee33b
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
|
CMAKE_INSTALL:=1
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
PKG_LICENSE:=GPL-3.0
|
|
|
|
PKG_MAINTAINER:=SkJaro
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
TARGET_CXXFLAGS += -Wall -Wextra
|
|
TARGET_CXXFLAGS += $(FPIC)
|
|
|
|
# LTO
|
|
TARGET_CXXFLAGS += -flto
|
|
TARGET_LDFLAGS += -flto
|
|
|
|
# CXX standard
|
|
TARGET_CXXFLAGS += -std=c++11
|
|
|
|
TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS)) -O3
|
|
|
|
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections
|
|
TARGET_LDFLAGS += -Wl,--gc-sections
|
|
|
|
CMAKE_OPTIONS += \
|
|
-DENABLE_MYSQL=OFF \
|
|
-DBoost_DEBUG=ON \
|
|
-DBoost_NO_BOOST_CMAKE=ON
|
|
|
|
define Package/usbserial-dw
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
TITLE:=Little program for downloading camera and temprature from usbserial
|
|
URL:=https://git.bh.ttx.sk/jaro/usbserial-dw.git
|
|
DEPENDS:=+libpthread +libstdcpp \
|
|
+boost +boost-system +boost-program_options +boost-date_time +boost-log
|
|
endef
|
|
|
|
|
|
|
|
define Package/usbserial-dw/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/usbserial-dw $(1)/usr/bin/usbserial-dw
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_DATA) ./files/usbserial-dw.config $(1)/etc/config/usbserial
|
|
endef
|
|
|
|
define Package/usbserial-dw/conffiles
|
|
/etc/config/usbserial-dw
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,usbserial-dw))
|