Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2006-2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=libnl
  10. PKG_VERSION:=1.1
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://people.suug.ch/~tgr/libnl/files/
  14. PKG_MD5SUM:=ae970ccd9144e132b68664f98e7ceeb1
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/libnl
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=netlink socket library
  20. URL:=http://people.suug.ch/~tgr/libnl/
  21. endef
  22. define Package/libnl/description
  23. This package contains a library for applications dealing with netlink sockets
  24. endef
  25. TARGET_CFLAGS += -ffunction-sections
  26. define Build/Compile
  27. $(call Build/Compile/Default)
  28. make -C $(PKG_BUILD_DIR) \
  29. DESTDIR="$(PKG_INSTALL_DIR)" \
  30. install
  31. endef
  32. ifneq ($(CONFIG_LINUX_2_6),)
  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. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnl.so.* $(1)/usr/lib/
  42. endef
  43. endif
  44. $(eval $(call BuildPackage,libnl))