blob: 76fd50a3f4f0e18f551a62cd8b43eecddde50b55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libcunit
PKG_VERSION:=2.1-0
PKG_RELEASE:=1
PKG_SOURCE:=CUnit-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/cunit/CUnit/$(PKG_VERSION)
PKG_MD5SUM:=f4f53d2c41e9315a91b4f14a1706fe4f
PKG_BUILD_DIR:=$(BUILD_DIR)/CUnit-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/libcunit
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Unit testing framework for C
URL:=http://cunit.sourceforge.net/
endef
define Package/libcunit/description
CUnit, lightweight unit testing for C
CUnit is a lightweight system for writing, administering, and running unit
tests in C. It provides C programmers a basic testing functionality with a
flexible variety of user interfaces.
endef
define Build/Configure
$(call Build/Configure/Default, \
, \
BUILD_CC="$(TARGET_CC)" \
HOSTCC="$(HOSTCC)" \
)
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CCOPT="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
install
endef
define Build/InstallDev
mkdir -p $(1)/usr/include/CUnit
$(CP) $(PKG_INSTALL_DIR)/usr/include/CUnit/* \
$(1)/usr/include/CUnit
mkdir -p $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* \
$(1)/usr/lib
endef
define Package/libcunit/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* $(1)/usr/lib
endef
$(eval $(call BuildPackage,libcunit))
|