libretro / mame2016-libretro

Late 2016 version of MAME (0.174) for libretro. Compatible with MAME 0.174 sets.
Other
32 stars 40 forks source link

Genius create makefiles for Windows from Linux #31

Closed yhojann-cl closed 5 years ago

yhojann-cl commented 5 years ago

I try compile for Android from Linux:

$uname -a
Linux machine 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic
$ make clean
...
$ OSD=retro RETRO=1 NOWERROR=1 NOASM=1 gcc=android-arm gcc_version=7.4 \
TARGETOS=android-arm CONFIG=libretro NO_USE_MIDI=1 OS=linux \
VERBOSE=1 verbose=1 TARGET=mame \
ANDROID_SDK_ROOT=/home/whk/Android/Sdk/ \
ANDROID_NDK_ROOT=/home/whk/Descargas/retro/android-ndk-r20-linux-x86_64/android-ndk-r20/ \
ANDROID_NDK_ARM=/home/whk/Descargas/retro/android-ndk-r20-linux-x86_64/android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/ \
ANDROID_NDK_CLANG=/home/whk/Descargas/retro/android-ndk-r20-linux-x86_64/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/ \
CMAKE_CXX_COMPILER=/home/whk/Descargas/retro/android-ndk-r20-linux-x86_64/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ \
PATH=$PATH%:/home/whk/Android/Sdk/platform-tools/ \
make

But the compiler says:

mkdir -p "../../../../android-arm/obj/Release"
mkdir -p "../../../../android-arm/obj/Release/src/emu/drivers"
Precompiling src/emu/emu.h...
/home/x/Descargas/retro/android-ndk-r20-linux-x86_64/android-ndk-r20//toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe    -MMD -MP -MP -D__LIBRETRO__ -DNDEBUG -DCRLF=2 -DLSB_FIRST -DFLAC__NO_DLL ...
/bin/sh: 1: /home/x/Descargas/retro/android-ndk-r20-linux-x86_64/android-ndk-r20//toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe: not found

clang++.exe?, I check the build/projects/retro/mame/gmake-android-arm/precompile.make file and this says:

# GNU Make project makefile autogenerated by GENie
...
SHELLTYPE := msdos
...
CC  = $(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
CXX = $(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

GENie generate a makefile for Windows? I use a NDK downloaded from official website for Linux builds.

$ file /home/x/Descargas/retro/android-ndk-r20-linux-x86_64/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
...: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.24, stripped
yhojann-cl commented 5 years ago

Ok, solve this removing TARGETOS=android-arm and OS=linux.