1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/scripts/build/debug/dmalloc.sh Fri May 18 15:57:16 2007 +0000
1.3 @@ -0,0 +1,53 @@
1.4 +# Build script for the dmalloc debug library facility
1.5 +
1.6 +is_enabled="${CT_DMALLOC}"
1.7 +
1.8 +do_debug_dmalloc_get() {
1.9 + CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/
1.10 +}
1.11 +
1.12 +do_debug_dmalloc_extract() {
1.13 + CT_ExtractAndPatch "dmalloc-${CT_DMALLOC_VERSION}"
1.14 +}
1.15 +
1.16 +do_debug_dmalloc_build() {
1.17 + CT_DoStep INFO "Installing dmalloc"
1.18 + CT_DoLog EXTRA "Configuring dmalloc"
1.19 +
1.20 + mkdir -p "${CT_BUILD_DIR}/build-dmalloc"
1.21 + cd "${CT_BUILD_DIR}/build-dmalloc"
1.22 +
1.23 + extra_config=
1.24 + case "${CT_CC_LANG_CXX}" in
1.25 + y) extra_config="${extra_config} --enable-cxx";;
1.26 + *) extra_config="${extra_config} --disable-cxx";;
1.27 + esac
1.28 + case "${CT_LIBC_THREADS_NONE}" in
1.29 + y) extra_config="${extra_config} --disable-threads";;
1.30 + *) extra_config="${extra_config} --enable-threads";;
1.31 + esac
1.32 + case "${CT_SHARED_LIBS}" in
1.33 + y) extra_config="${extra_config} --enable-shlib";;
1.34 + *) extra_config="${extra_config} --disable-shlib";;
1.35 + esac
1.36 +
1.37 + CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
1.38 +
1.39 + LD="${CT_TARGET}-ld" \
1.40 + AR="${CT_TARGET}-ar" \
1.41 + "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure" \
1.42 + --prefix=/usr \
1.43 + --build="${CT_BUILD}" \
1.44 + --host="${CT_TARGET}" \
1.45 + ${extra_config} 2>&1 |CT_DoLog ALL
1.46 +
1.47 + CT_DoLog EXTRA "Building dmalloc"
1.48 + make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
1.49 +
1.50 + CT_DoLog EXTRA "Building dmalloc"
1.51 + make DESTDIR="${CT_SYSROOT_DIR}" installincs \
1.52 + installlib 2>&1 |CT_DoLog ALL
1.53 + make DESTDIR="${CT_DEBUG_INSTALL_DIR}" installutil 2>&1 |CT_DoLog ALL
1.54 +
1.55 + CT_EndStep
1.56 +}