84a66d9937
Signed-off-by: Matthias Reichl <hias@horus.com>
73 lines
1.9 KiB
Makefile
73 lines
1.9 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
PKG_NAME="libretro-picodrive"
|
|
PKG_VERSION="c567d74ce42078f58168debe7e5e414bda441b6c"
|
|
PKG_SHA256="a4a737c6a550454969ae81f3c525c66eaf9253500430e9e1184fc620b0d5e2db"
|
|
PKG_LICENSE="MAME"
|
|
PKG_SITE="https://github.com/kodi-game/picodrive"
|
|
PKG_URL="https://github.com/kodi-game/picodrive/releases/download/picodrive-${PKG_VERSION}/picodrive-${PKG_VERSION}.tar.gz"
|
|
PKG_DEPENDS_HOST="toolchain:host"
|
|
PKG_DEPENDS_TARGET="toolchain kodi-platform ${PKG_NAME}:host"
|
|
PKG_DEPENDS_UNPACK="cyclone68000"
|
|
PKG_LONGDESC="Fast MegaDrive/MegaCD/32X emulator"
|
|
PKG_TOOLCHAIN="manual"
|
|
PKG_BUILD_FLAGS="-gold"
|
|
|
|
PKG_LIBNAME="picodrive_libretro.so"
|
|
PKG_LIBPATH="${PKG_LIBNAME}"
|
|
PKG_LIBVAR="PICODRIVE_LIB"
|
|
|
|
pre_build_host() {
|
|
cp -a $(get_build_dir cyclone68000)/* ${PKG_BUILD}/cpu/cyclone/
|
|
}
|
|
|
|
pre_configure_host() {
|
|
# fails to build in subdirs
|
|
cd ${PKG_BUILD}
|
|
rm -rf .${HOST_NAME}
|
|
}
|
|
|
|
make_host() {
|
|
if [ "${ARCH}" = "arm" ]; then
|
|
make -C cpu/cyclone CONFIG_FILE=../cyclone_config.h
|
|
fi
|
|
}
|
|
|
|
pre_configure_target() {
|
|
# fails to build in subdirs
|
|
cd ${PKG_BUILD}
|
|
rm -rf .${TARGET_NAME}
|
|
}
|
|
|
|
post_configure_target() {
|
|
sed -e "s|^GIT_VERSION :=.*$|GIT_VERSION := \" ${PKG_VERSION:0:7}\"|" -i Makefile.libretro
|
|
}
|
|
|
|
make_target() {
|
|
if target_has_feature neon; then
|
|
export HAVE_NEON=1
|
|
export BUILTIN_GPU=neon
|
|
else
|
|
export HAVE_NEON=0
|
|
fi
|
|
|
|
case ${TARGET_ARCH} in
|
|
aarch64)
|
|
R= make -f Makefile.libretro platform=aarch64
|
|
;;
|
|
arm)
|
|
R= make -f Makefile.libretro platform=armv
|
|
;;
|
|
x86_64)
|
|
R= make -f Makefile.libretro
|
|
;;
|
|
esac
|
|
}
|
|
|
|
makeinstall_target() {
|
|
mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}
|
|
cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}
|
|
echo "set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake
|
|
}
|