2006-12-12 23:16:41 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# dmalloc
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
DMALLOC_VERSION:=5.4.3
|
|
|
|
DMALLOC_SOURCE:=dmalloc-$(DMALLOC_VERSION).tgz
|
2006-12-12 23:16:41 +01:00
|
|
|
DMALLOC_SITE:=http://dmalloc.com/releases
|
|
|
|
|
2010-06-16 13:47:04 +02:00
|
|
|
DMALLOC_INSTALL_STAGING = YES
|
|
|
|
DMALLOC_CONF_OPT:= --enable-shlib
|
2007-01-20 21:54:05 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
2010-06-16 13:47:04 +02:00
|
|
|
DMALLOC_CONF_OPT+=--enable-cxx
|
2007-01-20 21:54:05 +01:00
|
|
|
else
|
2010-06-16 13:47:04 +02:00
|
|
|
DMALLOC_CONF_OPT+=--disable-cxx
|
2007-01-20 21:54:05 +01:00
|
|
|
endif
|
|
|
|
|
2010-12-13 17:27:44 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
2010-06-16 13:47:04 +02:00
|
|
|
DMALLOC_CONF_OPT+=--enable-threads
|
2010-12-13 17:27:44 +01:00
|
|
|
else
|
|
|
|
DMALLOC_CONF_OPT+=--disable-threads
|
2007-01-20 21:54:05 +01:00
|
|
|
endif
|
|
|
|
|
2010-06-16 13:47:04 +02:00
|
|
|
define DMALLOC_POST_PATCH
|
|
|
|
$(SED) 's/^ac_cv_page_size=0$$/ac_cv_page_size=12/' $(@D)/configure
|
|
|
|
$(SED) 's/(ld -/($${LD-ld} -/' $(@D)/configure
|
|
|
|
$(SED) 's/'\''ld -/"$${LD-ld}"'\'' -/' $(@D)/configure
|
|
|
|
$(SED) 's/ar cr/$$(AR) cr/' $(@D)/Makefile.in
|
|
|
|
endef
|
2007-01-20 21:54:05 +01:00
|
|
|
|
2010-06-16 13:47:04 +02:00
|
|
|
DMALLOC_POST_PATCH_HOOKS += DMALLOC_POST_PATCH
|
2006-12-12 23:16:41 +01:00
|
|
|
|
2010-06-16 13:47:04 +02:00
|
|
|
# both DESTDIR and PREFIX are ignored..
|
|
|
|
define DMALLOC_INSTALL_STAGING_CMDS
|
2007-08-22 14:35:41 +02:00
|
|
|
$(MAKE) includedir="$(STAGING_DIR)/usr/include" \
|
2007-01-20 21:54:05 +01:00
|
|
|
bindir="$(STAGING_DIR)/usr/bin" \
|
|
|
|
libdir="$(STAGING_DIR)/usr/lib" \
|
|
|
|
shlibdir="$(STAGING_DIR)/usr/lib" \
|
|
|
|
includedir="$(STAGING_DIR)/usr/share/info/" \
|
2010-06-16 13:47:04 +02:00
|
|
|
-C $(@D) install
|
|
|
|
endef
|
2006-12-12 23:16:41 +01:00
|
|
|
|
2010-06-16 13:47:04 +02:00
|
|
|
define DMALLOC_INSTALL_TARGET_CMDS
|
|
|
|
mv $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc
|
|
|
|
endef
|
2006-12-12 23:16:41 +01:00
|
|
|
|
2010-06-16 13:47:04 +02:00
|
|
|
define DMALLOC_CLEAN_CMDS
|
2008-03-27 16:42:42 +01:00
|
|
|
-rm -f $(TARGET_DIR)/usr/lib/libdmalloc*
|
|
|
|
-rm -f $(STAGING_DIR)/usr/lib/libdmalloc*
|
2007-08-12 00:26:56 +02:00
|
|
|
rm -f $(STAGING_DIR)/usr/include/dmalloc.h
|
2010-06-16 13:47:04 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/dmalloc
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(DMALLOC_DIR) clean
|
2010-06-16 13:47:04 +02:00
|
|
|
endef
|
2006-12-12 23:16:41 +01:00
|
|
|
|
|
|
|
|
2010-06-16 13:47:04 +02:00
|
|
|
$(eval $(call AUTOTARGETS,package,dmalloc))
|