global: change all instances of USE_EGLIBC to USE_GLIBC
[packages.git] / devel / dmalloc / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=dmalloc
11 PKG_VERSION:=5.5.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=http://dmalloc.com/releases/
16 PKG_MD5SUM:=f92e5606c23a8092f3d5694e8d1c932e
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/dmalloc/Default
24   SECTION:=devel
25   CATEGORY:=Development
26   TITLE:=Dmalloc
27   URL:=http://www.dmalloc.com/
28 endef
29
30 define Package/libdmalloc
31   $(call Package/dmalloc/Default)
32   TITLE+= (library)
33   DEPENDS:=@USE_GLIBC
34 endef
35
36 define Package/dmalloc-utils
37   $(call Package/dmalloc/Default)
38   DEPENDS:=+libdmalloc
39   TITLE+= (utilities)
40 endef
41
42 define Package/dmalloc/description
43 The debug memory allocation or dmalloc library has been designed as a drop in
44 replacement for the system's malloc, realloc, calloc, free and other memory
45 management routines while providing powerful debugging facilities configurable
46 at runtime. These facilities include such things as memory-leak tracking,
47 fence-post write detection, file/line number reporting, and general logging of
48 statistics.
49 endef
50
51 CONFIGURE_ARGS += \
52         --disable-cxx \
53         --with-pagesize=12
54
55 TARGET_CFLAGS += $(FPIC)
56
57 MAKE_INSTALL_FLAGS += installsl
58
59 define Build/InstallDev
60         $(INSTALL_DIR) $(1)/usr/include/
61         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dmalloc.h $(1)/usr/include/
62
63         $(INSTALL_DIR) $(1)/usr/lib
64         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.{a,so*} $(1)/usr/lib/
65 endef
66
67 define Package/libdmalloc/install
68         $(INSTALL_DIR) $(1)/usr/lib
69         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.so* $(1)/usr/lib/
70 endef
71
72 define Package/dmalloc-utils/install
73         $(INSTALL_DIR) $(1)/usr/bin
74         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmalloc $(1)/usr/bin/
75 endef
76
77 $(eval $(call BuildPackage,libdmalloc))
78 $(eval $(call BuildPackage,dmalloc-utils))