Skip to content

Commit abbe3a6

Browse files
committed
ANDROID: update build
1 parent 63809ec commit abbe3a6

File tree

12 files changed

+102
-114
lines changed

12 files changed

+102
-114
lines changed

README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ Then use it to cross-compile the tools:
3030
make
3131
make install DESTDIR=$(pwd)
3232

33-
3. Build common
33+
3. setup config.h
3434

35-
./configure --enable-android --host=arm-linux-androideabi
35+
./configure --enable-android
3636

3737
4. Build the native activity
3838

39-
$ cd src/platform/andoid/jni && $NDK/ndk-build
39+
$ cd src/platform/andoid/jni && $NDK/ndk-build NDK_DEBUG=0
4040

4141
$ cd - && cd ide/android/ && ant release install
4242

configure.ac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dnl This program is distributed under the terms of the GPL v2.0
77
dnl Download the GNU Public License (GPL) from www.gnu.org
88
dnl
99

10-
AC_INIT([smallbasic], [0.11.10])
10+
AC_INIT([smallbasic], [0.11.11])
1111
AC_CONFIG_SRCDIR([configure.ac])
1212

1313
AC_CANONICAL_TARGET
@@ -511,7 +511,7 @@ function buildTizen() {
511511
}
512512

513513
function buildAndroid() {
514-
TARGET="Building common library for Android."
514+
TARGET="Building for Android."
515515

516516
defaultConditionals
517517

@@ -528,7 +528,7 @@ function buildAndroid() {
528528
AC_DEFINE(IMPL_LOG_WRITE, 1, [Driver implements lwrite()])
529529
AC_DEFINE(USE_TERM_IO, 0, [Does not use terminal-io functions.])
530530

531-
BUILD_SUBDIRS="src/platform/android/common"
531+
BUILD_SUBDIRS="src/platform/android"
532532
AC_SUBST(BUILD_SUBDIRS)
533533
}
534534

@@ -654,7 +654,7 @@ src/platform/mingw/Makefile
654654
src/platform/unix/Makefile
655655
src/platform/mosync/common/Makefile
656656
src/platform/tizen/common/Makefile
657-
src/platform/android/common/Makefile
657+
src/platform/android/Makefile
658658
])
659659
AC_OUTPUT
660660

ide/android/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="net.sourceforge.smallbasic"
44
android:installLocation="preferExternal"
5-
android:versionCode="12"
6-
android:versionName="0.11.10">
5+
android:versionCode="13"
6+
android:versionName="0.11.11">
77
<!-- This is the platform API where NativeActivity was introduced. -->
88
<uses-sdk android:minSdkVersion="9" />
99

ide/android/assets/main.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sub about()
3030
print "(_ ._ _ _.|||_) /\ (_ |/ "
3131
print "__)| | |(_||||_)/--\__)|\_"
3232
print
33-
print "Version 0.11.10"
33+
print "Version 0.11.11"
3434
print
3535
print "Copyright (c) 2002-2014 Chris Warren-Smith"
3636
print "Copyright (c) 2000-2006 Nic Christopoulos" + chr(10)

ide/android/build.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<project name="SmallBASIC" default="help">
33

44
<!-- Build requires the following setup:
5-
ln -s jni -> ../../src/platform/android/jni
6-
ln -s libs -> ../../src/platform/android/libs/
7-
ln -s obj -> ../../src/platform/android/obj/
8-
src -> ../../src/platform/android/src/
5+
ln -s ../../src/platform/android/jni jni
6+
ln -s ../../src/platform/android/libs libs
7+
ln -s ../../src/platform/android/obj obj
8+
ln -s ../../src/platform/android/src src
99
-->
1010

1111
<!-- The local.properties file is created and updated by the 'android' tool.

src/platform/android/Makefile.am

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SmallBASIC
2+
# Copyright(C) 2001-2014 Chris Warren-Smith.
3+
#
4+
# This program is distributed under the terms of the GPL v2.0 or later
5+
# Download the GNU Public License (GPL) from www.gnu.org
6+
#
7+
8+
all-am: Makefile ant-build
9+
10+
ndk-build-test:
11+
(cd jni && ${NDK}/ndk-build NDK_DEBUG=1)
12+
13+
ant-build-test: ndk-build-test
14+
(cd ../../../ide/android && ant -quiet debug install)
15+
16+
test: ant-build-test
17+
(cd ../../../ide/android && \
18+
adb -a logcat -c && \
19+
adb -a shell am start net.sourceforge.smallbasic/net.sourceforge.smallbasic.MainActivity && \
20+
adb -a logcat)

