Harbour on Android (?)

User avatar
mbelgrano
Posts: 52
Joined: Mon Oct 17, 2005 8:42 pm

Re: Harbour on Android (?)

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Harbour on Android (?)

Post by Antonio Linares »

Massimo,

First tests building Harbour for Android :-)

https://groups.google.com/group/harbour ... a9d1?hl=es

Android.mk

Code: Select all

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

Code: Select all

APP_MODULES=libhbvm 
 
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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
pcordonet
Posts: 110
Joined: Sat Jan 30, 2010 8:35 am
Location: Girona

Re: Harbour on Android (?)

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Harbour on Android (?)

Post 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.html
Puedes usar el NDK desde Windows, Mac ó Linux.

Tenemos _, 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Harbour on Android (?)

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Harbour on Android (?)

Post 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$
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Harbour on Android (?)

Post by Antonio Linares »

We are on the right way! :-)

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Andrés González
Posts: 625
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Re: Harbour on Android (?)

Post 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?
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
Posts: 625
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Re: Harbour on Android (?)

Post by Andrés González »

Sorry wrong language.
Saludos

Andrés González desde Mallorca
Post Reply