# HG changeset patch # User John Tsiombikas # Date 1433951608 -10800 # Node ID dccbd7d65517d214fb6ccf8fc89a68f00d47eb3b # Parent aef7f51f639709f69724b60c7fd3fcce701f37bc moved to android-19 to make it work with android 4.x diff -r aef7f51f6397 -r dccbd7d65517 android/Makefile --- a/android/Makefile Wed Jun 10 06:56:27 2015 +0300 +++ b/android/Makefile Wed Jun 10 18:53:28 2015 +0300 @@ -2,7 +2,7 @@ include $(root)/proj.mk # --- android settings --- -android_platform = android-22 +android_platform = android-19 name = $(bin) pkgprefix = com.mutantstargoat # ------------------------ @@ -10,7 +10,7 @@ src += $(wildcard $(root)/src/android/*.c) jsrc = $(wildcard $(root)/src/android/*.java) -obj = $(src:.c=.o) $(ccsrc:.cc=.o) +obj = $(src:.c=.o)# $(ccsrc:.cc=.o) lib = libs/armeabi/lib$(name).so apk-release = bin/$(name).apk apk-debug = bin/$(name)-debug.apk @@ -21,9 +21,10 @@ CC = arm-linux-androideabi-gcc CXX = arm-linux-androideabi-g++ -android_usr = $(NDK)/platforms/$(android_platform)/arch-arm/usr +#android_usr = $(NDK)/platforms/$(android_platform)/arch-arm/usr android_inc = -I$(native_app_glue_dir) -android_libs = -lstdc++ -llog -landroid -lEGL -lGLESv2 +#android_libs = -lstdc++ -llog -landroid -lEGL -lGLESv2 +android_libs = -llog -landroid -lEGL -lGLESv2 defs += -DANDROID -DAPP_NAME=\"$(name)\" CXXFLAGS = -Wall -g $(defs) -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 \ @@ -56,7 +57,7 @@ $(lib): $(obj) @mkdir -p libs/armeabi - $(CXX) -o $@ -shared $(obj) $(LDFLAGS) + $(CC) -o $@ -shared $(obj) $(LDFLAGS) ant_files = *.xml *.properties proguard-project.txt ant_dirs = bin libs res obj src gen @@ -97,3 +98,7 @@ .PHONY: update-project update-project: build.xml android update project -p . -t $(android_platform) + +.PHONY: logcat +logcat: + adb logcat '$(name):V' 'DEBUG:V' '*:S' diff -r aef7f51f6397 -r dccbd7d65517 android/manifest.xml.in --- a/android/manifest.xml.in Wed Jun 10 06:56:27 2015 +0300 +++ b/android/manifest.xml.in Wed Jun 10 18:53:28 2015 +0300 @@ -4,7 +4,7 @@ android:versionCode="1" android:versionName="1.0"> - + diff -r aef7f51f6397 -r dccbd7d65517 src/android/MainActivity.java --- a/src/android/MainActivity.java Wed Jun 10 06:56:27 2015 +0300 +++ b/src/android/MainActivity.java Wed Jun 10 18:53:28 2015 +0300 @@ -1,5 +1,6 @@ package com.mutantstargoat.photoshoot3d; +import android.os.Bundle; import android.app.NativeActivity; import android.util.Log; import static android.opengl.GLES20.*; @@ -8,7 +9,6 @@ import android.graphics.SurfaceTexture; /* -import android.os.Bundle; import android.content.Context; import android.hardware.camera2.*; */ @@ -17,6 +17,18 @@ public static String tag = "photoshoot3d"; public static boolean frame_pending; + /* + static { + System.loadLibrary("photoshoot3d"); + } + */ + + @Override + protected void onCreate( Bundle savedInstanceState ) + { + super.onCreate( savedInstanceState ); + } + public static void foo() { glClearColor(0.2f, 1.0f, 0.3f, 1.0f);