2008-06-09 20:15:26 +00:00
|
|
|
#
|
2010-03-21 03:20:26 +00:00
|
|
|
# Copyright (C) 2008-2010 OpenWrt.org
|
2008-06-09 20:15:26 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=check
|
2009-10-05 11:34:24 +00:00
|
|
|
PKG_VERSION:=0.9.8
|
2008-06-09 20:15:26 +00:00
|
|
|
PKG_RELEASE:=1
|
2009-06-18 13:03:40 +00:00
|
|
|
|
2008-06-09 20:15:26 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2009-06-18 13:03:40 +00:00
|
|
|
PKG_SOURCE_URL:=@SF/check
|
2009-10-05 11:34:24 +00:00
|
|
|
PKG_MD5SUM:=5d75e9a6027cde79d2c339ef261e7470
|
|
|
|
|
2012-06-11 21:18:33 +00:00
|
|
|
PKG_FIXUP:=autoreconf
|
2009-10-05 11:34:24 +00:00
|
|
|
PKG_INSTALL:=1
|
2008-06-09 20:15:26 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2009-10-05 11:34:24 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
2008-06-09 20:15:26 +00:00
|
|
|
|
|
|
|
define Package/check
|
2010-03-21 03:20:26 +00:00
|
|
|
SECTION:=libs
|
2008-06-09 20:15:26 +00:00
|
|
|
CATEGORY:=Libraries
|
2009-06-18 13:03:40 +00:00
|
|
|
TITLE:=Unit testing framework for C
|
2008-10-08 15:18:28 +00:00
|
|
|
URL:=http://check.sourceforge.net/
|
2009-10-05 11:34:24 +00:00
|
|
|
DEPENDS:= +libpthread
|
2008-06-09 20:15:26 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/check/description
|
2009-06-18 13:03:40 +00:00
|
|
|
Check features a simple interface for defining unit tests, putting little in
|
|
|
|
the way of the developer. Tests are run in a separate address space, so Check
|
|
|
|
can catch both assertion failures and code errors that cause segmentation
|
|
|
|
faults or other signals. The output from unit tests can be used within source
|
|
|
|
code editors and IDEs.
|
2008-06-09 20:15:26 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2008-08-05 08:04:51 +00:00
|
|
|
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/build-aux/
|
|
|
|
$(call Build/Configure/Default)
|
2008-06-09 20:15:26 +00:00
|
|
|
endef
|
|
|
|
|
2008-09-03 13:21:20 +00:00
|
|
|
define Build/Install
|
|
|
|
$(call Build/Install/Default)
|
2009-10-05 11:34:24 +00:00
|
|
|
cd $(PKG_INSTALL_DIR)/usr/lib/ ; ln -nsf libcheck.so libcheck_pic.so
|
2008-06-09 20:15:26 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2009-10-05 11:34:24 +00:00
|
|
|
$(INSTALL_DIR) $(1)
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
|
2008-06-09 20:15:26 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/check/install
|
2009-10-05 11:34:24 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.so.* $(1)/usr/lib/
|
2008-06-09 20:15:26 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,check))
|