1cc_defaults { 2 name: "libdng_sdk-defaults", 3 srcs: [ 4 "source/dng_1d_function.cpp", 5 "source/dng_1d_table.cpp", 6 "source/dng_abort_sniffer.cpp", 7 "source/dng_area_task.cpp", 8 "source/dng_bad_pixels.cpp", 9 "source/dng_bottlenecks.cpp", 10 "source/dng_camera_profile.cpp", 11 "source/dng_color_space.cpp", 12 "source/dng_color_spec.cpp", 13 "source/dng_date_time.cpp", 14 "source/dng_exceptions.cpp", 15 "source/dng_exif.cpp", 16 "source/dng_file_stream.cpp", 17 "source/dng_filter_task.cpp", 18 "source/dng_fingerprint.cpp", 19 "source/dng_gain_map.cpp", 20 "source/dng_globals.cpp", 21 "source/dng_host.cpp", 22 "source/dng_hue_sat_map.cpp", 23 "source/dng_ifd.cpp", 24 "source/dng_image.cpp", 25 "source/dng_image_writer.cpp", 26 "source/dng_info.cpp", 27 "source/dng_iptc.cpp", 28 "source/dng_jpeg_image.cpp", 29 "source/dng_jpeg_memory_source.cpp", 30 "source/dng_lens_correction.cpp", 31 "source/dng_linearization_info.cpp", 32 "source/dng_lossless_jpeg.cpp", 33 "source/dng_matrix.cpp", 34 "source/dng_memory.cpp", 35 "source/dng_memory_stream.cpp", 36 "source/dng_misc_opcodes.cpp", 37 "source/dng_mosaic_info.cpp", 38 "source/dng_mutex.cpp", 39 "source/dng_negative.cpp", 40 "source/dng_opcode_list.cpp", 41 "source/dng_opcodes.cpp", 42 "source/dng_orientation.cpp", 43 "source/dng_parse_utils.cpp", 44 "source/dng_pixel_buffer.cpp", 45 "source/dng_point.cpp", 46 "source/dng_preview.cpp", 47 "source/dng_pthread.cpp", 48 "source/dng_rational.cpp", 49 "source/dng_read_image.cpp", 50 "source/dng_rect.cpp", 51 "source/dng_ref_counted_block.cpp", 52 "source/dng_reference.cpp", 53 "source/dng_render.cpp", 54 "source/dng_resample.cpp", 55 "source/dng_safe_arithmetic.cpp", 56 "source/dng_shared.cpp", 57 "source/dng_simple_image.cpp", 58 "source/dng_spline.cpp", 59 "source/dng_stream.cpp", 60 "source/dng_string.cpp", 61 "source/dng_string_list.cpp", 62 "source/dng_tag_types.cpp", 63 "source/dng_temperature.cpp", 64 "source/dng_tile_iterator.cpp", 65 "source/dng_tone_curve.cpp", 66 "source/dng_utils.cpp", 67 "source/dng_xy_coord.cpp", 68 "source/dng_xmp.cpp", 69 ], 70 cflags: [ 71 "-DUNIX_ENV=1", 72 "-DqDNGBigEndian=0", 73 "-DqDNGThreadSafe=1", 74 "-DqDNGUseLibJPEG=1", 75 "-DqDNGUseXMP=0", 76 "-DqDNGValidateTarget=1", 77 "-DqAndroid=1", 78 "-Werror", 79 "-Wsign-compare", 80 "-Wno-reorder", 81 "-Wframe-larger-than=20000", 82 83 // Ignore unused parameters. 84 "-Wno-unused-parameter", 85 86 // Some integral return types are annotated with "const." 87 "-Wno-ignored-qualifiers", 88 ], 89 90 rtti: true, 91 cppflags: ["-fexceptions"], 92 93 clang: true, 94 sanitize: { 95 misc_undefined: [ 96 "unsigned-integer-overflow", 97 "signed-integer-overflow", 98 ], 99 }, 100} 101 102cc_library{ 103 name: "libdng_sdk", 104 host_supported: true, 105 vendor_available: true, 106 defaults: ["libdng_sdk-defaults"], 107 108 cflags: ["-DqDNGValidate=0"], 109 110 shared_libs: [ 111 "libz", 112 "libjpeg", 113 ], 114 115 target: { 116 linux_glibc: { 117 static_libs: ["libcompiler_rt-extras"], 118 }, 119 darwin: { 120 host_ldlibs: [ 121 "-framework AppKit", 122 ], 123 }, 124 windows: { 125 enabled: true, 126 cflags: [ 127 "-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR", 128 "-Wno-null-arithmetic", 129 "-Wno-sign-compare", 130 "-Wno-tautological-pointer-compare", 131 "-Wno-unknown-pragmas", 132 ], 133 static_libs: ["libcompiler_rt-extras"], 134 }, 135 }, 136 137 export_include_dirs: ["source"], 138} 139 140// dng sdk validating version static library 141// This version will print out validation warnings/errors to stderr 142// and is built against the NDK for use with CTS 143// ======================================================== 144 145cc_library_static { 146 name: "libdng_sdk_validate", 147 defaults: ["libdng_sdk-defaults"], 148 149 cflags: ["-DqDNGValidate=1"], 150 151 static_libs: ["libjpeg_static_ndk"], 152 shared_libs: ["libz"], 153 154 export_include_dirs: ["source"], 155 156 sdk_version: "24", 157 stl: "c++_static", 158} 159 160// dng sdk unittests for target 161// ======================================================== 162 163cc_binary { 164 name: "dng_validate", 165 defaults: ["libdng_sdk-defaults"], 166 srcs: ["source/dng_validate.cpp"], 167 168 cflags: ["-DqDNGValidate=1"], 169 170 shared_libs: [ 171 "libz", 172 "libjpeg", 173 ], 174} 175 176cc_binary_host { 177 name: "dng_validate_host", 178 defaults: ["libdng_sdk-defaults"], 179 srcs: ["source/dng_validate.cpp"], 180 181 cflags: ["-DqDNGValidate=1"], 182 183 shared_libs: [ 184 "libz", 185 "libjpeg", 186 ], 187 188 target: { 189 darwin: { 190 enabled: false, // b/67474260 191 }, 192 }, 193} 194