Skip to content

Commit f087783

Browse files
author
Jeff Brateman
committed
add x86_64
1 parent 7d78b00 commit f087783

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

card.io/src/main/jni/Android.mk

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LOCAL_PATH := $(call my-dir)
1111
LOCAL_DMZ_DIR := card.io-dmz
1212

1313
# --- declare opencv prebuilt static libs ---------------------------------
14-
ifneq (,$(filter $(TARGET_ARCH_ABI),armeabi-v7a x86 arm64-v8a))
14+
ifneq (,$(filter $(TARGET_ARCH_ABI),armeabi-v7a x86 arm64-v8a x86_64))
1515

1616
include $(CLEAR_VARS)
1717
LOCAL_MODULE := opencv_core
@@ -32,9 +32,9 @@ endif
3232
ifeq (1,1)
3333

3434
include $(CLEAR_VARS)
35-
ifneq (,$(filter $(TARGET_ARCH_ABI),armeabi-v7a x86 arm64-v8a))
35+
ifneq (,$(filter $(TARGET_ARCH_ABI),armeabi-v7a x86 arm64-v8a x86_64))
3636

37-
LOCAL_MODULE := cardioRecognizer
37+
LOCAL_MODULE := cardioRecognizer
3838
LOCAL_LDLIBS := -llog -L$(SYSROOT)/usr/lib -lz -ljnigraphics
3939
LOCAL_SHARED_LIBRARIES := cpufeatures opencv_imgproc opencv_core
4040

@@ -48,8 +48,8 @@ LOCAL_CPPFLAGS += -DANDROID_HAS_NEON=1
4848
LOCAL_ARM_NEON := true
4949
endif
5050

51-
ifeq ($(TARGET_ARCH_ABI), arm64-v8a)
52-
LOCAL_CFLAGS += -DANDROID_HAS_NEON=0 ## arm64 changed register names - requires asm fixes
51+
ifneq (,$(filter $(TARGET_ARCH_ABI), arm64-v8a x86_64))
52+
LOCAL_CFLAGS += -DANDROID_HAS_NEON=0 ## 64-bit changed register names - requires asm fixes
5353
endif
5454

5555
include $(BUILD_SHARED_LIBRARY)
@@ -63,18 +63,18 @@ endif
6363
ifeq (1,1)
6464

6565
include $(CLEAR_VARS)
66-
ifneq (,$(filter $(TARGET_ARCH_ABI),armeabi-v7a x86 arm64-v8a))
66+
ifneq (,$(filter $(TARGET_ARCH_ABI),armeabi-v7a x86 arm64-v8a x86_64))
6767

68-
LOCAL_MODULE := cardioRecognizer_tegra2
68+
LOCAL_MODULE := cardioRecognizer_tegra2
6969
LOCAL_LDLIBS := -llog -L$(SYSROOT)/usr/lib -lz -ljnigraphics
7070
LOCAL_SHARED_LIBRARIES := cpufeatures opencv_imgproc opencv_core
7171

7272
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LOCAL_DMZ_DIR) $(LOCAL_PATH)/$(LOCAL_DMZ_DIR)/cv
7373
LOCAL_SRC_FILES := $(LOCAL_DMZ_DIR)/dmz_all.cpp nativeRecognizer.cpp
7474

7575
ifeq ($(TARGET_ARCH_ABI), x86) #we're generating an empty libcardioRecognizer_tegra2.so for x86 devices, so the list of .so files is the same for armeabi-v7a and x86 folders. This is to avoid any fallback to arm versions.
76-
LOCAL_C_INCLUDES :=
77-
LOCAL_SRC_FILES :=
76+
LOCAL_C_INCLUDES :=
77+
LOCAL_SRC_FILES :=
7878
endif
7979

8080
# Note: setting -mfloat-abi=hard will generate libs that cannot be linked with built in Android ones. So don't.
@@ -89,7 +89,7 @@ endif
8989

9090
# --- libcardioDecider.so ------------------------------------------------------------
9191

92-
ifneq (,$(filter $(TARGET_ARCH_ABI), armeabi armeabi-v7a mips x86 arm64-v8a))
92+
ifneq (,$(filter $(TARGET_ARCH_ABI), armeabi armeabi-v7a mips x86 arm64-v8a x86_64))
9393

9494
include $(CLEAR_VARS)
9595

Binary file not shown.
Binary file not shown.

card.io/src/main/jni/nativeDecider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C" jboolean JNICALL Java_io_card_payment_CardScanner_nUseTegra() {
2323
}
2424

2525
extern "C" jboolean JNICALL Java_io_card_payment_CardScanner_nUseX86() {
26-
#ifdef __i386__
26+
#if defined __i386__ || defined __x86_64__
2727
return true;
2828
#else
2929
return false;

opencv/build_opencv.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ wget -q $ANDROID_CMAKE_URL -O $ANDROID_CMAKE_FILE || exit -1
5555

5656

5757

58-
for ARCH in "armeabi-v7a" "x86" "arm64-v8a"
58+
for ARCH in "armeabi-v7a" "x86" "arm64-v8a" "x86_64"
5959
do
6060
echo "---- building $ARCH ----"
6161
BUILD_DIR="$WD/build-$CV_VERSION-"$ARCH

sdk/release_notes.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ next
77
* Populate CardIOActivity.EXTRA_CAPTURED_CARD_IMAGE when confirmation is shown [#10-source](https://github.com/card-io/card.io-Android-source/issues/10).
88
* Add x86 processor support [#26-source](https://github.com/card-io/card.io-Android-source/issues/26).
99
* Add arm64-v8a processor support [#33-source](https://github.com/card-io/card.io-Android-source/issues/33), [#51](https://github.com/card-io/card.io-Android-SDK/issues/51).
10+
* Add x86_64 processor support.
1011

1112
5.0.1
1213
-----

0 commit comments

Comments
 (0)