summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay San <[email protected]>2017-09-26 11:18:58 +0200
committerRay San <[email protected]>2017-09-26 11:18:58 +0200
commit42db9584de7fa5e8b937c662edc2712c09a6b9fb (patch)
tree97f07ea62f59cc9b6216cf8308c783c88af79a6a
parent8068b867426657b152dfe431865e69619464b707 (diff)
downloadraylib-42db9584de7fa5e8b937c662edc2712c09a6b9fb.tar.gz
raylib-42db9584de7fa5e8b937c662edc2712c09a6b9fb.zip
Working on Android APK building...
-rw-r--r--release/android/armeabi-v7a/libraylib.abin440310 -> 497778 bytes
-rw-r--r--templates/android_project/AndroidManifest.xml4
-rw-r--r--templates/android_project/Makefile20
-rw-r--r--templates/android_project/jni/libs/libopenal.sobin2183284 -> 2389824 bytes
-rw-r--r--templates/android_project/jni/libs/libraylib.abin440310 -> 497778 bytes
5 files changed, 12 insertions, 12 deletions
diff --git a/release/android/armeabi-v7a/libraylib.a b/release/android/armeabi-v7a/libraylib.a
index 6c1991be..c37b0730 100644
--- a/release/android/armeabi-v7a/libraylib.a
+++ b/release/android/armeabi-v7a/libraylib.a
Binary files differ
diff --git a/templates/android_project/AndroidManifest.xml b/templates/android_project/AndroidManifest.xml
index a740a727..9c1cf3af 100644
--- a/templates/android_project/AndroidManifest.xml
+++ b/templates/android_project/AndroidManifest.xml
@@ -2,10 +2,10 @@
<!--
* raylib Android project template
*
-* This template has been created using raylib 1.2 (www.raylib.com)
+* This template has been created using raylib 1.8 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-2017 Ramon Santamaria (@raysan5)
*
-->
<!-- NOTE: Game package name must be unique for every app/game -->
diff --git a/templates/android_project/Makefile b/templates/android_project/Makefile
index 991843ae..d8a8ce8b 100644
--- a/templates/android_project/Makefile
+++ b/templates/android_project/Makefile
@@ -25,7 +25,7 @@
PLATFORM ?= PLATFORM_ANDROID
# Android project name (.apk)
-PROJECT_NAME = NativeActivity
+PROJECT_NAME = raylibGame
PROJECT_DIR = ./
# Generated shared library name
@@ -41,7 +41,7 @@ ANDROID_HOME = C:/android-sdk
ANDROID_NDK = C:/android-ndk
ANDROID_TOOLCHAIN = C:/android_toolchain_arm_api16
ANDROID_BUILD_TOOLS = C:/android-sdk/build-tools/26.0.1
-JAVA_HOME = C:/PROGRA~1/Java/jdk1.8.0_25
+JAVA_HOME = C:/PROGRA~1/Java/jdk1.8.0_144
# Compilers
CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-gcc
@@ -54,7 +54,7 @@ CFLAGS = -O2 -s -Wall -std=c99 -DPLATFORM_ANDROID -march=armv7-a -mfloat-abi=sof
INCLUDES = -I. -Ijni/include -I$(ANDROID_NDK)/sources/android/native_app_glue
# Define library paths containing required libs
-LFLAGS = -L. -Ljni/libs -Ljni -Ltemp/lib
+LFLAGS = -L. -Ljni/libs -Ljni -Llib
# Define any libraries to link into executable
# if you want to link libraries (libname.so or libname.a), use the -lname
@@ -78,20 +78,20 @@ project_dirs:
if not exist temp mkdir temp
if not exist temp\obj mkdir temp\obj
if not exist temp\src mkdir temp\src
- if not exist temp\lib mkdir temp\lib
+ if not exist lib mkdir lib
if not exist temp\bin mkdir temp\bin
# Compile native_app_glue as static library
# OUTPUT: $(PROJECT_DIR)/temp/obj/libnative_app_glue.a
native_app_glue:
$(CC) -c $(ANDROID_NDK)/sources/android/native_app_glue/android_native_app_glue.c -o temp/obj/native_app_glue.o $(CFLAGS)
- $(AR) rcs $(PROJECT_DIR)/temp/lib/libnative_app_glue.a temp/obj/native_app_glue.o
+ $(AR) rcs $(PROJECT_DIR)/lib/libnative_app_glue.a temp/obj/native_app_glue.o
# Compile project code as shared libraries
-# OUTPUT: $(PROJECT_DIR)/temp/lib/lib$(LIBRARY_NAME).so
+# OUTPUT: $(PROJECT_DIR)/lib/lib$(LIBRARY_NAME).so
project_code:
$(CC) -c jni/basic_game.c -o temp/obj/basic_game.o $(INCLUDES) $(CFLAGS) --sysroot=$(ANDROID_TOOLCHAIN)/sysroot -fPIC
- $(CC) -o temp/lib/lib$(LIBRARY_NAME).so temp/obj/basic_game.o -shared $(INCLUDES) $(LFLAGS) $(LIBS) -lnative_app_glue
+ $(CC) -o lib/lib$(LIBRARY_NAME).so temp/obj/basic_game.o -shared $(INCLUDES) $(LFLAGS) $(LIBS) -lnative_app_glue
# Generate key for APK signing
# OUTPUT: $(PROJECT_DIR)/temp/$(PROJECT_NAME).keystore
@@ -116,11 +116,11 @@ project_class_dex:
$(ANDROID_BUILD_TOOLS)/dx --dex --output=temp/bin/classes.dex temp/obj
# Create temp/bin/$(PROJECT_NAME).unsigned.apk
-# NOTE: DEPENDS on temp/bin/classes.dex and temp/lib/lib$(LIBRARY_NAME).so
+# NOTE: DEPENDS on temp/bin/classes.dex and lib/lib$(LIBRARY_NAME).so
# NOTE: Use -A resources to define additional directory in which to find raw asset files
project_apk:
$(ANDROID_BUILD_TOOLS)/aapt package -f -m -M AndroidManifest.xml -S res -A assets -I $(ANDROID_HOME)/platforms/android-16/android.jar -F temp/bin/$(PROJECT_NAME).unsigned.apk -J temp/bin
- $(ANDROID_BUILD_TOOLS)/aapt add $(PROJECT_DIR)/temp/bin/$(PROJECT_NAME).unsigned.apk temp/lib/lib$(LIBRARY_NAME).so
+ $(ANDROID_BUILD_TOOLS)/aapt add $(PROJECT_DIR)/temp/bin/$(PROJECT_NAME).unsigned.apk lib/lib$(LIBRARY_NAME).so
# Create temp/bin/$(PROJECT_NAME).signed.apk
apk_signing:
@@ -138,7 +138,7 @@ deploy:
# Clean everything
clean:
- del temp\bin\* temp\lib\* temp\obj\* temp\src\* /f/s/q
+ del temp\bin\* lib\* temp\obj\* temp\src\* /f/s/q
del temp\*.keystore
rmdir temp /s /q
@echo Cleaning done
diff --git a/templates/android_project/jni/libs/libopenal.so b/templates/android_project/jni/libs/libopenal.so
index e384d9ad..dac5f118 100644
--- a/templates/android_project/jni/libs/libopenal.so
+++ b/templates/android_project/jni/libs/libopenal.so
Binary files differ
diff --git a/templates/android_project/jni/libs/libraylib.a b/templates/android_project/jni/libs/libraylib.a
index 6c1991be..c37b0730 100644
--- a/templates/android_project/jni/libs/libraylib.a
+++ b/templates/android_project/jni/libs/libraylib.a
Binary files differ