Permalink
Browse files

Add android.mk files to build shared libraries

Signed-off-by: binkybear <binkybear@nethunter.com>
  • Loading branch information...
binkybear committed Sep 1, 2017
1 parent 2f3d69d commit 54bbdd1968b5120976dbfaa9e5d37f626746b60e
@@ -13,4 +13,3 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Fri Sep 16 18:00:52 CDT 2016
org.gradle.jvmargs=-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=9090
@@ -17,13 +17,13 @@ android {
buildToolsVersion "26.0.1"

defaultConfig {
minSdkVersion 4
minSdkVersion 14
targetSdkVersion 25
versionCode 2
versionName "2.0"

ndk {
moduleName 'term-N'
moduleName 'libjackpal-termexec2'
abiFilters 'armeabi', 'arm64-v8a', 'armeabi-v7a', 'x86'
ldLibs 'log', 'c'
}
@@ -35,7 +35,7 @@ android {
}
sourceSets {
main {
jni.srcDirs = []
jni.srcDirs = ["jni"];
}
}
buildTypes {
@@ -44,6 +44,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
}

// by default recent plugin version does not copy any AIDL files "to avoid publishing too much"
@@ -57,6 +62,6 @@ android.libraryVariants.all { variant ->
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-annotations:25.3.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-annotations:26+'
}
@@ -19,7 +19,7 @@
public class TermExec {
// Warning: bump the library revision, when an incompatible change happens
static {
System.loadLibrary("jackpal-termexec2nhj1");
System.loadLibrary("jackpal-termexec2");
}

public static final String SERVICE_ACTION_V1 = "com.offsec.nhterm.action.START_TERM.v1";
@@ -0,0 +1,13 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

# This is the target being built.
LOCAL_MODULE:= libjackpal-termexec2

# All of the source files that we will compile.
LOCAL_SRC_FILES:= \
process.cpp

LOCAL_LDLIBS := -ldl -llog

include $(BUILD_SHARED_LIBRARY)
@@ -0,0 +1,2 @@
# Build for ARMv5TE, mips and x86 architectures.
APP_ABI := armeabi mips x86 arm64-v8a armeabi-v7a
@@ -14,13 +14,16 @@ android {
ldLibs 'log', 'c'
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
jni.srcDirs = []
jni.srcDirs = ['jni']
}
}
buildTypes {
@@ -31,10 +34,15 @@ android {
}
productFlavors {
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
}

dependencies {
compile project(':emulatorview')
compile project(':libtermexec')
compile "com.android.support:support-v4:+"
implementation project(':emulatorview')
implementation project(':libtermexec')
implementation "com.android.support:support-v4:+"
}
@@ -0,0 +1,15 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

# This is the target being built.
LOCAL_MODULE:= libjackpal-androidterm5

# All of the source files that we will compile.
LOCAL_SRC_FILES:= \
common.cpp \
termExec.cpp \
fileCompat.cpp

LOCAL_LDLIBS := -ldl -llog

include $(BUILD_SHARED_LIBRARY)
@@ -0,0 +1,2 @@
# Build for ARMv5TE, mips and x86 architectures.
APP_ABI := armeabi mips x86 arm64-v8a armeabi-v7a

0 comments on commit 54bbdd1

Please sign in to comment.