1
0

Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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.3.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_3_0
  13. PKG_HASH:=705468b5ae4cd1eb099d2d1c476d6a3abe519bc2810becf12fb1e32de1e074e4
  14. PKG_LICENSE:=LGPL-2.1
  15. PKG_INSTALL:=1
  16. PKG_FIXUP:=autoreconf
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/libnl/default
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. URL:=http://www.infradead.org/~tgr/libnl/
  22. endef
  23. define Package/libnl-core
  24. $(call Package/libnl/default)
  25. TITLE:=Core Netlink Library
  26. DEPENDS:=+libpthread
  27. endef
  28. define Package/libnl-genl
  29. $(call Package/libnl/default)
  30. TITLE:=Generic Netlink Library
  31. DEPENDS:=+libnl-core
  32. endef
  33. define Package/libnl-route
  34. $(call Package/libnl/default)
  35. TITLE:=Routing Netlink Library
  36. DEPENDS:=+libnl-core
  37. endef
  38. define Package/libnl-nf
  39. $(call Package/libnl/default)
  40. TITLE:=Netfilter Netlink Library
  41. DEPENDS:=+libnl-route
  42. endef
  43. define Package/libnl
  44. $(call Package/libnl/default)
  45. TITLE:=Full Netlink Library
  46. DEPENDS:=+libnl-genl +libnl-route +libnl-nf
  47. endef
  48. define Package/libnl-core/description
  49. Common code for all netlink libraries
  50. endef
  51. define Package/libnl-genl/description
  52. Generic Netlink Library Functions
  53. endef
  54. define Package/libnl-route/description
  55. Routing Netlink Library Functions
  56. endef
  57. define Package/libnl-nf/description
  58. Netfilter Netlink Library Functions
  59. endef
  60. define Package/libnl/description
  61. Socket handling, connection management, sending and receiving of data,
  62. message construction and parsing, object caching system, etc.
  63. endef
  64. TARGET_CFLAGS += -ffunction-sections $(FPIC)
  65. CONFIGURE_ARGS += \
  66. --disable-debug
  67. define Build/InstallDev
  68. $(INSTALL_DIR) $(1)/usr/include/libnl3 $(1)/usr/lib/pkgconfig
  69. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnl3/* $(1)/usr/include/libnl3/
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
  72. # Copy symlinks
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
  77. endef
  78. define Package/libnl-core/install
  79. $(INSTALL_DIR) $(1)/usr/lib
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so* $(1)/usr/lib/
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so
  82. endef
  83. define Package/libnl-genl/install
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so* $(1)/usr/lib/
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
  87. endef
  88. define Package/libnl-route/install
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so* $(1)/usr/lib/
  91. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
  92. endef
  93. define Package/libnl-nf/install
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so* $(1)/usr/lib/
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
  97. endef
  98. define Package/libnl/install
  99. :
  100. endef
  101. $(eval $(call BuildPackage,libnl-core))
  102. $(eval $(call BuildPackage,libnl-genl))
  103. $(eval $(call BuildPackage,libnl-route))
  104. $(eval $(call BuildPackage,libnl-nf))
  105. $(eval $(call BuildPackage,libnl))