#!/bin/bash
set -e

mkdir -v build
cd build || exit 1

../configure \
    --prefix=/usr \
    --build="$(../config.guess)" \
    --host="${LFS_TGT}" \
    --disable-nls \
    --enable-shared \
    --disable-werror \
    --enable-64-bit-bfd &&
make &&
make DESTDIR="${LFS}" -j1 install &&
install -vm755 libctf/.libs/libctf.so.0.0.0 "${LFS}"/usr/lib