Home | History | Annotate | Download | only in minijail
      1 LOCAL_PATH := $(call my-dir)
      2 
      3 ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), arm arm64))
      4 include $(CLEAR_VARS)
      5 LOCAL_MODULE := mediacodec-seccomp.policy
      6 LOCAL_MODULE_CLASS := ETC
      7 LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/seccomp_policy
      8 
      9 # mediacodec runs in 32-bit combatibility mode. For 64 bit architectures,
     10 # use the 32 bit policy
     11 ifdef TARGET_2ND_ARCH
     12     LOCAL_SRC_FILES := $(LOCAL_PATH)/seccomp_policy/mediacodec-seccomp-$(TARGET_2ND_ARCH).policy
     13 else
     14     LOCAL_SRC_FILES := $(LOCAL_PATH)/seccomp_policy/mediacodec-seccomp-$(TARGET_ARCH).policy
     15 endif
     16 
     17 # allow device specific additions to the syscall whitelist
     18 ifneq (,$(wildcard $(BOARD_SECCOMP_POLICY)/mediacodec-seccomp.policy))
     19     LOCAL_SRC_FILES += $(BOARD_SECCOMP_POLICY)/mediacodec-seccomp.policy
     20 endif
     21 
     22 include $(BUILD_SYSTEM)/base_rules.mk
     23 
     24 $(LOCAL_BUILT_MODULE): $(LOCAL_SRC_FILES)
     25 	@mkdir -p $(dir $@)
     26 	$(hide) cat > $@ $^
     27 
     28 endif
     29