Makefile (1448B)
1 # 2 # Copyright (C) 2015 OpenWrt.org 3 # 4 # This is free software, licensed under the GNU General Public License v2. 5 # See /LICENSE for more information. 6 # 7 8 include $(TOPDIR)/rules.mk 9 10 PKG_NAME:=libcoap 11 PKG_RELEASE:=3 12 13 PKG_SOURCE_PROTO:=git 14 PKG_SOURCE_URL:=https://github.com/obgm/libcoap 15 PKG_SOURCE_SUBDIR:=$(PKG_NAME) 16 PKG_SOURCE_VERSION:=2da31de732c0e51a9bc9e1d4aea21e25da89cf87 17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 18 19 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com> 20 PKG_LICENSE:=GPL-2.0+ BSD-2-Clause 21 PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD 22 23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 24 25 PKG_FIXUP:=autoreconf 26 PKG_INSTALL:=1 27 28 include $(INCLUDE_DIR)/package.mk 29 30 define Package/libcoap 31 SECTION:=libs 32 CATEGORY:=Libraries 33 TITLE:=CoAP (RFC 7252) library 34 URL:=http://libcoap.net/ 35 endef 36 37 define Package/libcoap/description 38 Constrained Application Protocol (RFC 7252) library 39 endef 40 41 TARGET_CFLAGS += $(FPIC) 42 43 CONFIGURE_ARGS += \ 44 --disable-examples \ 45 --disable-documentation 46 47 ifeq ($(CONFIG_BIG_ENDIAN),y) 48 TARGET_CFLAGS += -DWORDS_BIGENDIAN 49 endif 50 51 define Build/InstallDev 52 $(INSTALL_DIR) $(1)/usr/include 53 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ 54 55 $(INSTALL_DIR) $(1)/usr/lib 56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ 57 endef 58 59 define Package/libcoap/install 60 $(INSTALL_DIR) $(1)/usr/lib 61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/ 62 endef 63 64 $(eval $(call BuildPackage,libcoap))