GithubHelp home page GithubHelp logo

tehcneko / boringssl_android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vvb2060/boringssl_android

0.0 1.0 0.0 15.29 MB

boringssl static library prefab for android

Shell 0.01% C++ 83.96% C 0.10% Java 0.03% Assembly 15.60% Makefile 0.09% CMake 0.08% Starlark 0.13%

boringssl_android's Introduction

BoringSSL Android

boringssl static library prefab for android

This library is based on the boringssl AOSP repo.

Integration

Gradle:

implementation 'io.github.vvb2060.ndk:boringssl:4.0'

This library is Prefab, so you will need to enable it in your project (Android Gradle Plugin 4.1+):

android {
    ...
    buildFeatures {
        ...
        prefab true
    }
}

Usage

ndk-build

you can use crypto_static/ssl_static in your Android.mk. For example, if your application defines libapp.so and it uses ssl_static, your Android.mk file should include the following:

include $(CLEAR_VARS)
LOCAL_MODULE           := app
LOCAL_SRC_FILES        := app.cpp
LOCAL_STATIC_LIBRARIES := ssl_static
include $(BUILD_SHARED_LIBRARY)

# If you don't need your project to build with NDKs older than r21, you can omit
# this block.
ifneq ($(call ndk-major-at-least,21),true)
    $(call import-add-path,$(NDK_GRADLE_INJECTED_IMPORT_PATH))
endif

$(call import-module,prefab/boringssl)

CMake

you can use crypto_static/ssl_static in your CMakeLists.txt. For example, if your application defines libapp.so and it uses crypto_static, your CMakeLists.txt file should include the following:

add_library(app SHARED app.cpp)

# Add these two lines.
find_package(boringssl REQUIRED CONFIG)
target_link_libraries(app boringssl::crypto_static)

git submodule

If you don't want to use prefab and want to compile entirely from source code, for example to enable LTO, you can import this project as a git submodule.

include $(CLEAR_VARS)
LOCAL_MODULE           := app
LOCAL_SRC_FILES        := app.cpp
LOCAL_STATIC_LIBRARIES := ssl_static
include $(BUILD_SHARED_LIBRARY)

include [submodule path]/boringssl/src/main/native/BoringSSL.mk

Changelog

boringssl_android's People

Contributors

vvb2060 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.