[package] add dmalloc, patch from Raphael Huck
[openwrt/svn-archive/archive.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:=libtool
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 endef
34
35 define Package/dmalloc-utils
36 $(call Package/dmalloc/Default)
37 DEPENDS:=+libdmalloc
38 TITLE+= (utilities)
39 endef
40
41 define Package/dmalloc/description
42 The debug memory allocation or dmalloc library has been designed as a drop in
43 replacement for the system's malloc, realloc, calloc, free and other memory
44 management routines while providing powerful debugging facilities configurable
45 at runtime. These facilities include such things as memory-leak tracking,
46 fence-post write detection, file/line number reporting, and general logging of
47 statistics.
48 endef
49
50 CONFIGURE_ARGS += \
51 --disable-cxx \
52 --with-pagesize=12
53
54 TARGET_CFLAGS += $(FPIC)
55
56 MAKE_INSTALL_FLAGS += installsl
57
58 define Build/InstallDev
59 $(INSTALL_DIR) $(1)/usr/include/
60 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dmalloc.h $(1)/usr/include/
61
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.{a,so*} $(1)/usr/lib/
64 endef
65
66 define Package/libdmalloc/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.so* $(1)/usr/lib/
69 endef
70
71 define Package/dmalloc-utils/install
72 $(INSTALL_DIR) $(1)/usr/bin
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmalloc $(1)/usr/bin/
74 endef
75
76 $(eval $(call BuildPackage,libdmalloc))
77 $(eval $(call BuildPackage,dmalloc-utils))