# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Builds the Netty fork of Tomcat Native. See http://netty.io/wiki/forked-tomcat-native.html
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
# Builds the native part of netty-tcnative library.
shared_library("netty-tcnative-so") {
output_name = "netty-tcnative"
sources = [
"src/c/bb.c",
"src/c/error.c",
"src/c/jnilib.c",
"src/c/native_constants.c",
"src/c/ssl.c",
"src/c/ssl_private.h",
"src/c/sslcontext.c",
"src/c/sslutils.c",
"src/c/tcn.h",
]
include_dirs = [ "//third_party/apache-portable-runtime/src/include" ]
defines = [ "HAVE_OPENSSL" ]
cflags = [ "-w" ]
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
deps = [
"//third_party/apache-portable-runtime:apr",
"//third_party/boringssl:boringssl",
]
}
# Builds the Java part of netty-tcnative library.
android_library("netty-tcnative_java") {
sources = [
"src/java/io/netty/internal/tcnative/Buffer.java",
"src/java/io/netty/internal/tcnative/CertificateRequestedCallback.java",
"src/java/io/netty/internal/tcnative/CertificateVerifier.java",
"src/java/io/netty/internal/tcnative/Library.java",
"src/java/io/netty/internal/tcnative/NativeStaticallyReferencedJniMethods.java",
"src/java/io/netty/internal/tcnative/SSL.java",
"src/java/io/netty/internal/tcnative/SSLContext.java",
"src/java/io/netty/internal/tcnative/SessionTicketKey.java",
]
deps = [
"//base:base_java",
"//build/android:build_java",
"//third_party/jni_zero:jni_zero_java",
]
}