mirror of
https://github.com/google/brotli.git
synced 2024-11-09 21:50:07 +00:00
02458f3443
PiperOrigin-RevId: 598790414
91 lines
2.2 KiB
Python
91 lines
2.2 KiB
Python
package(
|
|
default_visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# >>> JNI headers
|
|
|
|
genrule(
|
|
name = "copy_link_jni_header",
|
|
srcs = ["@openjdk_jni_h//file"],
|
|
outs = ["jni/jni.h"],
|
|
cmd = "cp -f $< $@",
|
|
)
|
|
|
|
genrule(
|
|
name = "copy_link_jni_md_header",
|
|
srcs = select({
|
|
"@platforms//os:macos": ["@openjdk_macosx_jni_md_h//file"],
|
|
"@platforms//os:windows": ["@openjdk_windows_jni_md_h//file"],
|
|
"//conditions:default": ["@openjdk_solaris_jni_md_h//file"],
|
|
}),
|
|
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
|
|
|
|
genrule(
|
|
name = "license",
|
|
srcs = ["@org_brotli//:LICENSE"],
|
|
outs = ["META-INF/LICENSE"],
|
|
cmd = "cp -f $< $@",
|
|
)
|
|
|
|
########################################################
|
|
# WARNING: do not (transitively) depend on this target!
|
|
########################################################
|
|
cc_binary(
|
|
name = "brotli_jni.dll",
|
|
srcs = [
|
|
"//org/brotli/wrapper/common:jni_src",
|
|
"//org/brotli/wrapper/dec:jni_src",
|
|
"//org/brotli/wrapper/enc:jni_src",
|
|
"@org_brotli//:common_headers",
|
|
"@org_brotli//:common_sources",
|
|
"@org_brotli//:dec_headers",
|
|
"@org_brotli//:dec_sources",
|
|
"@org_brotli//:enc_headers",
|
|
"@org_brotli//:enc_sources",
|
|
],
|
|
linkshared = 1,
|
|
deps = [
|
|
":jni_inc",
|
|
"@org_brotli//:brotli_inc",
|
|
],
|
|
)
|
|
|
|
########################################################
|
|
# WARNING: do not (transitively) depend on this target!
|
|
########################################################
|
|
cc_binary(
|
|
name = "brotli_jni_no_dictionary_data.dll",
|
|
srcs = [
|
|
"//org/brotli/wrapper/common:jni_src",
|
|
"//org/brotli/wrapper/dec:jni_src",
|
|
"//org/brotli/wrapper/enc:jni_src",
|
|
"@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=",
|
|
],
|
|
linkshared = 1,
|
|
deps = [
|
|
":jni_inc",
|
|
"@org_brotli//:brotli_inc",
|
|
],
|
|
)
|