author | "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> |
Sun Jul 17 17:56:22 2011 +0200 (2011-07-17) | |
changeset 2889 | f3b2199620f1 |
parent 2460 | 132c00ad3d6e |
child 2927 | ddaae597fd7c |
permissions | -rw-r--r-- |
yann@1324 | 1 |
# This file adds the functions to build the PPL library |
yann@1324 | 2 |
# Copyright 2009 Yann E. MORIN |
yann@1324 | 3 |
# Licensed under the GPL v2. See COPYING in the root of this package |
yann@1324 | 4 |
|
yann@1324 | 5 |
do_ppl_get() { :; } |
yann@1324 | 6 |
do_ppl_extract() { :; } |
yann@1324 | 7 |
do_ppl() { :; } |
yann@1324 | 8 |
|
yann@1324 | 9 |
# Overide functions depending on configuration |
yann@1808 | 10 |
if [ "${CT_PPL}" = "y" ]; then |
yann@1324 | 11 |
|
yann@1324 | 12 |
# Download PPL |
yann@1324 | 13 |
do_ppl_get() { |
yann@1324 | 14 |
CT_GetFile "ppl-${CT_PPL_VERSION}" \ |
yann@1324 | 15 |
http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION} \ |
yann@1369 | 16 |
ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION} \ |
yann@1369 | 17 |
ftp://gcc.gnu.org/pub/gcc/infrastructure |
yann@1324 | 18 |
} |
yann@1324 | 19 |
|
yann@1324 | 20 |
# Extract PPL |
yann@1324 | 21 |
do_ppl_extract() { |
yann@1324 | 22 |
CT_Extract "ppl-${CT_PPL_VERSION}" |
yann@1901 | 23 |
CT_Patch "ppl" "${CT_PPL_VERSION}" |
yann@1324 | 24 |
} |
yann@1324 | 25 |
|
yann@1324 | 26 |
do_ppl() { |
yann@1324 | 27 |
mkdir -p "${CT_BUILD_DIR}/build-ppl" |
yann@1324 | 28 |
cd "${CT_BUILD_DIR}/build-ppl" |
yann@1324 | 29 |
|
yann@1324 | 30 |
CT_DoStep INFO "Installing PPL" |
yann@1324 | 31 |
|
yann@1324 | 32 |
CT_DoLog EXTRA "Configuring PPL" |
yann@1892 | 33 |
|
yann@1892 | 34 |
|
yann@2348 | 35 |
CT_DoExecLog CFG \ |
yann@1379 | 36 |
CFLAGS="${CT_CFLAGS_FOR_HOST}" \ |
yann@1379 | 37 |
CXXFLAGS="${CT_CFLAGS_FOR_HOST}" \ |
yann@1324 | 38 |
"${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \ |
yann@1324 | 39 |
--build=${CT_BUILD} \ |
yann@1324 | 40 |
--host=${CT_HOST} \ |
yann@1893 | 41 |
--prefix="${CT_COMPLIBS_DIR}" \ |
yann@1893 | 42 |
--with-libgmp-prefix="${CT_COMPLIBS_DIR}" \ |
yann@1893 | 43 |
--with-libgmpxx-prefix="${CT_COMPLIBS_DIR}" \ |
anthony@2459 | 44 |
--with-gmp-prefix="${CT_COMPLIBS_DIR}" \ |
yann@2364 | 45 |
--enable-watchdog \ |
yann@1324 | 46 |
--disable-debugging \ |
yann@1324 | 47 |
--disable-assertions \ |
yann@1324 | 48 |
--disable-ppl_lcdd \ |
yann@1892 | 49 |
--disable-ppl_lpsol \ |
yann@2381 | 50 |
--disable-shared \ |
anthony@2461 | 51 |
--enable-interfaces='c c++' \ |
yann@2381 | 52 |
--enable-static |
yann@1324 | 53 |
|
yann@1324 | 54 |
# Maybe-options: |
yann@1324 | 55 |
# --enable-optimization=speed or sspeed (yes, with 2 's') |
yann@1324 | 56 |
|
yann@1324 | 57 |
CT_DoLog EXTRA "Building PPL" |
yann@2275 | 58 |
CT_DoExecLog ALL make ${JOBSFLAGS} |
yann@1324 | 59 |
|
yann@1890 | 60 |
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then |
yann@1324 | 61 |
CT_DoLog EXTRA "Checking PPL" |
yann@2275 | 62 |
CT_DoExecLog ALL make ${JOBSFLAGS} -s check |
yann@1324 | 63 |
fi |
yann@1324 | 64 |
|
yann@1324 | 65 |
CT_DoLog EXTRA "Installing PPL" |
yann@1324 | 66 |
CT_DoExecLog ALL make install |
yann@1324 | 67 |
|
yann@1397 | 68 |
# Remove spuriously installed file |
yann@1397 | 69 |
CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/ppl-config" |
yann@1397 | 70 |
|
yann@1324 | 71 |
CT_EndStep |
yann@1324 | 72 |
} |
yann@1324 | 73 |
|
yann@1808 | 74 |
fi # CT_PPL |