src/platform/android/common/Makefile.am

Lines changed: 0 additions & 88 deletions
This file was deleted.

src/platform/android/jni/Android.mk

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
# Download the GNU Public License (GPL) from www.gnu.org
66
#
77

8-
# see: ~/android-sdk/android-ndk-r9b/docs/ANDROID-MK.html
9-
10-
LOCAL_PATH := $(call my-dir)
11-
SB_HOME := $(LOCAL_PATH)/../../../..
8+
JNI_PATH := $(call my-dir)
9+
SB_HOME := $(JNI_PATH)/../../../..
1210
PNG_HOME := $(HOME)/android-sdk/libpng-1.6.12/png
1311
FREETYPE_HOME := $(HOME)/android-sdk/freetype-2.5.3/freetype
1412

15-
include $(CLEAR_VARS)
16-
LOCAL_MODULE := sb_common
17-
LOCAL_SRC_FILES := ../common/libsb_common.a
18-
include $(PREBUILT_STATIC_LIBRARY)
13+
include $(call all-subdir-makefiles)
14+
LOCAL_PATH := $(JNI_PATH)
1915

2016
include $(CLEAR_VARS)
2117
LOCAL_MODULE := png
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
APP_PLATFORM := android-9
2-
3-
# uncomment for release
42
APP_ABI := armeabi armeabi-v7a
53

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SmallBASIC
2+
# Copyright(C) 2001-2014 Chris Warren-Smith.
3+
#
4+
# This program is distributed under the terms of the GPL v2.0 or later
5+
# Download the GNU Public License (GPL) from www.gnu.org
6+
#
7+
8+
LOCAL_PATH := $(call my-dir)
9+
include $(CLEAR_VARS)
10+
11+
COMMON=$(SB_HOME)/src/common
12+
13+
LOCAL_C_INCLUDES := $(SB_HOME) $(SB_HOME)/src
14+
LOCAL_MODULE := sb_common
15+
LOCAL_CFLAGS := -DHAVE_CONFIG_H=1
16+
LOCAL_SRC_FILES := \
17+
$(COMMON)/bc.c \
18+
$(COMMON)/blib.c \
19+
$(COMMON)/blib_db.c \
20+
$(COMMON)/blib_func.c \
21+
$(COMMON)/blib_graph.c \
22+
$(COMMON)/blib_math.c \
23+
$(COMMON)/matrix.c \
24+
$(COMMON)/blib_sound.c \
25+
$(COMMON)/brun.c \
26+
$(COMMON)/ceval.c \
27+
$(COMMON)/circle.c \
28+
$(COMMON)/decomp.c \
29+
$(COMMON)/device.c \
30+
$(COMMON)/screen.c \
31+
$(COMMON)/system.c \
32+
$(COMMON)/eval.c \
33+
$(COMMON)/extlib.c \
34+
$(COMMON)/file.c \
35+
$(COMMON)/ffill.c \
36+
$(COMMON)/fmt.c \
37+
$(COMMON)/fs_serial.c \
38+
$(COMMON)/fs_socket_client.c \
39+
$(COMMON)/fs_stream.c \
40+
$(COMMON)/g_line.c \
41+
$(COMMON)/geom.c \
42+
$(COMMON)/inet.c \
43+
$(COMMON)/kw.c \
44+
$(COMMON)/match.c \
45+
$(COMMON)/mem.c \
46+
$(COMMON)/panic.c \
47+
$(COMMON)/pfill.c \
48+
$(COMMON)/plot.c \
49+
$(COMMON)/proc.c \
50+
$(COMMON)/sberr.c \
51+
$(COMMON)/scan.c \
52+
$(COMMON)/str.c \
53+
$(COMMON)/tasks.c \
54+
$(COMMON)/var_uds.c \
55+
$(COMMON)/var_hash.c \
56+
$(COMMON)/keymap.c \
57+
$(COMMON)/units.c \
58+
$(COMMON)/var.c \
59+
$(COMMON)/vmt.c
60+
61+
include $(BUILD_STATIC_LIBRARY)
62+

0 commit comments

Comments
 (0)