diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 34 |
1 files changed, 28 insertions, 6 deletions
@@ -1,8 +1,12 @@ # Maintainer: Pellegrino Prevete <pellegrinoprevete@gmail.com> # shellcheck disable=SC2034 +_arch="mips" _platform="ps2" +_iop="${_arch}el-${_platform}" +_ee="${_arch}64r5900el-${_platform}-elf" _pkg="FreeMcBoot" +_base="sdk" pkgname="freemcboot" pkgver="v0.1" pkgrel=1 @@ -16,7 +20,7 @@ _ns="TnA-Plastic" _github="https://github.com/${_ns}" _local="ssh://git@127.0.0.1:/home/git" url="${_github}/${_pkg}" -makedepends=("${_platform}-sdk") +makedepends=("${_platform}-${_base}") optdepends=() _commit="2e4eef9a1ec5612cde1121d185996fd08fecb930" source=("${pkgname}::git+${url}#commit=${_commit}") @@ -27,6 +31,12 @@ _cflags=(-I"/usr/${_ee}/include/pthread-embedded") # -I"/usr/${_ee}/include/newlib-nano") # -static) +_iop_incs=(-I"/usr/${_iop}/include" + -I"/usr/include/${_platform}${_base}") + +_ee_incs=(-I"/usr/${_ee}/include" + -I"/usr/include/${_platform}${_base}") + _ldflags=(-L"/usr/${_ee}/lib/pthread-embedded" # -L"/usr/${_ee}/lib/newlib-nano" "/usr/${_ee}/lib/newlib-nano/libc_nano.a" @@ -34,10 +44,13 @@ _ldflags=(-L"/usr/${_ee}/lib/pthread-embedded" "/usr/${_ee}/lib/newlib-nano/libg_nano.a" "/usr/${_ee}/lib/newlib-nano/crt0.o") -_build_opts=(CFLAGS="${_cflags[*]}" - CPPFLAGS="${_cflags[*]}" - CXXFLAGS="${_cflags[*]}" - LDFLAGS="${_ldflags[*]}") +_build_opts=(IOP_INCS="${_iop_incs[*]}" + EE_CC="${_ee}-gcc" + EE_INCS="${_ee_incs[*]}") + # CFLAGS="${_cflags[*]}" + # CPPFLAGS="${_cflags[*]}" + # CXXFLAGS="${_cflags[*]}" + # LDFLAGS="${_ldflags[*]}") build() { @@ -45,6 +58,9 @@ build() { export CXXFLAGS="" export CPPFLAGS="" export LDLAGS="" + export IOP_CC="" + export EE_CC="" + export EE_INCS="" # export C_INCLUDE_PATH="/usr/${_ee}/include/pthread-embedded" # export IOP_CFLAGS="${_cflags[*]}" @@ -56,6 +72,9 @@ build() { # export LDFLAGS="${_ldflags[*]}" # export PS2SDK="${pkgdir}/usr" # export IOP_TOOL_PREFIX="${_iop}-elf-" + export IOP_INCS="${_iop_incs[*]}" + export EE_CC="${_ee}-gcc" + export EE_INCS="${_ee_incs[*]}" cd "${srcdir}/${pkgname}" ls @@ -69,7 +88,10 @@ build() { # EE_LDLAGS="${_cflags[*]}" \ # IOP_LDLAGS="${_cflags[*]}" \ # LDFLAGS="${_ldflags[*]}" \ - # make "${_build_opts[@]}" build + IOP_INCS="${_iop_incs[*]}" \ + EE_CC="${_ee}-gcc" \ + EE_INCS="${_ee_incs[*]}" \ + make "${_build_opts[@]}" # build } # shellcheck disable=SC2154 |