fixing a bug in the local.env.mk setup, and correcting the readme's

Also, the androi-opencv.mk.in wasn't correct for one of the crystax NDK
build directory setups
This commit is contained in:
Ethan Rublee 2010-09-22 13:24:37 +00:00
parent d72d11d09d
commit 96e127134d
4 changed files with 22 additions and 11 deletions

View File

@ -7,10 +7,10 @@ into native opencv functions(as cv::Mat's)
to build make sure you have swig and the crystax ndk in your path
cp sample.local.env.mk local.env.mk
make
that should work...
that should work... If it doesn't make sure to edit the generated local.env.mk
the key variable
more later on how to build actual project for android
- see the code.google.com/p/android-opencv for details on this

View File

@ -1,4 +0,0 @@
#location of android-opencv port of OpenCV to android
OPENCV_CONFIG=../build/android-opencv.mk
ANDROID_NDK_ROOT=$(HOME)/android-ndk-r4-crystax

View File

@ -0,0 +1,8 @@
#location of android-opencv.mk file that was generated by the cmake build
#of opencv for android
OPENCV_CONFIG=../build/android-opencv.mk
#the root directory of the crystax r4 ndk - ndk-build should be in this dir
#you can download the ndk from http://www.crystax.net/android/ndk-r4.php
ANDROID_NDK_ROOT=$(HOME)/android-ndk-r4-crystax

View File

@ -14,14 +14,21 @@ ifndef OPENCV_BUILD_ROOT
OPENCV_BUILD_ROOT := ${CMAKE_BINARY_DIR}
endif
OPENCV_INCLUDES := ${android_module_include_dirs} $(OPENCV_ROOT)/android/android-jni/jni
OPENCV_INCLUDES := ${android_module_include_dirs}
ANDROID_OPENCV_INCLUDES := $(OPENCV_ROOT)/android/android-jni/jni
ARMOBJS := obj/local/armeabi
ARMOBJS_V7A := obj/local/armeabi-v7a
OPENCV_LIB_DIRS := -L$(OPENCV_BUILD_ROOT)/$(ARMOBJS_V7A) -L$(OPENCV_BUILD_ROOT)/$(ARMOBJS)
ARMOBJS := local/armeabi
ARMOBJS_V7A := local/armeabi-v7a
ANDROID_OPENCV_LIB_DIRS := -L$(OPENCV_ROOT)/android/android-jni/$(ARMOBJS_V7A) -L$(OPENCV_ROOT)/android/android-jni/$(ARMOBJS)
OPENCV_LIB_DIRS := -L$(OPENCV_BUILD_ROOT)/obj/$(ARMOBJS_V7A) \
-L$(OPENCV_BUILD_ROOT)/obj/$(ARMOBJS) -L$(OPENCV_BUILD_ROOT)/bin/ndk/$(ARMOBJS) \
-L$(OPENCV_BUILD_ROOT)/bin/ndk/$(ARMOBJS_V7A)
ANDROID_OPENCV_LIB_DIRS := -L$(OPENCV_ROOT)/android/android-jni/obj/$(ARMOBJS_V7A) \
-L$(OPENCV_ROOT)/android/android-jni/obj/$(ARMOBJS) \
-L$(OPENCV_ROOT)/android/android-jni/bin/ndk/$(ARMOBJS_V7A) \
-L$(OPENCV_ROOT)/android/android-jni/bin/ndk/$(ARMOBJS)
#order of linking very important ---- may have stuff out of order here, but
#important that modules that are more dependent come first...