Page 2 of 2
Re: Harbour on Android (?)
Posted: Mon Apr 11, 2011 1:06 pm
by mbelgrano
How?
need modification in c:\harbour\config
Antonio Linares wrote:Massimo,
I am interested in it and I plan to continue research about it, first step is to be able to build Harbour for Android.
Re: Harbour on Android (?)
Posted: Thu Apr 14, 2011 3:59 am
by Antonio Linares
Massimo,
First tests building Harbour for Android
https://groups.google.com/group/harbour-devel/t/d983d0d3462ca9d1?hl=esAndroid.mk
Code: Select all | Expand
LOCAL_PATH := ~/harbour/harbour/src
include $(CLEAR_VARS)
LOCAL_MODULE := libhbvm
LOCAL_SRC_FILES := vm/arrays.c vm/arrayshb.c vm/asort.c vm/vm.c
LOCAL_CFLAGS := -I/Users/anto/harbour/harbour/include
include $(BUILD_STATIC_LIBRARY)
Application.mk
Then I run this:
then I run this:
antos-iMac:jni anto$ pwd
/Users/anto/Desktop/android-ndk-r5b/samples/harbour/jni
antos-iMac:jni anto$ ../../../ndk-build
Compile thumb : hbvm <= arrays.c
Compile thumb : hbvm <= arrayshb.c
Compile thumb : hbvm <= asort.c
Compile thumb : hbvm <= vm.c
StaticLibrary : libhbvm.a
antos-iMac:jni anto$
And libhbvm.a gets properly built
In android-ndk-r5b/toolchain there is the gcc compiler, so I guess that we could avoid the call to ndk-build and adapt the Harbour makefile.
Re: Harbour on Android (?)
Posted: Fri Apr 15, 2011 9:29 am
by pcordonet
Hola Antonio,
Como te podemos ayudar ?
Podemos hacer algo?
Lo que estas haciendo, es compilar desde Mac ?
Se puede hacer lo mismo con Windows?
Gracias.
Re: Harbour on Android (?)
Posted: Fri Apr 15, 2011 11:33 pm
by Antonio Linares
Pere,
Lo que estamos intentando ahora es ver la forma de construir Harbour para Android.
Puedes descargar el NDK (Native Development Kit) para Android y revisar los ejemplos de la carpeta samples:
http://developer.android.com/sdk/ndk/index.htmlPuedes usar el NDK desde Windows, Mac ó Linux.
Tenemos dos caminos, uno es usar los makes de ejemplo que proporciona el NDK y otro es modificar el make de Harbour para que llame al gcc del NDK.
De todas formas vamos a ir publicando aqui el resultado de nuestras pruebas y contando como vamos avanzando para que podais hacer un seguimiento
Re: Harbour on Android (?)
Posted: Sun Apr 17, 2011 11:49 am
by Antonio Linares
Pruebas actuales:
I have modified harbour/config/global.mk this way, as a start:
anto@ubuntu:~/harbour/harbour/config$ diff global.mk global_old.mk
970,975d969
< ifeq ($(HB_PLATFORM),android)
< HB_COMP_PATH := ~/Desktop/android-ndk-r5b/toolchains/arm-
linux-androideabi-4.4.3/prebuilt/linux-x86/bin
< HB_COMPILER := arm-linux-androideabi-gcc
< HB_CPU := arm
< HB_CROSS_PLATFORM := yes
< HB_HOST_BIN := ~/harbour/harbour/bin/android/arm
1036d1029
< endif
Then I have created a folder harbour/config/android and copied gcc.mk
and global.mk from harbour/config/linux, then renamed gcc.mk as
arm-linux-androideabi-gcc.mk
Finally I do:
export HB_PLATFORM=android
make
Next I will set the right headers files path for the used gcc and test
it again
Re: Harbour on Android (?)
Posted: Sun Apr 17, 2011 12:09 pm
by Antonio Linares
Also:
anto@ubuntu:~/harbour/harbour$ diff config/android/arm-linux-
androideabi-gcc.mk config/linux/gcc.mk
9c9
< HB_CMP := ~/Desktop/android-ndk-r5b/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
---
> HB_CMP := gcc
anto@ubuntu:~/harbour/harbour$
Re: Harbour on Android (?)
Posted: Mon Apr 18, 2011 11:27 am
by Antonio Linares
We are on the right way!
Re: Harbour on Android (?)
Posted: Sat Apr 23, 2011 7:42 am
by Andrés González
Hola Antonio, no se si voy bien encaminado. No tengo Linux en ninguna máquina de casa, solo en el trabajo. Por eso quería preguntarte si se puede hacer desde windows. He creado con un vmware la maquina virtual Android 2.2, pero ni por asomo está configurada con tu pantalla. Puedes explicar cual ha sido el procedimiento de creación. Eso que es un emulador o es el SO del Android?
Re: Harbour on Android (?)
Posted: Sat Apr 23, 2011 9:46 am
by Andrés González
Sorry wrong language.