packages/libs/libglog/Makefile
Amol Bhave 44c24203a5 libglog: Add gflags a dependency for libglog
Depends on PR #7098

With gflags available, glog's compilation behaves differently and
includes gflags specific code. This code allows customizing logging in
programs that use glog, using command command line parameters.

Compile tested: openwrt-18.06 for ipq40xx, ipq806x, x86 and ar71xx
Run tested: Tested on devices running on the above architectures.

Signed-off-by: Amol Bhave <ambhave@fb.com>
2019-04-29 18:32:48 -07:00

60 lines
1.5 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=glog
PKG_VERSION:=0.4.0
PKG_RELEASE:=2
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_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILE:=COPYING
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=libgflags
include $(INCLUDE_DIR)/package.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
MAINTAINER:=Amir Sabbaghi <amir@pichak.co>
endef
define Package/glog/description
This repository contains a C++ implementation of the Google logging
module. Documentation for the implementation is in doc/.
endef
CONFIGURE_VARS+=ac_cv_header_libunwind_h=0
TARGET_CXXFLAGS+=-std=c++11
TARGET_LDFLAGS+=-lpthread
define Build/Configure
$(call Build/Configure/Default,)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/glog
$(CP) $(PKG_INSTALL_DIR)/usr/include/glog/*.h $(1)/usr/include/glog
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libglog.{a,so*} $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libglog.pc $(1)/usr/lib/pkgconfig/
endef
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))