blob: 8b92edaf9e4c1e853f5afa29cacc047e967d771e [file] [log] [blame]
Stephen Smalley2dd4e512012-01-04 12:33:27 -05001LOCAL_PATH:= $(call my-dir)
2include $(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.
7POLICYVERS := 24
8
9MLS_SENS=1
10MLS_CATS=1024
11
12file := $(TARGET_ROOT_OUT)/policy.$(POLICYVERS)
13$(file) : $(LOCAL_PATH)/policy.$(POLICYVERS) | $(ACP)
14 $(transform-prebuilt-to-target)
15ALL_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
24file := $(TARGET_ROOT_OUT)/file_contexts
25$(file) : $(LOCAL_PATH)/file_contexts | $(ACP)
26 $(transform-prebuilt-to-target)
27ALL_PREBUILT += $(file)
28$(INSTALLED_RAMDISK_TARGET): $(file)
29
30file := $(TARGET_ROOT_OUT)/seapp_contexts
31$(file) : $(LOCAL_PATH)/seapp_contexts | $(ACP)
32 $(transform-prebuilt-to-target)
33ALL_PREBUILT += $(file)
34$(INSTALLED_RAMDISK_TARGET): $(file)