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) |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame^] | 30 | LOCAL_REQUIRED_MODULES_arm := mediacodec.policy |
| 31 | LOCAL_REQUIRED_MODULES_x86 := 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 | |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 68 | # service seccomp policy |
bohu | e5f21fc | 2017-12-15 11:20:58 -0800 | [diff] [blame] | 69 | ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), x86 x86_64 arm arm64)) |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 70 | include $(CLEAR_VARS) |
| 71 | LOCAL_MODULE := mediacodec.policy |
| 72 | LOCAL_MODULE_CLASS := ETC |
| 73 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/seccomp_policy |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame^] | 74 | LOCAL_REQUIRED_MODULES := crash_dump.policy |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 75 | # mediacodec runs in 32-bit combatibility mode. For 64 bit architectures, |
| 76 | # use the 32 bit policy |
| 77 | ifdef TARGET_2ND_ARCH |
Greg Hartman | 97df29e | 2018-02-08 20:16:32 -0800 | [diff] [blame] | 78 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 79 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_2ND_ARCH).policy |
Greg Hartman | 97df29e | 2018-02-08 20:16:32 -0800 | [diff] [blame] | 80 | else |
| 81 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy |
| 82 | endif |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 83 | else |
| 84 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy |
| 85 | endif |
| 86 | include $(BUILD_PREBUILT) |
| 87 | endif |
| 88 | |
Ivan Lozano | fffc228 | 2019-01-10 15:18:12 -0800 | [diff] [blame] | 89 | #################################################################### |
| 90 | |
Ivan Lozano | fffc228 | 2019-01-10 15:18:12 -0800 | [diff] [blame] | 91 | |
Jeff Vander Stoep | c9ea211 | 2016-02-17 10:52:20 -0800 | [diff] [blame] | 92 | include $(call all-makefiles-under, $(LOCAL_PATH)) |