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.
Initial setup to compile on SDK 10-21.
- Loading branch information
Showing
7 changed files
with
257 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.env | ||
/libs/ |
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,2 @@ | ||
- .git | ||
- libs |
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,192 @@ | ||
this_dir = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
SOURCES := $(shell find jni -name '*.cpp' -or -name '*.mk') | ||
|
||
all: \ | ||
libs/android-10/armeabi-v7a/minicap \ | ||
libs/android-14/armeabi-v7a/minicap \ | ||
libs/android-14/x86/minicap \ | ||
libs/android-15/armeabi-v7a/minicap \ | ||
libs/android-15/x86/minicap \ | ||
libs/android-16/armeabi-v7a/minicap \ | ||
libs/android-16/x86/minicap \ | ||
libs/android-17/armeabi-v7a/minicap \ | ||
libs/android-17/x86/minicap \ | ||
libs/android-18/armeabi-v7a/minicap \ | ||
libs/android-18/x86/minicap \ | ||
libs/android-19/armeabi-v7a/minicap \ | ||
libs/android-19/x86/minicap \ | ||
libs/android-21/armeabi-v7a/minicap \ | ||
libs/android-21/arm64-v8a/minicap \ | ||
libs/android-21/x86/minicap \ | ||
libs/android-21/x86_64/minicap \ | ||
|
||
libs/android-10/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-2.3.3_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build generic-eng minicap | ||
|
||
libs/android-14/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.0.1_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full-eng minicap | ||
|
||
libs/android-14/x86/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.0.1_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full_x86-eng minicap | ||
|
||
libs/android-15/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.0.3_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full-eng minicap | ||
|
||
libs/android-15/x86/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.0.3_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full_x86-eng minicap | ||
|
||
libs/android-16/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.1.1_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full-eng minicap | ||
|
||
libs/android-16/x86/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.1.1_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full_x86-eng minicap | ||
|
||
libs/android-17/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.2_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full-eng minicap | ||
|
||
libs/android-17/x86/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.2_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build full_x86-eng minicap | ||
|
||
libs/android-18/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.3_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_arm-eng minicap | ||
|
||
libs/android-18/x86/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.3_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_x86-eng minicap | ||
|
||
libs/android-19/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.4_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_arm-eng minicap | ||
|
||
libs/android-19/x86/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-4.4_r1:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_x86-eng minicap | ||
|
||
libs/android-21/armeabi-v7a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-5.0.0_r2:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_arm-eng minicap | ||
|
||
libs/android-21/arm64-v8a/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-5.0.0_r2:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_arm64-eng minicap | ||
|
||
libs/android-21/x86/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-5.0.0_r2:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_x86-eng minicap | ||
|
||
libs/android-21/x86_64/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-5.0.0_r2:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_x86_64-eng minicap | ||
|
||
libs/android-21/mips/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-5.0.0_r2:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_mips-eng minicap | ||
|
||
libs/android-21/mips64/minicap: $(SOURCES) | ||
mkdir -p $(@D) | ||
docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v /srv/aosp/android-5.0.0_r2:/aosp \ | ||
-v $(this_dir)jni:/app \ | ||
-v $(this_dir)$(@D):/artifacts \ | ||
sorccu/aosp:jdk6 /aosp.sh build aosp_mips64-eng minicap |
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,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xueo pipefail | ||
|
||
TARGET=/tmp/minicap | ||
|
||
rsync \ | ||
--rsync-path='nice rsync' \ | ||
--recursive \ | ||
--copy-links \ | ||
--perms \ | ||
--times \ | ||
-FF ./ "$BUILD_HOST":$TARGET | ||
|
||
ssh -T "$BUILD_HOST" "docker run --rm \ | ||
-a stdout -a stderr \ | ||
-v $TARGET:$TARGET \ | ||
-v \$(which docker):\$(which docker) \ | ||
-v /usr/lib:/usr/lib \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
sorccu/aosp:latest bash -c 'cd $TARGET && make -j 4'" | ||
|
||
rsync \ | ||
--rsync-path='nice rsync' \ | ||
--recursive \ | ||
--copy-links \ | ||
--perms \ | ||
--times \ | ||
"$BUILD_HOST":$TARGET/libs/ libs/ |
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 @@ | ||
include $(call all-subdir-makefiles) |
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,27 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
include $(CLEAR_VARS) | ||
|
||
LOCAL_MODULE := minicap | ||
|
||
LOCAL_MODULE_TAGS := optional | ||
|
||
LOCAL_SRC_FILES := \ | ||
minicap.cpp \ | ||
|
||
LOCAL_PRELINK_MODULE := false | ||
|
||
LOCAL_SHARED_LIBRARIES := \ | ||
libcutils \ | ||
libutils \ | ||
libbinder \ | ||
libui \ | ||
|
||
ifeq ($(PLATFORM_SDK_VERSION),10) | ||
LOCAL_SHARED_LIBRARIES += libsurfaceflinger_client | ||
else | ||
LOCAL_SHARED_LIBRARIES += libgui | ||
endif | ||
|
||
LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) | ||
|
||
include $(BUILD_EXECUTABLE) |
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,4 @@ | ||
int main(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} |