Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. ifneq ($(CONFIG_LINUX_2_6),)
  32. define Build/InstallDev
  33. $(INSTALL_DIR) $(1)
  34. $(CP) $(PKG_INSTALL_DIR)/* $(1)/
  35. mkdir -p $(1)/usr/include/libnl
  36. $(CP) $(PKG_BUILD_DIR)/include/linux $(1)/usr/include/libnl/
  37. endef
  38. define Package/libnl/install
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl.so.* $(1)/usr/lib/
  41. endef
  42. endif
  43. $(eval $(call BuildPackage,libnl))