116ae008f80dbe4cb1ff0c706d97c7a33606cde3
[openwrt/svn-archive/archive.git] / libs / check / Makefile
1 #
2 # Copyright (C) 2008-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=check
11 PKG_VERSION:=0.9.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/check
16 PKG_MD5SUM:=6f80cd4a24d14ad706117a7714222420
17 PKG_FIXUP:=libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 PKG_INSTALL = 1
22
23 TARGET_CFLAGS += $(FPIC) \
24 -I$(STAGING_DIR)/usr/lib/libintl/include \
25 -I$(STAGING_DIR)/usr/lib/libiconv/include
26
27 TARGET_LDFLAGS += \
28 -L$(STAGING_DIR)/usr/lib/libintl/lib \
29 -L$(STAGING_DIR)/usr/lib/libiconv/lib
30
31 define Package/check
32 SECTION:=lib
33 CATEGORY:=Libraries
34 TITLE:=Unit testing framework for C
35 URL:=http://check.sourceforge.net/
36 endef
37
38 define Package/check/description
39 Check features a simple interface for defining unit tests, putting little in
40 the way of the developer. Tests are run in a separate address space, so Check
41 can catch both assertion failures and code errors that cause segmentation
42 faults or other signals. The output from unit tests can be used within source
43 code editors and IDEs.
44 endef
45
46 define Build/Configure
47 $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/build-aux/
48 $(call Build/Configure/Default)
49 endef
50
51 define Build/Install
52 $(call Build/Install/Default)
53 cd $(PKG_INSTALL_DIR)/usr/lib/ ; ln -s libcheck.so libcheck_pic.so
54 endef
55
56 define Build/InstallDev
57 mkdir -p $(1)
58 cp -r $(PKG_INSTALL_DIR)/* $(1)
59 endef
60
61 define Package/check/install
62 mkdir -p $(1)
63 cp -r $(PKG_INSTALL_DIR)/* $(1)
64 endef
65
66 $(eval $(call BuildPackage,check))