| Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) | 
|  | 2 |  | 
| Jiyong Park | 5f98610 | 2017-12-18 20:43:16 +0900 | [diff] [blame] | 3 | _software_codecs := \ | 
|  | 4 | libstagefright_soft_aacdec \ | 
|  | 5 | libstagefright_soft_aacenc \ | 
|  | 6 | libstagefright_soft_amrdec \ | 
|  | 7 | libstagefright_soft_amrnbenc \ | 
|  | 8 | libstagefright_soft_amrwbenc \ | 
|  | 9 | libstagefright_soft_avcdec \ | 
|  | 10 | libstagefright_soft_avcenc \ | 
|  | 11 | libstagefright_soft_flacdec \ | 
|  | 12 | libstagefright_soft_flacenc \ | 
|  | 13 | libstagefright_soft_g711dec \ | 
|  | 14 | libstagefright_soft_gsmdec \ | 
|  | 15 | libstagefright_soft_hevcdec \ | 
|  | 16 | libstagefright_soft_mp3dec \ | 
|  | 17 | libstagefright_soft_mpeg2dec \ | 
|  | 18 | libstagefright_soft_mpeg4dec \ | 
|  | 19 | libstagefright_soft_mpeg4enc \ | 
|  | 20 | libstagefright_soft_opusdec \ | 
|  | 21 | libstagefright_soft_rawdec \ | 
|  | 22 | libstagefright_soft_vorbisdec \ | 
|  | 23 | libstagefright_soft_vpxdec \ | 
|  | 24 | libstagefright_soft_vpxenc \ | 
|  | 25 |  | 
| Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 26 | # service executable | 
|  | 27 | include $(CLEAR_VARS) | 
| Zhuoyao Zhang | a8973fd | 2018-01-09 17:18:41 -0800 | [diff] [blame] | 28 | # seccomp is not required for coverage build. | 
|  | 29 | ifneq ($(NATIVE_COVERAGE),true) | 
| Steven Moreland | d78d50b | 2018-04-11 16:51:29 -0700 | [diff] [blame] | 30 | LOCAL_REQUIRED_MODULES_arm := crash_dump.policy mediacodec.policy | 
|  | 31 | LOCAL_REQUIRED_MODULES_x86 := crash_dump.policy mediacodec.policy | 
| Zhuoyao Zhang | a8973fd | 2018-01-09 17:18:41 -0800 | [diff] [blame] | 32 | endif | 
| Jorge Lucangeli Obes | fbfb8e8 | 2017-02-14 10:33:41 -0500 | [diff] [blame] | 33 | LOCAL_SRC_FILES := main_codecservice.cpp | 
| Pawin Vongmasa | 9c47c97 | 2017-02-08 04:09:38 -0800 | [diff] [blame] | 34 | LOCAL_SHARED_LIBRARIES := \ | 
| Steven Moreland | 5550640 | 2017-06-07 18:18:09 -0700 | [diff] [blame] | 35 | libmedia_omx \ | 
| Pawin Vongmasa | 9c47c97 | 2017-02-08 04:09:38 -0800 | [diff] [blame] | 36 | libbinder \ | 
|  | 37 | libutils \ | 
|  | 38 | liblog \ | 
|  | 39 | libbase \ | 
| Steven Moreland | 009578c | 2017-06-08 11:23:53 -0700 | [diff] [blame] | 40 | libavservices_minijail_vendor \ | 
| Pawin Vongmasa | 9c47c97 | 2017-02-08 04:09:38 -0800 | [diff] [blame] | 41 | libcutils \ | 
|  | 42 | libhwbinder \ | 
| Steven Moreland | f2832c4 | 2017-02-21 13:41:39 -0800 | [diff] [blame] | 43 | libhidltransport \ | 
| Pawin Vongmasa | 04563aa | 2017-03-09 07:02:01 -0800 | [diff] [blame] | 44 | libstagefright_omx \ | 
| Pawin Vongmasa | fbe70ae | 2017-07-27 02:21:57 -0700 | [diff] [blame] | 45 | libstagefright_xmlparser \ | 
| Pawin Vongmasa | 0d3a5ed | 2017-02-22 03:19:35 -0800 | [diff] [blame] | 46 | android.hardware.media.omx@1.0 \ | 
| Pawin Vongmasa | 0d3a5ed | 2017-02-22 03:19:35 -0800 | [diff] [blame] | 47 | android.hidl.memory@1.0 | 
| Steven Moreland | 5550640 | 2017-06-07 18:18:09 -0700 | [diff] [blame] | 48 |  | 
| Pawin Vongmasa | 4658418 | 2017-02-27 20:37:22 -0800 | [diff] [blame] | 49 | LOCAL_MODULE := android.hardware.media.omx@1.0-service | 
|  | 50 | LOCAL_MODULE_RELATIVE_PATH := hw | 
| Steven Moreland | 5550640 | 2017-06-07 18:18:09 -0700 | [diff] [blame] | 51 | LOCAL_VENDOR_MODULE := true | 
| Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 52 | LOCAL_32_BIT_ONLY := true | 
| Jiyong Park | 5f98610 | 2017-12-18 20:43:16 +0900 | [diff] [blame] | 53 | # Since this is 32-bit-only module, only 32-bit version of the codecs are installed. | 
|  | 54 | # TODO(b/72343507): eliminate the need for manually adding .vendor suffix. This should be done | 
|  | 55 | # by the build system. | 
| Josh Gao | ebb2179 | 2018-01-24 16:37:16 -0800 | [diff] [blame] | 56 | LOCAL_REQUIRED_MODULES += \ | 
| Jiyong Park | 5f98610 | 2017-12-18 20:43:16 +0900 | [diff] [blame] | 57 | $(foreach codec,$(_software_codecs),\ | 
|  | 58 | $(eval _vendor_suffix := $(if $(BOARD_VNDK_VERSION),.vendor))\ | 
|  | 59 | $(codec)$(_vendor_suffix)\ | 
|  | 60 | ) | 
|  | 61 | _software_codecs := | 
| Pawin Vongmasa | 4658418 | 2017-02-27 20:37:22 -0800 | [diff] [blame] | 62 | LOCAL_INIT_RC := android.hardware.media.omx@1.0-service.rc | 
| Pawin Vongmasa | e7b8942 | 2017-11-16 19:33:39 -0800 | [diff] [blame] | 63 |  | 
| Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 64 | include $(BUILD_EXECUTABLE) | 
|  | 65 |  | 
| Chong Zhang | 8f91543 | 2018-09-05 11:17:17 -0700 | [diff] [blame] | 66 | #################################################################### | 
|  | 67 |  | 
|  | 68 | # service executable | 
|  | 69 | include $(CLEAR_VARS) | 
|  | 70 | # seccomp is not required for coverage build. | 
|  | 71 | ifneq ($(NATIVE_COVERAGE),true) | 
| Ivan Lozano | fffc228 | 2019-01-10 15:18:12 -0800 | [diff] [blame^] | 72 | LOCAL_REQUIRED_MODULES_arm := crash_dump.policy mediaswcodec.policy | 
|  | 73 | LOCAL_REQUIRED_MODULES_x86 := crash_dump.policy mediaswcodec.policy | 
| Chong Zhang | 8f91543 | 2018-09-05 11:17:17 -0700 | [diff] [blame] | 74 | endif | 
| Chong Zhang | ea788f7 | 2018-10-12 14:44:24 -0700 | [diff] [blame] | 75 | LOCAL_SRC_FILES := \ | 
|  | 76 | main_swcodecservice.cpp \ | 
|  | 77 | MediaCodecUpdateService.cpp \ | 
|  | 78 |  | 
|  | 79 | sanitizer_runtime_libraries := $(call normalize-path-list,$(addsuffix .so,\ | 
|  | 80 | $(ADDRESS_SANITIZER_RUNTIME_LIBRARY) \ | 
|  | 81 | $(UBSAN_RUNTIME_LIBRARY) \ | 
|  | 82 | $(TSAN_RUNTIME_LIBRARY) \ | 
|  | 83 | $(2ND_ADDRESS_SANITIZER_RUNTIME_LIBRARY) \ | 
|  | 84 | $(2ND_UBSAN_RUNTIME_LIBRARY) \ | 
|  | 85 | $(2ND_TSAN_RUNTIME_LIBRARY))) | 
|  | 86 |  | 
| Chong Zhang | 253c88d | 2018-10-16 17:31:14 -0700 | [diff] [blame] | 87 | # $(info Sanitizer:  $(sanitizer_runtime_libraries)) | 
| Chong Zhang | ea788f7 | 2018-10-12 14:44:24 -0700 | [diff] [blame] | 88 |  | 
|  | 89 | llndk_libraries := $(call normalize-path-list,$(addsuffix .so,\ | 
|  | 90 | $(LLNDK_LIBRARIES))) | 
|  | 91 |  | 
| Chong Zhang | 253c88d | 2018-10-16 17:31:14 -0700 | [diff] [blame] | 92 | # $(info LLNDK:  $(llndk_libraries)) | 
| Chong Zhang | ea788f7 | 2018-10-12 14:44:24 -0700 | [diff] [blame] | 93 |  | 
|  | 94 | LOCAL_CFLAGS := -DLINKED_LIBRARIES='"$(sanitizer_runtime_libraries):$(llndk_libraries)"' | 
|  | 95 |  | 
| Chong Zhang | 8f91543 | 2018-09-05 11:17:17 -0700 | [diff] [blame] | 96 | LOCAL_SHARED_LIBRARIES := \ | 
|  | 97 | libavservices_minijail \ | 
|  | 98 | libbase \ | 
|  | 99 | libbinder \ | 
|  | 100 | libcutils \ | 
|  | 101 | libhidltransport \ | 
|  | 102 | libhwbinder \ | 
|  | 103 | liblog \ | 
|  | 104 | libmedia \ | 
|  | 105 | libutils \ | 
|  | 106 | libziparchive \ | 
|  | 107 |  | 
|  | 108 | LOCAL_MODULE := mediaswcodec | 
|  | 109 | LOCAL_INIT_RC := mediaswcodec.rc | 
|  | 110 | LOCAL_32_BIT_ONLY := true | 
| Kostya Kortchinsky | b2dec56 | 2018-12-06 08:07:28 -0800 | [diff] [blame] | 111 | LOCAL_SANITIZE := scudo | 
| Chong Zhang | 8f91543 | 2018-09-05 11:17:17 -0700 | [diff] [blame] | 112 |  | 
| Chong Zhang | ea788f7 | 2018-10-12 14:44:24 -0700 | [diff] [blame] | 113 | sanitizer_runtime_libraries := | 
|  | 114 | llndk_libraries := | 
|  | 115 |  | 
| Chong Zhang | 8f91543 | 2018-09-05 11:17:17 -0700 | [diff] [blame] | 116 | include $(BUILD_EXECUTABLE) | 
|  | 117 |  | 
|  | 118 | #################################################################### | 
|  | 119 |  | 
| Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 120 | # service seccomp policy | 
| bohu | e5f21fc | 2017-12-15 11:20:58 -0800 | [diff] [blame] | 121 | ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), x86 x86_64 arm arm64)) | 
| Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 122 | include $(CLEAR_VARS) | 
|  | 123 | LOCAL_MODULE := mediacodec.policy | 
|  | 124 | LOCAL_MODULE_CLASS := ETC | 
|  | 125 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/seccomp_policy | 
|  | 126 | # mediacodec runs in 32-bit combatibility mode. For 64 bit architectures, | 
|  | 127 | # use the 32 bit policy | 
|  | 128 | ifdef TARGET_2ND_ARCH | 
| Greg Hartman | 97df29e | 2018-02-08 20:16:32 -0800 | [diff] [blame] | 129 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) | 
| Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 130 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_2ND_ARCH).policy | 
| Greg Hartman | 97df29e | 2018-02-08 20:16:32 -0800 | [diff] [blame] | 131 | else | 
|  | 132 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy | 
|  | 133 | endif | 
| Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 134 | else | 
|  | 135 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy | 
|  | 136 | endif | 
|  | 137 | include $(BUILD_PREBUILT) | 
|  | 138 | endif | 
|  | 139 |  | 
| Ivan Lozano | fffc228 | 2019-01-10 15:18:12 -0800 | [diff] [blame^] | 140 | #################################################################### | 
|  | 141 |  | 
|  | 142 | # sw service seccomp policy | 
|  | 143 | ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), x86 x86_64 arm arm64)) | 
|  | 144 | include $(CLEAR_VARS) | 
|  | 145 | LOCAL_MODULE := mediaswcodec.policy | 
|  | 146 | LOCAL_MODULE_CLASS := ETC | 
|  | 147 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/seccomp_policy | 
|  | 148 | # mediaswcodec runs in 32-bit combatibility mode. For 64 bit architectures, | 
|  | 149 | # use the 32 bit policy | 
|  | 150 | ifdef TARGET_2ND_ARCH | 
|  | 151 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) | 
|  | 152 | LOCAL_SRC_FILES := seccomp_policy/mediaswcodec-$(TARGET_2ND_ARCH).policy | 
|  | 153 | else | 
|  | 154 | LOCAL_SRC_FILES := seccomp_policy/mediaswcodec-$(TARGET_ARCH).policy | 
|  | 155 | endif | 
|  | 156 | else | 
|  | 157 | LOCAL_SRC_FILES := seccomp_policy/mediaswcodec-$(TARGET_ARCH).policy | 
|  | 158 | endif | 
|  | 159 | include $(BUILD_PREBUILT) | 
|  | 160 | endif | 
|  | 161 |  | 
| Jeff Vander Stoep | c9ea211 | 2016-02-17 10:52:20 -0800 | [diff] [blame] | 162 | include $(call all-makefiles-under, $(LOCAL_PATH)) |