Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2006-2012 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-tiny
  9. PKG_VERSION:=0.1
  10. PKG_RELEASE:=4
  11. PKG_LICENSE:=LGPL-2.1
  12. PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/libnl-tiny
  15. SECTION:=libs
  16. CATEGORY:=Libraries
  17. TITLE:=netlink socket library
  18. endef
  19. define Package/libnl-tiny/description
  20. This package contains a stripped down version of libnl
  21. endef
  22. define Build/Prepare
  23. mkdir -p $(PKG_BUILD_DIR)
  24. $(CP) ./src/* $(PKG_BUILD_DIR)/
  25. endef
  26. TARGET_CFLAGS += $(FPIC)
  27. define Build/Compile
  28. $(MAKE) -C $(PKG_BUILD_DIR) \
  29. $(TARGET_CONFIGURE_OPTS) \
  30. CFLAGS="$(TARGET_CFLAGS)" \
  31. all
  32. endef
  33. define Build/InstallDev
  34. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(1)/usr/include/libnl-tiny
  35. $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/libnl-tiny
  36. $(CP) $(PKG_BUILD_DIR)/libnl-tiny.so $(1)/usr/lib/
  37. $(CP) ./files/libnl-tiny.pc $(1)/usr/lib/pkgconfig
  38. endef
  39. define Package/libnl-tiny/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_BUILD_DIR)/libnl-tiny.so $(1)/usr/lib/
  42. endef
  43. $(eval $(call BuildPackage,libnl-tiny))