2018-06-04 15:53:16 +00:00
|
|
|
package(
|
|
|
|
default_visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
# >>> JNI headers
|
|
|
|
|
|
|
|
genrule(
|
|
|
|
name = "copy_link_jni_header",
|
2018-10-18 15:25:05 +00:00
|
|
|
srcs = ["@openjdk_jni_h//file"],
|
2018-06-04 15:53:16 +00:00
|
|
|
outs = ["jni/jni.h"],
|
|
|
|
cmd = "cp -f $< $@",
|
|
|
|
)
|
|
|
|
|
|
|
|
genrule(
|
|
|
|
name = "copy_link_jni_md_header",
|
|
|
|
srcs = select({
|
2018-10-18 15:25:05 +00:00
|
|
|
"@org_brotli//:darwin": ["@openjdk_macosx_jni_md_h//file"],
|
|
|
|
"@org_brotli//:darwin_x86_64": ["@openjdk_macosx_jni_md_h//file"],
|
|
|
|
"@org_brotli//:windows_msys": ["@openjdk_windows_jni_md_h//file"],
|
|
|
|
"@org_brotli//:windows_msvc": ["@openjdk_windows_jni_md_h//file"],
|
|
|
|
"@org_brotli//:windows": ["@openjdk_windows_jni_md_h//file"],
|
|
|
|
"//conditions:default": ["@openjdk_solaris_jni_md_h//file"],
|
2018-06-04 15:53:16 +00:00
|
|
|
}),
|
|
|
|
outs = ["jni/jni_md.h"],
|
|
|
|
cmd = "cp -f $< $@",
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "jni_inc",
|
|
|
|
hdrs = [
|
|
|
|
":jni/jni.h",
|
|
|
|
":jni/jni_md.h",
|
|
|
|
],
|
|
|
|
includes = ["jni"],
|
|
|
|
)
|
|
|
|
|
|
|
|
# <<< JNI headers
|
|
|
|
|
2019-07-17 12:39:56 +00:00
|
|
|
genrule(
|
2022-12-20 11:25:26 +00:00
|
|
|
name = "license",
|
2019-07-17 12:39:56 +00:00
|
|
|
srcs = ["@org_brotli//:LICENSE"],
|
|
|
|
outs = ["META-INF/LICENSE"],
|
|
|
|
cmd = "cp -f $< $@",
|
|
|
|
)
|
|
|
|
|
2018-06-04 15:53:16 +00:00
|
|
|
########################################################
|
|
|
|
# WARNING: do not (transitively) depend on this target!
|
|
|
|
########################################################
|
|
|
|
cc_binary(
|
|
|
|
name = "brotli_jni.dll",
|
|
|
|
srcs = [
|
2018-10-18 15:25:05 +00:00
|
|
|
"//org/brotli/wrapper/common:jni_src",
|
|
|
|
"//org/brotli/wrapper/dec:jni_src",
|
|
|
|
"//org/brotli/wrapper/enc:jni_src",
|
2018-06-04 15:53:16 +00:00
|
|
|
"@org_brotli//:common_headers",
|
|
|
|
"@org_brotli//:common_sources",
|
|
|
|
"@org_brotli//:dec_headers",
|
|
|
|
"@org_brotli//:dec_sources",
|
|
|
|
"@org_brotli//:enc_headers",
|
|
|
|
"@org_brotli//:enc_sources",
|
|
|
|
],
|
2018-10-18 15:25:05 +00:00
|
|
|
linkshared = 1,
|
2018-06-04 15:53:16 +00:00
|
|
|
deps = [
|
|
|
|
":jni_inc",
|
2018-10-18 15:25:05 +00:00
|
|
|
"@org_brotli//:brotli_inc",
|
2018-06-04 15:53:16 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# WARNING: do not (transitively) depend on this target!
|
|
|
|
########################################################
|
|
|
|
cc_binary(
|
|
|
|
name = "brotli_jni_no_dictionary_data.dll",
|
|
|
|
srcs = [
|
2018-10-18 15:25:05 +00:00
|
|
|
"//org/brotli/wrapper/common:jni_src",
|
|
|
|
"//org/brotli/wrapper/dec:jni_src",
|
|
|
|
"//org/brotli/wrapper/enc:jni_src",
|
2018-06-04 15:53:16 +00:00
|
|
|
"@org_brotli//:common_headers",
|
|
|
|
"@org_brotli//:common_sources",
|
|
|
|
"@org_brotli//:dec_headers",
|
|
|
|
"@org_brotli//:dec_sources",
|
|
|
|
"@org_brotli//:enc_headers",
|
|
|
|
"@org_brotli//:enc_sources",
|
|
|
|
],
|
|
|
|
defines = [
|
|
|
|
"BROTLI_EXTERNAL_DICTIONARY_DATA=",
|
|
|
|
],
|
2018-10-18 15:25:05 +00:00
|
|
|
linkshared = 1,
|
2018-06-04 15:53:16 +00:00
|
|
|
deps = [
|
|
|
|
":jni_inc",
|
2018-10-18 15:25:05 +00:00
|
|
|
"@org_brotli//:brotli_inc",
|
2018-06-04 15:53:16 +00:00
|
|
|
],
|
|
|
|
)
|