2021-04-03 06:53:41 +03:00
|
|
|
#!/usr/bin/env bash
|
2021-09-24 23:15:38 +03:00
|
|
|
|
2021-04-19 23:43:54 +03:00
|
|
|
export SERENITY_SOURCE_DIR="$(realpath "${SCRIPT}/../")"
|
2021-09-24 23:15:38 +03:00
|
|
|
|
|
|
|
if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then
|
|
|
|
export SERENITY_BUILD_DIR="${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}clang"
|
|
|
|
export CC="clang --target=${SERENITY_ARCH}-pc-serenity --sysroot=${SERENITY_BUILD_DIR}/Root"
|
|
|
|
export CXX="clang++ --target=${SERENITY_ARCH}-pc-serenity --sysroot=${SERENITY_BUILD_DIR}/Root"
|
|
|
|
export AR="llvm-ar"
|
|
|
|
export RANLIB="llvm-ranlib"
|
2022-01-08 15:50:11 +03:00
|
|
|
export READELF="llvm-readelf"
|
2021-09-24 23:15:38 +03:00
|
|
|
export PATH="${SERENITY_SOURCE_DIR}/Toolchain/Local/clang/bin:${HOST_PATH}"
|
|
|
|
else
|
|
|
|
export SERENITY_BUILD_DIR="${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}"
|
|
|
|
export CC="${SERENITY_ARCH}-pc-serenity-gcc"
|
|
|
|
export CXX="${SERENITY_ARCH}-pc-serenity-g++"
|
|
|
|
export AR="${SERENITY_ARCH}-pc-serenity-ar"
|
|
|
|
export RANLIB="${SERENITY_ARCH}-pc-serenity-ranlib"
|
2022-01-08 15:50:11 +03:00
|
|
|
export READELF="${SERENITY_ARCH}-pc-serenity-readelf"
|
2021-09-24 23:15:38 +03:00
|
|
|
export PATH="${SERENITY_SOURCE_DIR}/Toolchain/Local/${SERENITY_ARCH}/bin:${HOST_PATH}"
|
|
|
|
fi
|
|
|
|
|
2021-04-11 17:20:53 +03:00
|
|
|
export PKG_CONFIG_DIR=""
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
|
|
|
|
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/lib/pkgconfig/:${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig"
|
2021-04-19 23:43:54 +03:00
|
|
|
|
2021-04-18 10:13:16 +03:00
|
|
|
enable_ccache
|
2021-04-14 21:32:43 +03:00
|
|
|
|
|
|
|
DESTDIR="${SERENITY_BUILD_DIR}/Root"
|
2021-04-19 23:43:54 +03:00
|
|
|
export SERENITY_INSTALL_ROOT="$DESTDIR"
|