You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2008-2015 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:=check
  9. PKG_VERSION:=0.9.14
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/check
  13. PKG_MD5SUM:=38263d115d784c17aa3b959ce94be8b8
  14. PKG_LICENSE:=LGPL-2.1+
  15. PKG_LICENSE_FILES:=COPYING.LESSER
  16. PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/check
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=Unit testing framework for C
  23. URL:=http://check.sourceforge.net/
  24. DEPENDS:= +libpthread +librt
  25. endef
  26. define Package/check/description
  27. Check features a simple interface for defining unit tests, putting little in
  28. the way of the developer. Tests are run in a separate address space, so Check
  29. can catch both assertion failures and code errors that cause segmentation
  30. faults or other signals. The output from unit tests can be used within source
  31. code editors and IDEs.
  32. endef
  33. TARGET_CFLAGS += $(FPIC)
  34. define Build/InstallDev
  35. $(INSTALL_DIR) $(1)/usr/include
  36. $(CP) $(PKG_INSTALL_DIR)/usr/include/check*.h $(1)/usr/include/
  37. $(INSTALL_DIR) $(1)/usr/lib
  38. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.{a,so*} $(1)/usr/lib/
  39. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/check.pc $(1)/usr/lib/pkgconfig/
  41. endef
  42. define Package/check/install
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.so.* $(1)/usr/lib/
  45. endef
  46. $(eval $(call BuildPackage,check))