1 ################################################################################
5 ################################################################################
7 DMALLOC_VERSION
= 5.5.2
8 DMALLOC_SOURCE
= dmalloc-
$(DMALLOC_VERSION
).tgz
9 DMALLOC_SITE
= http
://dmalloc.com
/releases
11 DMALLOC_LICENSE
= MIT-like
12 # license is in each file, dmalloc.h.1 is the smallest one
13 DMALLOC_LICENSE_FILES
= dmalloc.h
.1
15 DMALLOC_INSTALL_STAGING
= YES
16 DMALLOC_CONF_OPTS
= --enable-shlib
17 DMALLOC_CFLAGS
= $(TARGET_CFLAGS
)
19 ifeq ($(BR2_INSTALL_LIBSTDCPP
),y
)
20 DMALLOC_CONF_OPTS
+= --enable-cxx
22 DMALLOC_CONF_OPTS
+= --disable-cxx
25 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS
),y
)
26 DMALLOC_CONF_OPTS
+= --enable-threads
28 DMALLOC_CONF_OPTS
+= --disable-threads
31 # dmalloc has some assembly function that are not present in thumb1 mode:
32 # Error: lo register required -- `str lr,[sp,#4]'
33 # so, we desactivate thumb mode
34 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB
),y
)
35 DMALLOC_CFLAGS
+= -marm
38 DMALLOC_CONF_ENV
= CFLAGS
="$(DMALLOC_CFLAGS)"
40 define DMALLOC_POST_PATCH
41 $(SED
) 's/^ac_cv_page_size=0$$/ac_cv_page_size=12/' $(@D
)/configure
42 $(SED
) 's/(ld -/($${LD-ld} -/' $(@D
)/configure
43 $(SED
) 's/'\''ld -/"$${LD-ld}"'\'' -/' $(@D
)/configure
44 $(SED
) 's/ar cr/$$(AR) cr/' $(@D
)/Makefile.in
47 DMALLOC_POST_PATCH_HOOKS
+= DMALLOC_POST_PATCH
49 # both DESTDIR and PREFIX are ignored..
50 define DMALLOC_INSTALL_STAGING_CMDS
51 $(MAKE
) includedir="$(STAGING_DIR)/usr/include" \
52 bindir="$(STAGING_DIR)/usr/bin" \
53 libdir="$(STAGING_DIR)/usr/lib" \
54 shlibdir
="$(STAGING_DIR)/usr/lib" \
55 infodir="$(STAGING_DIR)/usr/share/info/" \
59 ifeq ($(BR2_STATIC_LIBS
),)
60 define DMALLOC_INSTALL_SHARED_LIB
61 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/libdmalloc
*.so
$(TARGET_DIR
)/usr
/lib
65 define DMALLOC_INSTALL_TARGET_CMDS
66 $(DMALLOC_INSTALL_SHARED_LIB
)
67 cp
-dpf
$(STAGING_DIR
)/usr
/bin
/dmalloc
$(TARGET_DIR
)/usr
/bin
/dmalloc
70 $(eval
$(autotools-package
))