|
| 1 | +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") |
| 2 | +load("@rules_license//rules:license.bzl", "license") |
| 3 | + |
| 4 | +package( |
| 5 | + default_applicable_licenses = [":license"], |
| 6 | +) |
| 7 | + |
| 8 | +exports_files([ |
| 9 | + "LICENSE", |
| 10 | +]) |
| 11 | + |
| 12 | +license( |
| 13 | + name = "license", |
| 14 | + license_kinds = ["@rules_license//licenses/spdx:BSD-2-Clause"], |
| 15 | + license_text = "LICENSE", |
| 16 | +) |
| 17 | + |
| 18 | +cc_binary( |
| 19 | + name = "ojph_compress", |
| 20 | + srcs = ["src/apps/ojph_compress/ojph_compress.cpp"], |
| 21 | + visibility = ["//visibility:public"], |
| 22 | + deps = [":ojph_expand"], |
| 23 | +) |
| 24 | + |
| 25 | +cc_library( |
| 26 | + name = "ojph_expand", |
| 27 | + srcs = [ |
| 28 | + "src/apps/ojph_expand/ojph_expand.cpp", |
| 29 | + "src/apps/others/ojph_img_io.cpp", |
| 30 | + ], |
| 31 | + hdrs = [ |
| 32 | + "src/apps/common/ojph_img_io.h", |
| 33 | + ], |
| 34 | + includes = [ |
| 35 | + "src/apps/common", |
| 36 | + ], |
| 37 | + visibility = ["//visibility:public"], |
| 38 | + deps = [":openjph"], |
| 39 | +) |
| 40 | + |
| 41 | +cc_library( |
| 42 | + name = "openjph_headers", |
| 43 | + hdrs = [ |
| 44 | + "src/core/common/ojph_arch.h", |
| 45 | + "src/core/common/ojph_arg.h", |
| 46 | + "src/core/common/ojph_base.h", |
| 47 | + "src/core/common/ojph_codestream.h", |
| 48 | + "src/core/common/ojph_defs.h", |
| 49 | + "src/core/common/ojph_file.h", |
| 50 | + "src/core/common/ojph_mem.h", |
| 51 | + "src/core/common/ojph_message.h", |
| 52 | + "src/core/common/ojph_params.h", |
| 53 | + "src/core/common/ojph_version.h", |
| 54 | + ], |
| 55 | + include_prefix = "openjph", |
| 56 | + strip_include_prefix = "src/core/common", |
| 57 | + visibility = ["//visibility:public"], |
| 58 | +) |
| 59 | + |
| 60 | +cc_library( |
| 61 | + name = "openjph", |
| 62 | + srcs = [ |
| 63 | + "src/core/codestream/ojph_codeblock.cpp", |
| 64 | + "src/core/codestream/ojph_codeblock_fun.cpp", |
| 65 | + "src/core/codestream/ojph_codestream.cpp", |
| 66 | + "src/core/codestream/ojph_codestream_gen.cpp", |
| 67 | + "src/core/codestream/ojph_codestream_local.cpp", |
| 68 | + "src/core/codestream/ojph_params.cpp", |
| 69 | + "src/core/codestream/ojph_precinct.cpp", |
| 70 | + "src/core/codestream/ojph_resolution.cpp", |
| 71 | + "src/core/codestream/ojph_subband.cpp", |
| 72 | + "src/core/codestream/ojph_tile.cpp", |
| 73 | + "src/core/codestream/ojph_tile_comp.cpp", |
| 74 | + "src/core/coding/ojph_block_common.cpp", |
| 75 | + "src/core/coding/ojph_block_decoder32.cpp", |
| 76 | + "src/core/coding/ojph_block_decoder64.cpp", |
| 77 | + "src/core/coding/ojph_block_encoder.cpp", |
| 78 | + "src/core/others/ojph_arch.cpp", |
| 79 | + "src/core/others/ojph_file.cpp", |
| 80 | + "src/core/others/ojph_mem.cpp", |
| 81 | + "src/core/others/ojph_message.cpp", |
| 82 | + "src/core/transform/ojph_colour.cpp", |
| 83 | + "src/core/transform/ojph_transform.cpp", |
| 84 | + ], |
| 85 | + hdrs = [ |
| 86 | + "src/core/codestream/ojph_bitbuffer_read.h", |
| 87 | + "src/core/codestream/ojph_bitbuffer_write.h", |
| 88 | + "src/core/codestream/ojph_codeblock.h", |
| 89 | + "src/core/codestream/ojph_codeblock_fun.h", |
| 90 | + "src/core/codestream/ojph_codestream_local.h", |
| 91 | + "src/core/codestream/ojph_params_local.h", |
| 92 | + "src/core/codestream/ojph_precinct.h", |
| 93 | + "src/core/codestream/ojph_resolution.h", |
| 94 | + "src/core/codestream/ojph_subband.h", |
| 95 | + "src/core/codestream/ojph_tile.h", |
| 96 | + "src/core/codestream/ojph_tile_comp.h", |
| 97 | + "src/core/coding/ojph_block_common.h", |
| 98 | + "src/core/coding/ojph_block_decoder.h", |
| 99 | + "src/core/coding/ojph_block_encoder.h", |
| 100 | + "src/core/coding/table0.h", |
| 101 | + "src/core/coding/table1.h", |
| 102 | + "src/core/transform/ojph_colour.h", |
| 103 | + "src/core/transform/ojph_colour_local.h", |
| 104 | + "src/core/transform/ojph_transform.h", |
| 105 | + "src/core/transform/ojph_transform_local.h", |
| 106 | + ], |
| 107 | + defines = [ |
| 108 | + "OJPH_DISABLE_SIMD", |
| 109 | + #"OJPH_DISABLE_SSE2", |
| 110 | + #"OJPH_DISABLE_SSSE3", |
| 111 | + #"OJPH_DISABLE_SSE4", |
| 112 | + #"OJPH_DISABLE_AVX", |
| 113 | + #"OJPH_DISABLE_AVX2", |
| 114 | + #"OJPH_DISABLE_AVX512", |
| 115 | + #"OJPH_DISABLE_NEON", |
| 116 | + ], |
| 117 | + includes = [ |
| 118 | + "src/core/codestream", |
| 119 | + "src/core/coding", |
| 120 | + "src/core/common", |
| 121 | + "src/core/others", |
| 122 | + "src/core/transform", |
| 123 | + ], |
| 124 | + visibility = ["//visibility:public"], |
| 125 | + deps = [":openjph_headers"], |
| 126 | +) |
0 commit comments