1 # This file adds the functions to build the CLooG library
2 # Copyright 2009 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 do_cloog_extract() { :; }
9 # Overide functions depending on configuration
10 if [ "${CT_CLOOG}" = "y" ]; then
14 CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \
15 ftp://gcc.gnu.org/pub/gcc/infrastructure
22 CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
24 # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
25 # while versions 0.15.4 onward do have the version in the dirname.
26 case "${CT_CLOOG_VERSION}" in
28 *) _t="-${CT_CLOOG_VERSION}";;
30 CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}"
31 CT_Patch nochdir "cloog-ppl" "${CT_CLOOG_VERSION}"
40 # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
41 # while versions 0.15.4 onward do have the version in the dirname.
42 case "${CT_CLOOG_VERSION}" in
44 *) _t="-${CT_CLOOG_VERSION}";;
47 mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
48 cd "${CT_BUILD_DIR}/build-cloog-ppl"
50 CT_DoStep INFO "Installing CLooG/ppl"
52 CT_DoLog EXTRA "Configuring CLooG/ppl"
54 if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
55 cloog_opts+=( --enable-shared --disable-static )
57 cloog_opts+=( --disable-shared --enable-static )
58 cloog_LDFLAGS='-lstdc++ -lm'
61 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
62 LDFLAGS="${cloog_LDFLAGS}" \
64 "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \
67 --prefix="${CT_COMPLIBS_DIR}" \
68 --with-gmp="${CT_COMPLIBS_DIR}" \
69 --with-ppl="${CT_COMPLIBS_DIR}" \
73 CT_DoLog EXTRA "Building CLooG/ppl"
74 CT_DoExecLog ALL make ${PARALLELMFLAGS}
76 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
77 CT_DoLog EXTRA "Checking CLooG/ppl"
78 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
81 CT_DoLog EXTRA "Installing CLooG/ppl"
82 CT_DoExecLog ALL make install
84 # Remove spuriously installed file
85 CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/cloog"