1 # This file adds the functions to build the ISL library
2 # Copyright 2009 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 do_isl_extract() { :; }
7 do_isl_for_build() { :; }
8 do_isl_for_host() { :; }
10 # Overide functions depending on configuration
11 if [ "${CT_ISL}" = "y" ]; then
15 CT_GetFile "isl-${CT_ISL_VERSION}" \
16 ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/
21 CT_Extract "isl-${CT_ISL_VERSION}"
22 CT_Patch "isl" "${CT_ISL_VERSION}"
25 # Build ISL for running on build
26 # - always build statically
27 # - we do not have build-specific CFLAGS
28 # - install in build-tools prefix
34 case "${CT_TOOLCHAIN_TYPE}" in
35 native|cross) return 0;;
38 CT_DoStep INFO "Installing ISL for build"
39 CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-build-${CT_BUILD}"
41 isl_cflags="${CT_CFLAGS_FOR_BUILD}"
42 isl_cxxflags="${CT_CFLAGS_FOR_BUILD}"
44 isl_opts+=( "host=${CT_BUILD}" )
45 isl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
46 isl_opts+=( "cflags=${isl_cflags}" )
47 isl_opts+=( "cxxflags=${isl_cxxflags}" )
48 isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
49 do_isl_backend "${isl_opts[@]}"
55 # Build ISL for running on host
61 CT_DoStep INFO "Installing ISL for host"
62 CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-host-${CT_HOST}"
64 isl_cflags="${CT_CFLAGS_FOR_HOST}"
65 isl_cxxflags="${CT_CFLAGS_FOR_HOST}"
67 isl_opts+=( "host=${CT_HOST}" )
68 isl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
69 isl_opts+=( "cflags=${isl_cflags}" )
70 isl_opts+=( "cxxflags=${isl_cxxflags}" )
71 isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
72 do_isl_backend "${isl_opts[@]}"
79 # Parameter : description : type : default
80 # host : machine to run on : tuple : (none)
81 # prefix : prefix to install into : dir : (none)
82 # cflags : cflags to use : string : (empty)
83 # ldflags : ldflags to use : string : (empty)
96 CT_DoLog EXTRA "Configuring ISL"
100 CXXFLAGS="${cxxflags}" \
101 LDFLAGS="${ldflags}" \
102 "${CT_SRC_DIR}/isl-${CT_ISL_VERSION}/configure" \
103 --build=${CT_BUILD} \
105 --prefix="${prefix}" \
106 --with-libgmp-prefix="${prefix}" \
107 --with-libgmpxx-prefix="${prefix}" \
108 --with-gmp-prefix="${prefix}" \
112 --with-gmp-prefix="${prefix}" \
116 CT_DoLog EXTRA "Building ISL"
117 CT_DoExecLog ALL make ${JOBSFLAGS}
119 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
120 CT_DoLog EXTRA "Checking ISL"
121 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
124 CT_DoLog EXTRA "Installing ISL"
125 CT_DoExecLog ALL make install