Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #
  2. # Copyright (C) 2006-2009 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:=1.1
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
  13. PKG_MD5SUM:=ae970ccd9144e132b68664f98e7ceeb1
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/libnl
  16. SECTION:=libs
  17. CATEGORY:=Libraries
  18. TITLE:=netlink socket library
  19. URL:=http://people.suug.ch/~tgr/libnl/
  20. endef
  21. define Package/libnl/description
  22. This package contains a library for applications dealing with netlink sockets
  23. endef
  24. TARGET_CFLAGS += -ffunction-sections $(FPIC)
  25. define Build/Compile
  26. $(call Build/Compile/Default)
  27. make -C $(PKG_BUILD_DIR) \
  28. DESTDIR="$(PKG_INSTALL_DIR)" \
  29. install
  30. endef
  31. define Build/InstallDev
  32. $(INSTALL_DIR) $(1)
  33. $(CP) $(PKG_INSTALL_DIR)/* $(1)/
  34. mkdir -p $(1)/usr/include/libnl
  35. $(CP) $(PKG_BUILD_DIR)/include/linux $(1)/usr/include/libnl/
  36. endef
  37. define Package/libnl/install
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl.so.* $(1)/usr/lib/
  40. endef
  41. $(eval $(call BuildPackage,libnl))