packages: Update s-lang library to 2.2.4
[openwrt/svn-archive/archive.git] / libs / libcunit / Makefile
1 #
2 # Copyright (C) 2011 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
9 PKG_NAME:=libcunit
10 PKG_VERSION:=2.1-0
11 PKG_RELEASE:=1
12
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)
17
18 PKG_FIXUP:=autoreconf
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libcunit
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=Unit testing framework for C
26 URL:=http://cunit.sourceforge.net/
27 endef
28
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.
34 endef
35
36
37 define Build/Configure
38 $(call Build/Configure/Default, \
39 , \
40 BUILD_CC="$(TARGET_CC)" \
41 HOSTCC="$(HOSTCC)" \
42 )
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 CCOPT="$(TARGET_CFLAGS)" \
48 LDFLAGS="$(TARGET_LDFLAGS)" \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 install
51 endef
52
53
54 define Build/InstallDev
55 mkdir -p $(1)/usr/include/CUnit
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/CUnit/* \
57 $(1)/usr/include/CUnit
58
59 mkdir -p $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* \
61 $(1)/usr/lib
62 endef
63
64
65 define Package/libcunit/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* $(1)/usr/lib
68 endef
69
70
71 $(eval $(call BuildPackage,libcunit))