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() { :; }
8 do_cloog_target() { :; }
10 # Overide functions depending on configuration
11 if [ "${CT_CLOOG}" = "y" ]; then
15 CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \
16 ftp://gcc.gnu.org/pub/gcc/infrastructure
23 CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
25 # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
26 # while versions 0.15.4 onward do have the version in the dirname.
27 case "${CT_CLOOG_VERSION}" in
29 *) _t="-${CT_CLOOG_VERSION}";;
31 CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}"
32 CT_Patch nochdir "cloog-ppl" "${CT_CLOOG_VERSION}"
41 # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
42 # while versions 0.15.4 onward do have the version in the dirname.
43 case "${CT_CLOOG_VERSION}" in
45 *) _t="-${CT_CLOOG_VERSION}";;
48 mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
49 cd "${CT_BUILD_DIR}/build-cloog-ppl"
51 CT_DoStep INFO "Installing CLooG/ppl"
53 CT_DoLog EXTRA "Configuring CLooG/ppl"
55 if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
56 cloog_opts+=( --enable-shared --disable-static )
58 cloog_opts+=( --disable-shared --enable-static )
59 cloog_LDFLAGS='-lstdc++'
62 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
63 LDFLAGS="${cloog_LDFLAGS}" \
65 "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \
68 --prefix="${CT_COMPLIBS_DIR}" \
69 --with-gmp="${CT_COMPLIBS_DIR}" \
70 --with-ppl="${CT_COMPLIBS_DIR}" \
74 CT_DoLog EXTRA "Building CLooG/ppl"
75 CT_DoExecLog ALL make ${PARALLELMFLAGS}
77 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
78 CT_DoLog EXTRA "Checking CLooG/ppl"
79 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
82 CT_DoLog EXTRA "Installing CLooG/ppl"
83 CT_DoExecLog ALL make install
85 # Remove spuriously installed file
86 CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/cloog"