diff options
author | circl <circl.lastname@gmail.com> | 2022-04-21 18:58:02 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-04-26 22:45:48 +0200 |
commit | 2130a83640fe956982cc2c14cd3ca381f1f01240 (patch) | |
tree | 6a30313d245a7bc463ec50021cf4b0ff23d9f160 /Ports/.hosted_defs.sh | |
parent | 452334ab6e93d10af0e3c2518b173ccfa008a114 (diff) | |
download | serenity-2130a83640fe956982cc2c14cd3ca381f1f01240.zip |
Ports: Make .hosted_defs.sh usable outside of .port_include.sh
This commit moves some stuff around in order to isolate .hosted_defs.sh
from .port_include.sh
Diffstat (limited to 'Ports/.hosted_defs.sh')
-rw-r--r-- | Ports/.hosted_defs.sh | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Ports/.hosted_defs.sh b/Ports/.hosted_defs.sh index 72a09d0fba..7f7e9fbaf4 100644 --- a/Ports/.hosted_defs.sh +++ b/Ports/.hosted_defs.sh @@ -1,5 +1,23 @@ #!/usr/bin/env bash +SCRIPT="$(dirname "${0}")" + +export SERENITY_ARCH="${SERENITY_ARCH:-i686}" +export SERENITY_TOOLCHAIN="${SERENITY_TOOLCHAIN:-GCC}" + +if [ -z "${HOST_CC:=}" ]; then + export HOST_CC="${CC:=cc}" + export HOST_CXX="${CXX:=c++}" + export HOST_AR="${AR:=ar}" + export HOST_RANLIB="${RANLIB:=ranlib}" + export HOST_PATH="${PATH:=}" + export HOST_READELF="${READELF:=readelf}" + export HOST_OBJCOPY="${OBJCOPY:=objcopy}" + export HOST_PKG_CONFIG_DIR="${PKG_CONFIG_DIR:=}" + export HOST_PKG_CONFIG_SYSROOT_DIR="${PKG_CONFIG_SYSROOT_DIR:=}" + export HOST_PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:=}" +fi + export SERENITY_SOURCE_DIR="$(realpath "${SCRIPT}/../")" if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then @@ -26,7 +44,4 @@ 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" -enable_ccache - -DESTDIR="${SERENITY_BUILD_DIR}/Root" -export SERENITY_INSTALL_ROOT="$DESTDIR" +export SERENITY_INSTALL_ROOT="${SERENITY_BUILD_DIR}/Root" |