Compiling mame2003 core and adding it to retroarch. Is this the right way to do it?

Hi, sorry if my first post is a question, but I’d like to know if I compiled the mame2003 correctly.

My development environment is Ubuntu Lucid Lynx 32 bits.

I downloaded the libretro source with GIT. I opened a shell to the libretro-mame2003 folder and I typed this command

make -j2 V1

The compile process went smooth and I ended with a file named mame2003_libretro.so

The question is, is this really well compiled? I mean, is it compiled to run on armeabi architectures and not x86? Which android version is it compiled?

The reason I’m doing this is because the mame core available through libretro’s site are comipled to support android only lollipop or higher. I need to compile this core to work with android Jelly Bean (4.2.2)

I also would like to know how to add it to the android retroarch installation given that the only way to add cores though the GUI is to download them with the update manager.

By the way, I also tried to compile through the shell files provided in the contents downloaded from GIT, but to no avail:


libretro-super$ ./libretro-build-android-mk.sh mame2003

The first time I run that script it complained about the NDK_PROJECT_PATH environment variable which I set it to the libretro-mame2003 folder. I don’t know it that’s OK… The second time it complained about the environment variable APP_BUILD_SCRIPT whcih I don’t know what should I set it to. Also, the libretro-mame2003 doesn’t have a jni folder so I don’t know if it can be compiled through the shell files.

I hope you can shed me some light on this. Thanks everyone for all your effort in developing retroarch!

Greets!

If it doesn’t have a JNI target, it can’t be compiled for Android at all, unfortunately.

Sorry, I’ve inspected it more thoroughly and there’s a jni folder in the libretro-mame2003/src/libretro folder.

I’ve also inspected the Android.mk file there and there’s an environmente variable (I think) to choose the architecture called TARGET_ARCH. I’ve set it through this command:

export TARGET_ARCH=arm

and now I’m compiling it again with the following command.


make clean
make -j2 V1

Would the new mame2003_libretro.so be compiled for android? If so, which version is it compiled and how do I set it?

Thanks!

Hi, now I’ve tried compiling it in windows through Git Bash with this command:

./libretro-build-android-mk.sh mame2003 src/libretro

but the compiler complains with these lines

Android NDK: Could not find application project directory !
Android NDK: Please define the [B]NDK_PROJECT_PATH [/B]variable to point to it.

What value should i set that environment variable to? I’ve tried setting it to /libretro-super/libretro-mame2003/src/libretro, but then this error shows up:


$ ./libretro-build-android-mk.sh mame2003 src/libretro
PLATFORM: win

ARCHITECTURE: x86_64
TARGET: win
Script: /libretro-super/libretro-build-android-mk.sh
Directory /libretro-super/dist already exists, skipping creation...
Directory /libretro-super/dist/android already exists, skipping creation...
Directory /libretro-super/dist/android/armeabi already exists, skipping creation...
Directory /libretro-super/dist/android/armeabi-v7a already exists, skipping creation...
Directory /libretro-super/dist/android/x86 already exists, skipping creation...
=== Building mame2003 ===
./libretro-build-android-mk.sh: line 51: cd: jni: No such file or directory
Clean: retro [armeabi]
Clean: stdc++ [armeabi]
make: *** No rule to make target `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//jni/../../..//src/version.c', needed by `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//obj/local/armeabi/objs/retro/__/__/__//src/version.o'.  Stop.
Failed to build armeabi mame2003
cp: cannot stat `../libs/armeabi/libretro.so': No such file or directory
Clean: retro [armeabi-v7a]
Clean: stdc++ [armeabi-v7a]
make: *** No rule to make target `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//jni/../../..//src/version.c', needed by `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//obj/local/armeabi-v7a/objs/retro/__/__/__//src/version.o'.  Stop.
Failed to build armeabi-v7a mame2003
cp: cannot stat `../libs/armeabi-v7a/libretro.so': No such file or directory
Clean: retro [x86]
Clean: stdc++ [x86]
make: *** No rule to make target `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//jni/../../..//src/version.c', needed by `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//obj/local/x86/objs/retro/__/__/__//src/version.o'.  Stop.
Failed to build x86 mame2003
cp: cannot stat `../libs/x86/libretro.so': No such file or directory

$ ./libretro-build-android-mk.sh mame2003 src/libretro
PLATFORM: win
ARCHITECTURE: x86_64
TARGET: win
Script: /libretro-super/libretro-build-android-mk.sh
Directory /libretro-super/dist already exists, skipping creation...
Directory /libretro-super/dist/android already exists, skipping creation...
Directory /libretro-super/dist/android/armeabi already exists, skipping creation...
Directory /libretro-super/dist/android/armeabi-v7a already exists, skipping creation...
Directory /libretro-super/dist/android/x86 already exists, skipping creation...
=== Building mame2003 ===
./libretro-build-android-mk.sh: line 51: cd: jni: No such file or directory
Clean: retro [armeabi]
Clean: stdc++ [armeabi]
make: *** No rule to make target `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//jni/../../..//src/version.c', needed by `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//obj/local/armeabi/objs/retro/__/__/__//src/version.o'.  Stop.
Failed to build armeabi mame2003
cp: cannot stat `../libs/armeabi/libretro.so': No such file or directory
Clean: retro [armeabi-v7a]
Clean: stdc++ [armeabi-v7a]
make: *** No rule to make target `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//jni/../../..//src/version.c', needed by `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//obj/local/armeabi-v7a/objs/retro/__/__/__//src/version.o'.  Stop.
Failed to build armeabi-v7a mame2003
cp: cannot stat `../libs/armeabi-v7a/libretro.so': No such file or directory
Clean: retro [x86]
Clean: stdc++ [x86]
make: *** No rule to make target `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//jni/../../..//src/version.c', needed by `F:/MinGW/libretro-super/libretro-mame2003/src/libretro//obj/local/x86/objs/retro/__/__/__//src/version.o'.  Stop.
Failed to build x86 mame2003
cp: cannot stat `../libs/x86/libretro.so': No such file or directory


Why is it asking for version.c despite no being anywhere in the files I downloaded with git?

I’d glady accept any help to get out of this trouble. Thanks in advance!