2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=http://dmalloc.com/releases/
16 PKG_MD5SUM:=f92e5606c23a8092f3d5694e8d1c932e
21 include $(INCLUDE_DIR)/package.mk
23 define Package/dmalloc/Default
27 URL:=http://www.dmalloc.com/
30 define Package/libdmalloc
31 $(call Package/dmalloc/Default)
33 DEPENDS:=@USE_GLIBC||@USE_EGLIBC
36 define Package/dmalloc-utils
37 $(call Package/dmalloc/Default)
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
55 TARGET_CFLAGS += $(FPIC)
57 MAKE_INSTALL_FLAGS += installsl
59 define Build/InstallDev
60 $(INSTALL_DIR) $(1)/usr/include/
61 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dmalloc.h $(1)/usr/include/
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.{a,so*} $(1)/usr/lib/
67 define Package/libdmalloc/install
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.so* $(1)/usr/lib/
72 define Package/dmalloc-utils/install
73 $(INSTALL_DIR) $(1)/usr/bin
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmalloc $(1)/usr/bin/
77 $(eval $(call BuildPackage,libdmalloc))
78 $(eval $(call BuildPackage,dmalloc-utils))