diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/java/BUILD | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/java/BUILD')
-rw-r--r-- | roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/java/BUILD | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/java/BUILD b/roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/java/BUILD new file mode 100644 index 000000000..cd55c5477 --- /dev/null +++ b/roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/java/BUILD @@ -0,0 +1,98 @@ +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({ + "@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"], + }), + 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_resource", + srcs = ["@org_brotli//:LICENSE"], + outs = ["META-INF/LICENSE"], + cmd = "cp -f $< $@", +) + +java_library( + name = "license", + resources = [":license_resource"], +) + +######################################################## +# 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", + ], +) |