1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/libs/libglog/Makefile
Rosen Penev 85fab04196
libglog: Switch to CMake
Allows removal of InstallDev as well as further simplification. Also 100KB
smaller package.

Added some C/LDFLAGS to further reduce the size.

Small Makefile cleanups.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-07-31 13:38:42 -07:00

49 lines
1.2 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=glog
PKG_VERSION:=0.4.0
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
PKG_MAINTAINER:=Amir Sabbaghi <asaba90@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/glog
SECTION:=libs
CATEGORY:=Libraries
TITLE:=C++ implementation of the Google logging module
DEPENDS:=+libstdcpp +libpthread +gflags
URL:=https://github.com/google/glog
endef
define Package/glog/description
This repository contains a C++ implementation of the Google logging
module. Documentation for the implementation is in doc/.
endef
CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DUNWIND_LIBRARY=OFF
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_CFLAGS += -Wl,--gc-sections
define Package/glog/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libglog.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,glog))