Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Copyright (C) 2006-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libnl
  9. PKG_VERSION:=3.2.21
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.infradead.org/~tgr/libnl/files/
  13. PKG_MD5SUM:=6fe7136558a9071e70673dcda38545b3
  14. PKG_LICENSE:=LGPL-2.1
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/libnl
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=netlink socket library
  20. DEPENDS:=+libpthread
  21. URL:=http://people.suug.ch/~tgr/libnl/
  22. endef
  23. define Package/libnl/description
  24. This package contains a library for applications dealing with netlink sockets
  25. endef
  26. TARGET_CFLAGS += -ffunction-sections $(FPIC)
  27. define Build/Compile
  28. $(call Build/Compile/Default)
  29. make -C $(PKG_BUILD_DIR) \
  30. DESTDIR="$(PKG_INSTALL_DIR)" \
  31. install
  32. endef
  33. define Build/InstallDev
  34. $(INSTALL_DIR) $(1)
  35. $(CP) $(PKG_INSTALL_DIR)/* $(1)/
  36. mkdir -p $(1)/usr/include/libnl
  37. $(CP) $(PKG_BUILD_DIR)/include/linux $(1)/usr/include/libnl/
  38. endef
  39. define Package/libnl/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so.* $(1)/usr/lib/
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so.* $(1)/usr/lib/
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so.* $(1)/usr/lib/
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so.* $(1)/usr/lib/
  45. endef
  46. $(eval $(call BuildPackage,libnl))