forked from openstf/minicap
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish prebuilt binaries to NPM for easy inclusion in STF.
- Loading branch information
Showing
4 changed files
with
132 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
/libs/ | ||
/obj/ | ||
/libs/ | ||
/build/ | ||
/prebuilt/ | ||
/temp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/.env | ||
/.gitmodules | ||
/.npmignore | ||
/*.tgz | ||
/build-remote.sh | ||
/CONTRIBUTING.md | ||
/example/ | ||
/gdb.setup | ||
/gdb.sh | ||
/jni/ | ||
/libs/ | ||
/Makefile | ||
/obj/ | ||
/run.sh | ||
/temp/ | ||
/yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,91 @@ | ||
all: | ||
rm -rf build | ||
mkdir -p build/bin build/shared/ | ||
cp -R libs/ build/bin/ | ||
find build/bin -name '*.so' -print0 | xargs -0 rm | ||
cp -R jni/minicap-shared/aosp/libs/ build/shared/ | ||
|
||
.PHONY: all | ||
.PHONY: default clean prebuilt | ||
|
||
NDKBUILT := \ | ||
libs/arm64-v8a/minicap \ | ||
libs/arm64-v8a/minicap-nopie \ | ||
libs/armeabi-v7a/minicap \ | ||
libs/armeabi-v7a/minicap-nopie \ | ||
libs/x86/minicap \ | ||
libs/x86/minicap-nopie \ | ||
libs/x86_64/minicap \ | ||
libs/x86_64/minicap-nopie \ | ||
|
||
default: prebuilt | ||
|
||
clean: | ||
ndk-build clean | ||
rm -rf prebuilt | ||
|
||
$(NDKBUILT): | ||
ndk-build | ||
|
||
# It may feel a bit redundant to list everything here. However it also | ||
# acts as a safeguard to make sure that we really are including everything | ||
# that is supposed to be there. | ||
prebuilt: \ | ||
prebuilt/armeabi-v7a/bin/minicap \ | ||
prebuilt/armeabi-v7a/bin/minicap-nopie \ | ||
prebuilt/armeabi-v7a/lib/android-9/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-10/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-14/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-15/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-16/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-17/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-18/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-19/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-21/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-22/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-23/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-24/minicap.so \ | ||
prebuilt/armeabi-v7a/lib/android-25/minicap.so \ | ||
prebuilt/arm64-v8a/bin/minicap \ | ||
prebuilt/arm64-v8a/bin/minicap-nopie \ | ||
prebuilt/arm64-v8a/lib/android-21/minicap.so \ | ||
prebuilt/arm64-v8a/lib/android-22/minicap.so \ | ||
prebuilt/arm64-v8a/lib/android-23/minicap.so \ | ||
prebuilt/arm64-v8a/lib/android-24/minicap.so \ | ||
prebuilt/arm64-v8a/lib/android-25/minicap.so \ | ||
prebuilt/x86/bin/minicap \ | ||
prebuilt/x86/bin/minicap-nopie \ | ||
prebuilt/x86/lib/android-14/minicap.so \ | ||
prebuilt/x86/lib/android-15/minicap.so \ | ||
prebuilt/x86/lib/android-16/minicap.so \ | ||
prebuilt/x86/lib/android-17/minicap.so \ | ||
prebuilt/x86/lib/android-18/minicap.so \ | ||
prebuilt/x86/lib/android-19/minicap.so \ | ||
prebuilt/x86/lib/android-21/minicap.so \ | ||
prebuilt/x86/lib/android-22/minicap.so \ | ||
prebuilt/x86/lib/android-23/minicap.so \ | ||
prebuilt/x86/lib/android-24/minicap.so \ | ||
prebuilt/x86/lib/android-25/minicap.so \ | ||
prebuilt/x86_64/bin/minicap \ | ||
prebuilt/x86_64/bin/minicap-nopie \ | ||
prebuilt/x86_64/lib/android-21/minicap.so \ | ||
prebuilt/x86_64/lib/android-22/minicap.so \ | ||
prebuilt/x86_64/lib/android-23/minicap.so \ | ||
prebuilt/x86_64/lib/android-24/minicap.so \ | ||
prebuilt/x86_64/lib/android-25/minicap.so \ | ||
|
||
prebuilt/%/bin/minicap: libs/%/minicap | ||
mkdir -p $(@D) | ||
cp $^ $@ | ||
|
||
prebuilt/%/bin/minicap-nopie: libs/%/minicap-nopie | ||
mkdir -p $(@D) | ||
cp $^ $@ | ||
|
||
prebuilt/armeabi-v7a/lib/%/minicap.so: jni/minicap-shared/aosp/libs/%/armeabi-v7a/minicap.so | ||
mkdir -p $(@D) | ||
cp $^ $@ | ||
|
||
prebuilt/arm64-v8a/lib/%/minicap.so: jni/minicap-shared/aosp/libs/%/arm64-v8a/minicap.so | ||
mkdir -p $(@D) | ||
cp $^ $@ | ||
|
||
prebuilt/x86/lib/%/minicap.so: jni/minicap-shared/aosp/libs/%/x86/minicap.so | ||
mkdir -p $(@D) | ||
cp $^ $@ | ||
|
||
prebuilt/x86_64/lib/%/minicap.so: jni/minicap-shared/aosp/libs/%/x86_64/minicap.so | ||
mkdir -p $(@D) | ||
cp $^ $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "minicap-prebuilt", | ||
"version": "1.0.0", | ||
"description": "Prebuilt binaries of minicap.", | ||
"keywords": [ | ||
"minicap" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/openstf/minicap/issues" | ||
}, | ||
"license": "Apache-2.0", | ||
"author": { | ||
"name": "The OpenSTF Project", | ||
"email": "contact@openstf.io", | ||
"url": "https://openstf.io" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/openstf/minicap.git" | ||
}, | ||
"scripts": { | ||
"prepublish": "make" | ||
} | ||
} |