Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame^] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | include $(CLEAR_VARS) |
| 3 | |
| 4 | # SELinux policy version. |
| 5 | # Must be <= /selinux/policyvers reported by the Android kernel. |
| 6 | # Must be within the compatibility range reported by checkpolicy -V. |
| 7 | POLICYVERS := 24 |
| 8 | |
| 9 | MLS_SENS=1 |
| 10 | MLS_CATS=1024 |
| 11 | |
| 12 | file := $(TARGET_ROOT_OUT)/policy.$(POLICYVERS) |
| 13 | $(file) : $(LOCAL_PATH)/policy.$(POLICYVERS) | $(ACP) |
| 14 | $(transform-prebuilt-to-target) |
| 15 | ALL_PREBUILT += $(file) |
| 16 | $(INSTALLED_RAMDISK_TARGET): $(file) |
| 17 | |
| 18 | $(LOCAL_PATH)/policy.$(POLICYVERS): $(LOCAL_PATH)/policy.conf |
| 19 | checkpolicy -M -c $(POLICYVERS) -o $@ $< |
| 20 | |
| 21 | $(LOCAL_PATH)/policy.conf: $(wildcard $(addprefix $(LOCAL_PATH)/,security_classes initial_sids access_vectors global_macros mls_macros mls policy_capabilities te_macros attributes *.te roles users ocontexts)) |
| 22 | m4 -D mls_num_sens=$(MLS_SENS) -D mls_num_cats=$(MLS_CATS) -s $^ > $@ |
| 23 | |
| 24 | file := $(TARGET_ROOT_OUT)/file_contexts |
| 25 | $(file) : $(LOCAL_PATH)/file_contexts | $(ACP) |
| 26 | $(transform-prebuilt-to-target) |
| 27 | ALL_PREBUILT += $(file) |
| 28 | $(INSTALLED_RAMDISK_TARGET): $(file) |
| 29 | |
| 30 | file := $(TARGET_ROOT_OUT)/seapp_contexts |
| 31 | $(file) : $(LOCAL_PATH)/seapp_contexts | $(ACP) |
| 32 | $(transform-prebuilt-to-target) |
| 33 | ALL_PREBUILT += $(file) |
| 34 | $(INSTALLED_RAMDISK_TARGET): $(file) |