1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 12:23:59 +02:00
openwrt-packages/libs/c-ares/Makefile
Rosen Penev a31b732007 treewide: build CMake projects with Ninja
faster to compile.

A small selection of packages was tested going from:

Executed in  696.30 secs   fish           external
   usr time   82.98 mins  395.00 micros   82.98 mins
   sys time    9.02 mins    0.00 micros    9.02 mins

to:

Executed in  592.20 secs   fish           external
   usr time   84.84 mins  361.00 micros   84.84 mins
   sys time    8.85 mins   57.00 micros    8.85 mins

Tested by running make -j 12 and wiping staging/build_dir/target_x

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-27 21:51:50 -07:00

57 lines
1.4 KiB
Makefile

#
# Copyright (C) 2009-2010 OpenWrt.org
# Copyright (C) 2009 Jakob Pfeiffer
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=c-ares
PKG_VERSION:=1.17.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://c-ares.haxx.se/download
PKG_HASH:=d73dd0f6de824afd407ce10750ea081af47eba52b8a6cb307d220131ad93fc40
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.md
PKG_CPE_ID:=cpe:/a:c-ares_project:c-ares
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include ../../devel/ninja/ninja-cmake.mk
define Package/libcares
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for asyncronous DNS Requests (including name resolves)
URL:=http://c-ares.haxx.se/
MAINTAINER:=Karl Palsson <karlp@etactica.com>
endef
define Package/libcares/description
c-ares is a C library for asynchronous DNS requests (including name resolves)
C89 compatibility, MIT licensed, builds for and runs on POSIX, Windows,
Netware, Android and many more operating systems.
endef
CMAKE_OPTIONS += \
-DCARES_STATIC=OFF \
-DCARES_SHARED=ON \
-DCARES_STATIC_PIC=ON \
-DCARES_BUILD_TESTS=OFF \
-DCARES_BUILD_TOOLS=OFF
define Package/libcares/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcares.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libcares))