1LOCAL_PATH := $(call my-dir) 2 3# dng sdk shared library for target 4# ======================================================== 5 6include $(CLEAR_VARS) 7 8dng_sdk_files := \ 9 source/dng_1d_function.cpp \ 10 source/dng_1d_table.cpp \ 11 source/dng_abort_sniffer.cpp \ 12 source/dng_area_task.cpp \ 13 source/dng_bad_pixels.cpp \ 14 source/dng_bottlenecks.cpp \ 15 source/dng_camera_profile.cpp \ 16 source/dng_color_space.cpp \ 17 source/dng_color_spec.cpp \ 18 source/dng_date_time.cpp \ 19 source/dng_exceptions.cpp \ 20 source/dng_exif.cpp \ 21 source/dng_file_stream.cpp \ 22 source/dng_filter_task.cpp \ 23 source/dng_fingerprint.cpp \ 24 source/dng_gain_map.cpp \ 25 source/dng_globals.cpp \ 26 source/dng_host.cpp \ 27 source/dng_hue_sat_map.cpp \ 28 source/dng_ifd.cpp \ 29 source/dng_image.cpp \ 30 source/dng_image_writer.cpp \ 31 source/dng_info.cpp \ 32 source/dng_iptc.cpp \ 33 source/dng_jpeg_image.cpp \ 34 source/dng_jpeg_memory_source.cpp \ 35 source/dng_lens_correction.cpp \ 36 source/dng_linearization_info.cpp \ 37 source/dng_lossless_jpeg.cpp \ 38 source/dng_matrix.cpp \ 39 source/dng_memory.cpp \ 40 source/dng_memory_stream.cpp \ 41 source/dng_misc_opcodes.cpp \ 42 source/dng_mosaic_info.cpp \ 43 source/dng_mutex.cpp \ 44 source/dng_negative.cpp \ 45 source/dng_opcode_list.cpp \ 46 source/dng_opcodes.cpp \ 47 source/dng_orientation.cpp \ 48 source/dng_parse_utils.cpp \ 49 source/dng_pixel_buffer.cpp \ 50 source/dng_point.cpp \ 51 source/dng_preview.cpp \ 52 source/dng_pthread.cpp \ 53 source/dng_rational.cpp \ 54 source/dng_read_image.cpp \ 55 source/dng_rect.cpp \ 56 source/dng_ref_counted_block.cpp \ 57 source/dng_reference.cpp \ 58 source/dng_render.cpp \ 59 source/dng_resample.cpp \ 60 source/dng_safe_arithmetic.cpp \ 61 source/dng_shared.cpp \ 62 source/dng_simple_image.cpp \ 63 source/dng_spline.cpp \ 64 source/dng_stream.cpp \ 65 source/dng_string.cpp \ 66 source/dng_string_list.cpp \ 67 source/dng_tag_types.cpp \ 68 source/dng_temperature.cpp \ 69 source/dng_tile_iterator.cpp \ 70 source/dng_tone_curve.cpp \ 71 source/dng_utils.cpp \ 72 source/dng_xy_coord.cpp \ 73 source/dng_xmp.cpp 74 75LOCAL_MODULE := libdng_sdk 76LOCAL_SRC_FILES := $(dng_sdk_files) 77 78LOCAL_CFLAGS := \ 79 -DUNIX_ENV=1 -DqDNGBigEndian=0 -DqDNGThreadSafe=1 \ 80 -DqDNGUseLibJPEG=1 -DqDNGUseXMP=0 -DqDNGValidate=0 \ 81 -DqDNGValidateTarget=1 -DqAndroid=1 \ 82 -Wsign-compare -Wno-reorder -Wframe-larger-than=20000 83 84LOCAL_CPPFLAGS := -frtti -fexceptions 85 86# Ignore unused parameters. 87LOCAL_CFLAGS += -Wno-unused-parameter 88# Some integral return types are annotated with "const." 89LOCAL_CFLAGS += -Wno-ignored-qualifiers 90 91LOCAL_CLANG := true 92LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow 93 94LOCAL_SHARED_LIBRARIES := libz libjpeg 95 96LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/source 97 98include $(BUILD_SHARED_LIBRARY) 99 100# dng sdk validating version static library 101# This version will print out validation warnings/errors to stderr 102# and is built against the NDK for use with CTS 103# ======================================================== 104 105include $(CLEAR_VARS) 106 107LOCAL_MODULE := libdng_sdk_validate 108LOCAL_SRC_FILES := $(dng_sdk_files) 109 110LOCAL_CFLAGS := \ 111 -DUNIX_ENV=1 -DqDNGBigEndian=0 -DqDNGThreadSafe=1 \ 112 -DqDNGUseLibJPEG=1 -DqDNGUseXMP=0 -DqDNGValidate=1 \ 113 -DqDNGValidateTarget=1 -DqAndroid=1 \ 114 -Wsign-compare -Wno-reorder -Wframe-larger-than=20000 115 116LOCAL_CPPFLAGS := -frtti -fexceptions 117 118# Ignore unused parameters. 119LOCAL_CFLAGS += -Wno-unused-parameter 120# Some integral return types are annotated with "const." 121LOCAL_CFLAGS += -Wno-ignored-qualifiers 122 123LOCAL_CLANG := true 124LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow 125 126LOCAL_STATIC_LIBRARIES := libz libjpeg_static 127 128LOCAL_CPP_FEATURES := rtti exceptions 129LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/source 130 131# NDK build, shared C++ runtime 132# LOCAL_SDK_VERSION := current 133# LOCAL_NDK_STL_VARIANT := c++_shared 134 135# Temporary workaround until camera2 NDK is active. See b/27102995. 136LOCAL_CXX_STL := libc++_static 137 138include $(BUILD_STATIC_LIBRARY) 139 140# dng sdk unittests for target 141# ======================================================== 142 143include $(CLEAR_VARS) 144 145LOCAL_MODULE := dng_validate 146LOCAL_MODULE_TAGS := optional 147LOCAL_SRC_FILES := \ 148 $(dng_sdk_files) \ 149 source/dng_validate.cpp 150 151LOCAL_CFLAGS := -DUNIX_ENV=1 -DqDNGBigEndian=0 -DqDNGThreadSafe=1 -DqDNGUseLibJPEG=1 -DqDNGUseXMP=0 -DqDNGValidate=1 -DqDNGValidateTarget=1 -DqAndroid=1 -fexceptions -Wsign-compare -Wno-reorder -Wframe-larger-than=20000 -frtti 152 153LOCAL_SHARED_LIBRARIES := libz libjpeg 154 155include $(BUILD_EXECUTABLE) 156