diff --git a/build_android/AndroidManifest.xml b/build_android/AndroidManifest.xml new file mode 100644 index 00000000..c12414cb --- /dev/null +++ b/build_android/AndroidManifest.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/build_android/ant.properties b/build_android/ant.properties new file mode 100644 index 00000000..cd3c44e0 --- /dev/null +++ b/build_android/ant.properties @@ -0,0 +1,20 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked in Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + +palleon.dir=C:/Projects/Palleon +source.dir=${palleon.dir}/src/android/java +asset.dir=../data/ \ No newline at end of file diff --git a/build_android/build.xml b/build_android/build.xml new file mode 100644 index 00000000..14c4c0ed --- /dev/null +++ b/build_android/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build_android/build_debug.sh b/build_android/build_debug.sh new file mode 100644 index 00000000..d91c7a4e --- /dev/null +++ b/build_android/build_debug.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +$ANDROID_SDK_ROOT/tools/android.bat update project -p . +$ANDROID_NDK_ROOT/ndk-build NDK_DEBUG=1 +$ANT_HOME/bin/ant debug diff --git a/build_android/build_release.sh b/build_android/build_release.sh new file mode 100644 index 00000000..cd0c06f0 --- /dev/null +++ b/build_android/build_release.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +$ANDROID_SDK_ROOT/tools/android.bat update project -p . +$ANDROID_NDK_ROOT/ndk-build +$ANT_HOME/bin/ant release diff --git a/build_android/clean.sh b/build_android/clean.sh new file mode 100644 index 00000000..16c94a6a --- /dev/null +++ b/build_android/clean.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +$ANDROID_NDK_ROOT/ndk-build clean +$ANDROID_NDK_ROOT/ndk-build clean NDK_DEBUG=1 +$ANT_HOME/bin/ant clean diff --git a/build_android/jni/Android.mk b/build_android/jni/Android.mk new file mode 100644 index 00000000..52d696a5 --- /dev/null +++ b/build_android/jni/Android.mk @@ -0,0 +1,47 @@ +LOCAL_PATH:= $(call my-dir) + +include $(LOCAL_PATH)/ExternalDependencies.mk + +include $(CLEAR_VARS) + +LOCAL_MODULE := libFramework +LOCAL_SRC_FILES := $(FRAMEWORK_PATH)/build_android/obj/local/$(TARGET_ARCH_ABI)/libFramework.a + +include $(PREBUILT_STATIC_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_MODULE := libCodeGen +LOCAL_SRC_FILES := $(CODEGEN_PATH)/build_android/obj/local/$(TARGET_ARCH_ABI)/libCodeGen.a + +include $(PREBUILT_STATIC_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_MODULE := libPlay +LOCAL_SRC_FILES := ../../Source/BasicBlock.cpp \ + ../../Source/COP_FPU.cpp \ + ../../Source/COP_FPU_Reflection.cpp \ + ../../Source/COP_SCU.cpp \ + ../../Source/COP_SCU_Reflection.cpp \ + ../../Source/COP_VU.cpp \ + ../../Source/COP_VU_Reflection.cpp \ + ../../Source/FpMulTruncate.cpp \ + ../../Source/MemoryMap.cpp \ + ../../Source/MemoryUtils.cpp \ + ../../Source/MIPS.cpp \ + ../../Source/MIPSAnalysis.cpp \ + ../../Source/MIPSCoprocessor.cpp \ + ../../Source/MIPSInstructionFactory.cpp \ + ../../Source/MipsJitter.cpp \ + ../../Source/MIPSReflection.cpp \ + ../../Source/MIPSTags.cpp \ + ../../Source/VUShared.cpp \ + ../../Source/VUShared_Reflection.cpp +LOCAL_CFLAGS := -Wno-extern-c-compat +LOCAL_C_INCLUDES := $(BOOST_PATH) $(FRAMEWORK_PATH)/include $(CODEGEN_PATH)/include $(LOCAL_PATH)/../../include +LOCAL_CPP_FEATURES := exceptions rtti +LOCAL_LDLIBS := -landroid +LOCAL_STATIC_LIBRARIES := libCodeGen libFramework + +include $(BUILD_SHARED_LIBRARY) diff --git a/build_android/jni/Application.mk b/build_android/jni/Application.mk new file mode 100644 index 00000000..8f91ec47 --- /dev/null +++ b/build_android/jni/Application.mk @@ -0,0 +1,4 @@ +APP_ABI := armeabi-v7a +APP_STL := c++_static +APP_CPPFLAGS += -std=c++11 +NDK_TOOLCHAIN_VERSION := clang diff --git a/build_android/jni/ExternalDependencies.mk.template b/build_android/jni/ExternalDependencies.mk.template new file mode 100644 index 00000000..0f893014 --- /dev/null +++ b/build_android/jni/ExternalDependencies.mk.template @@ -0,0 +1,3 @@ +BOOST_PATH := /path/to/boost +FRAMEWORK_PATH := /path/to/Framework +CODEGEN_PATH := /path/to/CodeGen diff --git a/build_android/project.properties b/build_android/project.properties new file mode 100644 index 00000000..4ab12569 --- /dev/null +++ b/build_android/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-19 diff --git a/build_android/res/values/strings.xml b/build_android/res/values/strings.xml new file mode 100644 index 00000000..aa138ec5 --- /dev/null +++ b/build_android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Play! +