scripts/build/companion_libs/ppl.sh
changeset 1324 48c12c696778
child 1369 4a5ef2b08e81
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/build/companion_libs/ppl.sh	Tue May 05 22:04:20 2009 +0000
     1.3 @@ -0,0 +1,66 @@
     1.4 +# This file adds the functions to build the PPL library
     1.5 +# Copyright 2009 Yann E. MORIN
     1.6 +# Licensed under the GPL v2. See COPYING in the root of this package
     1.7 +
     1.8 +do_ppl_get() { :; }
     1.9 +do_ppl_extract() { :; }
    1.10 +do_ppl() { :; }
    1.11 +do_ppl_target() { :; }
    1.12 +
    1.13 +# Overide functions depending on configuration
    1.14 +if [ "${CT_PPL_CLOOG}" = "y" ]; then
    1.15 +
    1.16 +# Download PPL
    1.17 +do_ppl_get() {
    1.18 +    CT_GetFile "ppl-${CT_PPL_VERSION}"                                      \
    1.19 +        http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION}  \
    1.20 +        ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION}
    1.21 +}
    1.22 +
    1.23 +# Extract PPL
    1.24 +do_ppl_extract() {
    1.25 +    CT_Extract "ppl-${CT_PPL_VERSION}"
    1.26 +    CT_Patch "ppl-${CT_PPL_VERSION}"
    1.27 +}
    1.28 +
    1.29 +do_ppl() {
    1.30 +    mkdir -p "${CT_BUILD_DIR}/build-ppl"
    1.31 +    cd "${CT_BUILD_DIR}/build-ppl"
    1.32 +
    1.33 +    CT_DoStep INFO "Installing PPL"
    1.34 +
    1.35 +    CT_DoLog EXTRA "Configuring PPL"
    1.36 +    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    1.37 +    CT_DoExecLog ALL                                \
    1.38 +    "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
    1.39 +        --build=${CT_BUILD}                         \
    1.40 +        --host=${CT_HOST}                           \
    1.41 +        --prefix="${CT_PREFIX_DIR}"                 \
    1.42 +        --with-libgmp-prefix="${CT_PREFIX_DIR}"     \
    1.43 +        --with-libgmpxx-prefix="${CT_PREFIX_DIR}"   \
    1.44 +        --disable-shared                            \
    1.45 +        --enable-static                             \
    1.46 +        --disable-debugging                         \
    1.47 +        --disable-assertions                        \
    1.48 +        --disable-ppl_lcdd                          \
    1.49 +        --disable-ppl_lpsol
    1.50 +
    1.51 +    # Maybe-options:
    1.52 +    # --enable-interfaces=...
    1.53 +    # --enable-optimization=speed  or sspeed (yes, with 2 's')
    1.54 +
    1.55 +    CT_DoLog EXTRA "Building PPL"
    1.56 +    CT_DoExecLog ALL make ${PARALLELMFLAGS}
    1.57 +
    1.58 +    if [ "${CT_PPL_CHECK}" = "y" ]; then
    1.59 +        CT_DoLog EXTRA "Checking PPL"
    1.60 +        CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    1.61 +    fi
    1.62 +
    1.63 +    CT_DoLog EXTRA "Installing PPL"
    1.64 +    CT_DoExecLog ALL make install
    1.65 +
    1.66 +    CT_EndStep
    1.67 +}
    1.68 +
    1.69 +fi # CT_PPL_CLOOG