2 # Copyright (C) 2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
13 PKG_SOURCE:=CUnit-$(PKG_VERSION)-src.tar.gz
14 PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/cunit/CUnit/$(PKG_VERSION)
15 PKG_MD5SUM:=f4f53d2c41e9315a91b4f14a1706fe4f
16 PKG_BUILD_DIR:=$(BUILD_DIR)/CUnit-$(PKG_VERSION)
20 include $(INCLUDE_DIR)/package.mk
22 define Package/libcunit
25 TITLE:=Unit testing framework for C
26 URL:=http://cunit.sourceforge.net/
29 define Package/libcunit/description
30 CUnit, lightweight unit testing for C
31 CUnit is a lightweight system for writing, administering, and running unit
32 tests in C. It provides C programmers a basic testing functionality with a
33 flexible variety of user interfaces.
37 define Build/Configure
38 $(call Build/Configure/Default, \
40 BUILD_CC="$(TARGET_CC)" \
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 CCOPT="$(TARGET_CFLAGS)" \
48 LDFLAGS="$(TARGET_LDFLAGS)" \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
54 define Build/InstallDev
55 mkdir -p $(1)/usr/include/CUnit
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/CUnit/* \
57 $(1)/usr/include/CUnit
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* \
65 define Package/libcunit/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* $(1)/usr/lib
71 $(eval $(call BuildPackage,libcunit))