Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
William Roberts | f0e0a94 | 2012-08-27 15:41:15 -0700 | [diff] [blame] | 2 | |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 3 | include $(CLEAR_VARS) |
| 4 | |
| 5 | # SELinux policy version. |
Stephen Smalley | b4f1706 | 2015-03-13 10:03:52 -0400 | [diff] [blame] | 6 | # Must be <= /sys/fs/selinux/policyvers reported by the Android kernel. |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 7 | # Must be within the compatibility range reported by checkpolicy -V. |
Jeffrey Vander Stoep | 5ca5696 | 2015-12-08 18:15:14 +0000 | [diff] [blame] | 8 | POLICYVERS ?= 29 |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 9 | |
| 10 | MLS_SENS=1 |
| 11 | MLS_CATS=1024 |
| 12 | |
Stephen Smalley | b4f1706 | 2015-03-13 10:03:52 -0400 | [diff] [blame] | 13 | ifdef BOARD_SEPOLICY_REPLACE |
| 14 | $(error BOARD_SEPOLICY_REPLACE is no longer supported; please remove from your BoardConfig.mk or other .mk file.) |
| 15 | endif |
| 16 | |
| 17 | ifdef BOARD_SEPOLICY_IGNORE |
| 18 | $(error BOARD_SEPOLICY_IGNORE is no longer supported; please remove from your BoardConfig.mk or other .mk file.) |
| 19 | endif |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 20 | |
Stephen Smalley | 8e0ca88 | 2015-04-01 10:14:56 -0400 | [diff] [blame] | 21 | ifdef BOARD_SEPOLICY_UNION |
| 22 | $(warning BOARD_SEPOLICY_UNION is no longer required - all files found in BOARD_SEPOLICY_DIRS are implicitly unioned; please remove from your BoardConfig.mk or other .mk file.) |
| 23 | endif |
Robert Craig | 6b0ff47 | 2014-01-29 13:10:58 -0500 | [diff] [blame] | 24 | |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 25 | ifdef BOARD_SEPOLICY_M4DEFS |
| 26 | LOCAL_ADDITIONAL_M4DEFS := $(addprefix -D, $(BOARD_SEPOLICY_M4DEFS)) |
| 27 | endif |
| 28 | |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 29 | # Builds paths for all policy files found in BOARD_SEPOLICY_DIRS and the LOCAL_PATH. |
rpcraig | 47cd396 | 2012-10-17 21:09:52 -0400 | [diff] [blame] | 30 | # $(1): the set of policy name paths to build |
Dan Willemsen | bc2a49f | 2015-08-10 15:40:52 -0700 | [diff] [blame] | 31 | build_policy = $(foreach type, $(1), $(foreach file, $(addsuffix /$(type), $(LOCAL_PATH) $(BOARD_SEPOLICY_DIRS)), $(sort $(wildcard $(file))))) |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 32 | |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 33 | # Builds paths for all policy files found in BOARD_SEPOLICY_DIRS. |
| 34 | # $(1): the set of policy name paths to build |
| 35 | build_device_policy = $(foreach type, $(1), $(foreach file, $(addsuffix /$(type), $(BOARD_SEPOLICY_DIRS)), $(sort $(wildcard $(file))))) |
| 36 | |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 37 | # Add a file containing only a newline in-between each policy configuration |
| 38 | # 'contexts' file. This will allow OEM policy configuration files without a |
| 39 | # final newline (0x0A) to be built correctly by the m4(1) macro processor. |
| 40 | # $(1): the set of contexts file names. |
| 41 | # $(2): the file containing only 0x0A. |
| 42 | add_nl = $(foreach entry, $(1), $(subst $(entry), $(entry) $(2), $(entry))) |
| 43 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 44 | sepolicy_build_files := security_classes \ |
| 45 | initial_sids \ |
| 46 | access_vectors \ |
| 47 | global_macros \ |
Nick Kralevich | a17a266 | 2014-11-05 15:30:41 -0800 | [diff] [blame] | 48 | neverallow_macros \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 49 | mls_macros \ |
| 50 | mls \ |
| 51 | policy_capabilities \ |
| 52 | te_macros \ |
| 53 | attributes \ |
Jeff Vander Stoep | de9b530 | 2015-06-05 15:28:55 -0700 | [diff] [blame] | 54 | ioctl_macros \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 55 | *.te \ |
| 56 | roles \ |
| 57 | users \ |
| 58 | initial_sid_contexts \ |
| 59 | fs_use \ |
| 60 | genfs_contexts \ |
| 61 | port_contexts |
| 62 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 63 | ################################## |
| 64 | include $(CLEAR_VARS) |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 65 | |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 66 | LOCAL_MODULE := sectxfile_nl |
| 67 | LOCAL_MODULE_CLASS := ETC |
| 68 | LOCAL_MODULE_TAGS := optional |
| 69 | |
| 70 | # Create a file containing newline only to add between context config files |
| 71 | include $(BUILD_SYSTEM)/base_rules.mk |
William Roberts | cb1ab98 | 2015-12-14 07:54:28 -0800 | [diff] [blame] | 72 | $(LOCAL_BUILT_MODULE): |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 73 | @mkdir -p $(dir $@) |
| 74 | $(hide) echo > $@ |
| 75 | |
| 76 | built_nl := $(LOCAL_BUILT_MODULE) |
| 77 | |
| 78 | ################################# |
| 79 | include $(CLEAR_VARS) |
| 80 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 81 | LOCAL_MODULE := sepolicy |
| 82 | LOCAL_MODULE_CLASS := ETC |
| 83 | LOCAL_MODULE_TAGS := optional |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 84 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 85 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 86 | include $(BUILD_SYSTEM)/base_rules.mk |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 87 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 88 | sepolicy_policy.conf := $(intermediates)/policy.conf |
| 89 | $(sepolicy_policy.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 90 | $(sepolicy_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 91 | $(sepolicy_policy.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
William Roberts | da52e85 | 2015-06-27 07:22:34 -0700 | [diff] [blame] | 92 | $(sepolicy_policy.conf): $(call build_policy, $(sepolicy_build_files)) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 93 | @mkdir -p $(dir $@) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 94 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 95 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
Nick Kralevich | 623975f | 2014-01-11 01:31:03 -0800 | [diff] [blame] | 96 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Nick Kralevich | 623975f | 2014-01-11 01:31:03 -0800 | [diff] [blame] | 97 | -s $^ > $@ |
Robert Craig | 65d4f44 | 2013-03-27 06:30:25 -0400 | [diff] [blame] | 98 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 99 | |
William Roberts | da52e85 | 2015-06-27 07:22:34 -0700 | [diff] [blame] | 100 | $(LOCAL_BUILT_MODULE): $(sepolicy_policy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 101 | @mkdir -p $(dir $@) |
Ying Wang | f4ea5b2 | 2012-04-09 15:31:03 -0700 | [diff] [blame] | 102 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $@ $< |
Robert Craig | 65d4f44 | 2013-03-27 06:30:25 -0400 | [diff] [blame] | 103 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $(dir $<)/$(notdir $@).dontaudit $<.dontaudit |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 104 | |
Ying Wang | d8b122c | 2012-10-25 19:01:31 -0700 | [diff] [blame] | 105 | built_sepolicy := $(LOCAL_BUILT_MODULE) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 106 | sepolicy_policy.conf := |
Stephen Smalley | 01a58af | 2012-10-02 12:46:37 -0400 | [diff] [blame] | 107 | |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 108 | ################################## |
| 109 | include $(CLEAR_VARS) |
| 110 | |
| 111 | LOCAL_MODULE := sepolicy.recovery |
| 112 | LOCAL_MODULE_CLASS := ETC |
| 113 | LOCAL_MODULE_TAGS := eng |
| 114 | |
| 115 | include $(BUILD_SYSTEM)/base_rules.mk |
| 116 | |
| 117 | sepolicy_policy_recovery.conf := $(intermediates)/policy_recovery.conf |
| 118 | $(sepolicy_policy_recovery.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 119 | $(sepolicy_policy_recovery.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 120 | $(sepolicy_policy_recovery.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
William Roberts | da52e85 | 2015-06-27 07:22:34 -0700 | [diff] [blame] | 121 | $(sepolicy_policy_recovery.conf): $(call build_policy, $(sepolicy_build_files)) |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 122 | @mkdir -p $(dir $@) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 123 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 124 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 125 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 126 | -D target_recovery=true \ |
| 127 | -s $^ > $@ |
| 128 | |
William Roberts | da52e85 | 2015-06-27 07:22:34 -0700 | [diff] [blame] | 129 | $(LOCAL_BUILT_MODULE): $(sepolicy_policy_recovery.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 130 | @mkdir -p $(dir $@) |
| 131 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $@ $< |
| 132 | |
| 133 | built_sepolicy_recovery := $(LOCAL_BUILT_MODULE) |
| 134 | sepolicy_policy_recovery.conf := |
| 135 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 136 | ################################## |
| 137 | include $(CLEAR_VARS) |
| 138 | |
| 139 | LOCAL_MODULE := general_sepolicy.conf |
| 140 | LOCAL_MODULE_CLASS := ETC |
| 141 | LOCAL_MODULE_TAGS := tests |
| 142 | |
| 143 | include $(BUILD_SYSTEM)/base_rules.mk |
| 144 | |
| 145 | exp_sepolicy_build_files :=\ |
Dan Willemsen | bc2a49f | 2015-08-10 15:40:52 -0700 | [diff] [blame] | 146 | $(foreach file, $(addprefix $(LOCAL_PATH)/, $(sepolicy_build_files)), $(sort $(wildcard $(file)))) |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 147 | |
| 148 | $(LOCAL_BUILT_MODULE): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 149 | $(LOCAL_BUILT_MODULE): PRIVATE_MLS_CATS := $(MLS_CATS) |
| 150 | $(LOCAL_BUILT_MODULE): $(exp_sepolicy_build_files) |
| 151 | mkdir -p $(dir $@) |
| 152 | $(hide) m4 -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 153 | -D target_build_variant=user \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 154 | -s $^ > $@ |
| 155 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
| 156 | |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 157 | built_general_sepolicy.conf := $(LOCAL_BUILT_MODULE) |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 158 | exp_sepolicy_build_files := |
| 159 | |
| 160 | ################################## |
Stephen Smalley | 01a58af | 2012-10-02 12:46:37 -0400 | [diff] [blame] | 161 | include $(CLEAR_VARS) |
| 162 | |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 163 | LOCAL_MODULE := sepolicy.general |
| 164 | LOCAL_MODULE_CLASS := ETC |
| 165 | LOCAL_MODULE_TAGS := tests |
| 166 | |
| 167 | include $(BUILD_SYSTEM)/base_rules.mk |
| 168 | |
| 169 | $(LOCAL_BUILT_MODULE): PRIVATE_BUILT_SEPOLICY.CONF := $(built_general_sepolicy.conf) |
| 170 | $(LOCAL_BUILT_MODULE): $(built_general_sepolicy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy |
| 171 | @mkdir -p $(dir $@) |
| 172 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $@ $(PRIVATE_BUILT_SEPOLICY.CONF) |
| 173 | |
| 174 | built_general_sepolicy := $(LOCAL_BUILT_MODULE) |
| 175 | ################################## |
| 176 | include $(CLEAR_VARS) |
| 177 | |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 178 | LOCAL_MODULE := file_contexts.bin |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 179 | LOCAL_MODULE_CLASS := ETC |
| 180 | LOCAL_MODULE_TAGS := optional |
| 181 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 182 | |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 183 | include $(BUILD_SYSTEM)/base_rules.mk |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 184 | |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 185 | # The file_contexts.bin is built in the following way: |
| 186 | # 1. Collect all file_contexts files in THIS repository and process them with |
| 187 | # m4 into a tmp file called file_contexts.local.tmp. |
| 188 | # 2. Collect all device specific file_contexts files and process them with m4 |
| 189 | # into a tmp file called file_contexts.device.tmp. |
| 190 | # 3. Run checkfc and fc_sort on file_contexts.device.tmp and output to |
| 191 | # file_contexts.device.sorted.tmp. |
| 192 | # 4. Concatenate file_contexts.local.tmp and file_contexts.device.tmp into |
| 193 | # file_contexts.concat.tmp. |
| 194 | # 5. Run checkfc and sefcontext_compile on file_contexts.concat.tmp to produce |
| 195 | # file_contexts.bin. |
| 196 | # |
| 197 | # Note: That a newline file is placed between each file_context file found to |
| 198 | # ensure a proper build when an fc file is missing an ending newline. |
Stephen Smalley | 01a58af | 2012-10-02 12:46:37 -0400 | [diff] [blame] | 199 | |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 200 | local_fc_files := $(LOCAL_PATH)/file_contexts |
| 201 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 202 | local_fc_files := $(local_fc_files) $(LOCAL_PATH)/file_contexts_asan |
| 203 | endif |
| 204 | local_fcfiles_with_nl := $(call add_nl, $(local_fc_files), $(built_nl)) |
| 205 | |
| 206 | file_contexts.local.tmp := $(intermediates)/file_contexts.local.tmp |
| 207 | $(file_contexts.local.tmp): $(local_fcfiles_with_nl) |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 208 | @mkdir -p $(dir $@) |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 209 | $(hide) m4 -s $^ > $@ |
| 210 | |
| 211 | device_fc_files := $(call build_device_policy, file_contexts) |
| 212 | device_fcfiles_with_nl := $(call add_nl, $(device_fc_files), $(built_nl)) |
| 213 | |
| 214 | file_contexts.device.tmp := $(intermediates)/file_contexts.device.tmp |
| 215 | $(file_contexts.device.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 216 | $(file_contexts.device.tmp): $(device_fcfiles_with_nl) |
| 217 | @mkdir -p $(dir $@) |
| 218 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
| 219 | |
| 220 | file_contexts.device.sorted.tmp := $(intermediates)/file_contexts.device.sorted.tmp |
| 221 | $(file_contexts.device.sorted.tmp): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 222 | $(file_contexts.device.sorted.tmp): $(file_contexts.device.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/fc_sort $(HOST_OUT_EXECUTABLES)/checkfc |
| 223 | @mkdir -p $(dir $@) |
| 224 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc $(PRIVATE_SEPOLICY) $< |
| 225 | $(hide) $(HOST_OUT_EXECUTABLES)/fc_sort $< $@ |
| 226 | |
| 227 | file_contexts.concat.tmp := $(intermediates)/file_contexts.concat.tmp |
| 228 | $(file_contexts.concat.tmp): $(file_contexts.local.tmp) $(file_contexts.device.sorted.tmp) |
| 229 | @mkdir -p $(dir $@) |
| 230 | $(hide) m4 -s $^ > $@ |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 231 | |
William Roberts | 3746a0a | 2015-09-25 10:18:44 -0700 | [diff] [blame] | 232 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 233 | $(LOCAL_BUILT_MODULE): $(file_contexts.concat.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/sefcontext_compile $(HOST_OUT_EXECUTABLES)/checkfc |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 234 | @mkdir -p $(dir $@) |
William Roberts | 3746a0a | 2015-09-25 10:18:44 -0700 | [diff] [blame] | 235 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc $(PRIVATE_SEPOLICY) $< |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 236 | $(hide) $(HOST_OUT_EXECUTABLES)/sefcontext_compile -o $@ $< |
| 237 | |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 238 | built_fc := $(LOCAL_BUILT_MODULE) |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 239 | local_fc_files := |
| 240 | local_fcfiles_with_nl := |
| 241 | device_fc_files := |
| 242 | device_fcfiles_with_nl := |
| 243 | file_contexts.concat.tmp := |
| 244 | file_contexts.device.sorted.tmp := |
| 245 | file_contexts.device.tmp := |
| 246 | file_contexts.local.tmp := |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 247 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 248 | ################################## |
| 249 | include $(CLEAR_VARS) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 250 | |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 251 | LOCAL_MODULE := general_file_contexts.bin |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 252 | LOCAL_MODULE_CLASS := ETC |
| 253 | LOCAL_MODULE_TAGS := tests |
| 254 | |
| 255 | include $(BUILD_SYSTEM)/base_rules.mk |
| 256 | |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 257 | general_file_contexts.tmp := $(intermediates)/general_file_contexts.tmp |
William Roberts | 3746a0a | 2015-09-25 10:18:44 -0700 | [diff] [blame] | 258 | $(general_file_contexts.tmp): $(addprefix $(LOCAL_PATH)/, file_contexts) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 259 | @mkdir -p $(dir $@) |
| 260 | $(hide) m4 -s $< > $@ |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 261 | |
William Roberts | 3746a0a | 2015-09-25 10:18:44 -0700 | [diff] [blame] | 262 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_general_sepolicy) |
| 263 | $(LOCAL_BUILT_MODULE): $(general_file_contexts.tmp) $(built_general_sepolicy) $(HOST_OUT_EXECUTABLES)/sefcontext_compile $(HOST_OUT_EXECUTABLES)/checkfc |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 264 | @mkdir -p $(dir $@) |
William Roberts | 3746a0a | 2015-09-25 10:18:44 -0700 | [diff] [blame] | 265 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc $(PRIVATE_SEPOLICY) $< |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 266 | $(hide) $(HOST_OUT_EXECUTABLES)/sefcontext_compile -o $@ $< |
| 267 | |
| 268 | general_file_contexts.tmp := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 269 | |
| 270 | ################################## |
| 271 | include $(CLEAR_VARS) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 272 | LOCAL_MODULE := seapp_contexts |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 273 | LOCAL_MODULE_CLASS := ETC |
| 274 | LOCAL_MODULE_TAGS := optional |
| 275 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 276 | |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 277 | include $(BUILD_SYSTEM)/base_rules.mk |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 278 | |
William Roberts | 81e1f90 | 2015-06-03 21:57:47 -0700 | [diff] [blame] | 279 | all_sc_files := $(call build_policy, seapp_contexts) |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 280 | |
Ying Wang | d8b122c | 2012-10-25 19:01:31 -0700 | [diff] [blame] | 281 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
William Roberts | 81e1f90 | 2015-06-03 21:57:47 -0700 | [diff] [blame] | 282 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_FILES := $(all_sc_files) |
| 283 | $(LOCAL_BUILT_MODULE): $(built_sepolicy) $(all_sc_files) $(HOST_OUT_EXECUTABLES)/checkseapp |
William Roberts | f0e0a94 | 2012-08-27 15:41:15 -0700 | [diff] [blame] | 284 | @mkdir -p $(dir $@) |
William Roberts | 99fe8df | 2015-06-30 13:53:51 -0700 | [diff] [blame] | 285 | $(hide) $(HOST_OUT_EXECUTABLES)/checkseapp -p $(PRIVATE_SEPOLICY) -o $@ $(PRIVATE_SC_FILES) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 286 | |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 287 | built_sc := $(LOCAL_BUILT_MODULE) |
William Roberts | 81e1f90 | 2015-06-03 21:57:47 -0700 | [diff] [blame] | 288 | all_sc_files := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 289 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 290 | ################################## |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 291 | include $(CLEAR_VARS) |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 292 | LOCAL_MODULE := general_seapp_contexts |
| 293 | LOCAL_MODULE_CLASS := ETC |
| 294 | LOCAL_MODULE_TAGS := tests |
| 295 | |
| 296 | include $(BUILD_SYSTEM)/base_rules.mk |
| 297 | |
William Roberts | 81e1f90 | 2015-06-03 21:57:47 -0700 | [diff] [blame] | 298 | all_sc_files := $(addprefix $(LOCAL_PATH)/, seapp_contexts) |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 299 | |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 300 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_general_sepolicy) |
William Roberts | 81e1f90 | 2015-06-03 21:57:47 -0700 | [diff] [blame] | 301 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_FILE := $(all_sc_files) |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 302 | $(LOCAL_BUILT_MODULE): $(built_general_sepolicy) $(all_sc_files) $(HOST_OUT_EXECUTABLES)/checkseapp |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 303 | @mkdir -p $(dir $@) |
William Roberts | 99fe8df | 2015-06-30 13:53:51 -0700 | [diff] [blame] | 304 | $(hide) $(HOST_OUT_EXECUTABLES)/checkseapp -p $(PRIVATE_SEPOLICY) -o $@ $(PRIVATE_SC_FILE) |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 305 | |
William Roberts | 81e1f90 | 2015-06-03 21:57:47 -0700 | [diff] [blame] | 306 | all_sc_files := |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 307 | |
| 308 | ################################## |
| 309 | include $(CLEAR_VARS) |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 310 | LOCAL_MODULE := general_seapp_neverallows |
| 311 | LOCAL_MODULE_CLASS := ETC |
| 312 | LOCAL_MODULE_TAGS := tests |
| 313 | |
| 314 | include $(BUILD_SYSTEM)/base_rules.mk |
| 315 | |
| 316 | $(LOCAL_BUILT_MODULE): $(addprefix $(LOCAL_PATH)/, seapp_contexts) |
| 317 | @mkdir -p $(dir $@) |
| 318 | - $(hide) grep -ie '^neverallow' $< > $@ |
| 319 | |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 320 | |
| 321 | ################################## |
| 322 | include $(CLEAR_VARS) |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 323 | |
| 324 | LOCAL_MODULE := property_contexts |
| 325 | LOCAL_MODULE_CLASS := ETC |
| 326 | LOCAL_MODULE_TAGS := optional |
| 327 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 328 | |
| 329 | include $(BUILD_SYSTEM)/base_rules.mk |
| 330 | |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 331 | all_pc_files := $(call build_policy, property_contexts) |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 332 | all_pcfiles_with_nl := $(call add_nl, $(all_pc_files), $(built_nl)) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 333 | |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 334 | property_contexts.tmp := $(intermediates)/property_contexts.tmp |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 335 | $(property_contexts.tmp): PRIVATE_PC_FILES := $(all_pcfiles_with_nl) |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 336 | $(property_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
William Roberts | 4674975 | 2015-12-28 15:26:20 -0800 | [diff] [blame] | 337 | $(property_contexts.tmp): $(all_pcfiles_with_nl) |
William Roberts | 7f81b33 | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 338 | @mkdir -p $(dir $@) |
Colin Cross | 9eb6c87 | 2015-10-01 21:25:09 +0000 | [diff] [blame] | 339 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@ |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 340 | |
| 341 | |
| 342 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 343 | $(LOCAL_BUILT_MODULE): $(property_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 344 | @mkdir -p $(dir $@) |
| 345 | $(hide) $(ACP) $< $@ |
| 346 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $< |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 347 | |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 348 | built_pc := $(LOCAL_BUILT_MODULE) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 349 | all_pc_files := |
William Roberts | 4674975 | 2015-12-28 15:26:20 -0800 | [diff] [blame] | 350 | all_pcfiles_with_nl := |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 351 | property_contexts.tmp := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 352 | |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 353 | ################################## |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 354 | include $(CLEAR_VARS) |
| 355 | |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 356 | LOCAL_MODULE := general_property_contexts |
| 357 | LOCAL_MODULE_CLASS := ETC |
| 358 | LOCAL_MODULE_TAGS := tests |
| 359 | |
Stephen Smalley | c936173 | 2015-03-13 09:36:57 -0400 | [diff] [blame] | 360 | include $(BUILD_SYSTEM)/base_rules.mk |
| 361 | |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 362 | general_property_contexts.tmp := $(intermediates)/general_property_contexts.tmp |
| 363 | $(general_property_contexts.tmp): $(addprefix $(LOCAL_PATH)/, property_contexts) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 364 | @mkdir -p $(dir $@) |
| 365 | $(hide) m4 -s $< > $@ |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 366 | |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 367 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_general_sepolicy) |
| 368 | $(LOCAL_BUILT_MODULE): $(general_property_contexts.tmp) $(built_general_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 369 | @mkdir -p $(dir $@) |
| 370 | $(hide) $(ACP) $< $@ |
| 371 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $< |
| 372 | |
| 373 | general_property_contexts.tmp := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 374 | |
| 375 | ################################## |
| 376 | include $(CLEAR_VARS) |
| 377 | |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 378 | LOCAL_MODULE := service_contexts |
| 379 | LOCAL_MODULE_CLASS := ETC |
| 380 | LOCAL_MODULE_TAGS := optional |
| 381 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 382 | |
| 383 | include $(BUILD_SYSTEM)/base_rules.mk |
| 384 | |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 385 | all_svc_files := $(call build_policy, service_contexts) |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 386 | all_svcfiles_with_nl := $(call add_nl, $(all_svc_files), $(built_nl)) |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 387 | |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 388 | service_contexts.tmp := $(intermediates)/service_contexts.tmp |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 389 | $(service_contexts.tmp): PRIVATE_SVC_FILES := $(all_svcfiles_with_nl) |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 390 | $(service_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
William Roberts | 4674975 | 2015-12-28 15:26:20 -0800 | [diff] [blame] | 391 | $(service_contexts.tmp): $(all_svcfiles_with_nl) |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 392 | @mkdir -p $(dir $@) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 393 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 394 | |
| 395 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 396 | $(LOCAL_BUILT_MODULE): $(service_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 397 | @mkdir -p $(dir $@) |
William Roberts | ad3cb39 | 2015-09-24 18:10:54 -0700 | [diff] [blame] | 398 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -s $(PRIVATE_SEPOLICY) $< |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 399 | $(hide) $(ACP) $< $@ |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 400 | |
| 401 | built_svc := $(LOCAL_BUILT_MODULE) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 402 | all_svc_files := |
William Roberts | 4674975 | 2015-12-28 15:26:20 -0800 | [diff] [blame] | 403 | all_svcfiles_with_nl := |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 404 | service_contexts.tmp := |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 405 | |
| 406 | ################################## |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 407 | include $(CLEAR_VARS) |
| 408 | |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 409 | LOCAL_MODULE := general_service_contexts |
| 410 | LOCAL_MODULE_CLASS := ETC |
| 411 | LOCAL_MODULE_TAGS := tests |
| 412 | |
| 413 | include $(BUILD_SYSTEM)/base_rules.mk |
| 414 | |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 415 | general_service_contexts.tmp := $(intermediates)/general_service_contexts.tmp |
| 416 | $(general_service_contexts.tmp): $(addprefix $(LOCAL_PATH)/, service_contexts) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 417 | @mkdir -p $(dir $@) |
| 418 | $(hide) m4 -s $< > $@ |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 419 | |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 420 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_general_sepolicy) |
| 421 | $(LOCAL_BUILT_MODULE): $(general_service_contexts.tmp) $(built_general_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 422 | @mkdir -p $(dir $@) |
William Roberts | ad3cb39 | 2015-09-24 18:10:54 -0700 | [diff] [blame] | 423 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -s $(PRIVATE_SEPOLICY) $< |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 424 | $(hide) $(ACP) $< $@ |
| 425 | |
| 426 | general_service_contexts.tmp := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 427 | |
| 428 | ################################## |
| 429 | include $(CLEAR_VARS) |
| 430 | |
Robert Craig | 7f2392e | 2013-03-27 08:35:39 -0400 | [diff] [blame] | 431 | LOCAL_MODULE := mac_permissions.xml |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 432 | LOCAL_MODULE_CLASS := ETC |
| 433 | LOCAL_MODULE_TAGS := optional |
| 434 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/security |
| 435 | |
William Roberts | 2c8a55d | 2012-11-30 14:59:09 -0800 | [diff] [blame] | 436 | include $(BUILD_SYSTEM)/base_rules.mk |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 437 | |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 438 | # Build keys.conf |
| 439 | mac_perms_keys.tmp := $(intermediates)/keys.tmp |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 440 | $(mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
William Roberts | da52e85 | 2015-06-27 07:22:34 -0700 | [diff] [blame] | 441 | $(mac_perms_keys.tmp): $(call build_policy, keys.conf) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 442 | @mkdir -p $(dir $@) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 443 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 444 | |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 445 | all_mac_perms_files := $(call build_policy, $(LOCAL_MODULE)) |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 446 | |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 447 | $(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_mac_perms_files) |
| 448 | $(LOCAL_BUILT_MODULE): $(mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys.py $(all_mac_perms_files) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 449 | @mkdir -p $(dir $@) |
Nick Kralevich | c3c9052 | 2013-10-25 12:25:36 -0700 | [diff] [blame] | 450 | $(hide) DEFAULT_SYSTEM_DEV_CERTIFICATE="$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))" \ |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 451 | $(HOST_OUT_EXECUTABLES)/insertkeys.py -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 452 | |
Robert Craig | 7f2392e | 2013-03-27 08:35:39 -0400 | [diff] [blame] | 453 | mac_perms_keys.tmp := |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 454 | all_mac_perms_files := |
| 455 | |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 456 | ################################## |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 457 | include $(CLEAR_VARS) |
| 458 | |
| 459 | LOCAL_MODULE := selinux_version |
| 460 | LOCAL_MODULE_CLASS := ETC |
| 461 | LOCAL_MODULE_TAGS := optional |
| 462 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 463 | |
| 464 | include $(BUILD_SYSTEM)/base_rules.mk |
William Roberts | da52e85 | 2015-06-27 07:22:34 -0700 | [diff] [blame] | 465 | $(LOCAL_BUILT_MODULE): $(built_sepolicy) $(built_pc) $(built_fc) $(built_sc) $(built_svc) |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 466 | @mkdir -p $(dir $@) |
Colin Cross | 29a463d | 2015-07-17 13:08:41 -0700 | [diff] [blame] | 467 | $(hide) echo -n $(BUILD_FINGERPRINT_FROM_FILE) > $@ |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 468 | |
| 469 | ################################## |
rpcraig | 47cd396 | 2012-10-17 21:09:52 -0400 | [diff] [blame] | 470 | |
| 471 | build_policy := |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame^] | 472 | build_device_policy := |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 473 | sepolicy_build_files := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 474 | built_sepolicy := |
William Roberts | 50a478e | 2015-12-28 16:19:54 -0800 | [diff] [blame] | 475 | built_sepolicy_recovery := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 476 | built_sc := |
| 477 | built_fc := |
| 478 | built_pc := |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 479 | built_svc := |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 480 | built_general_sepolicy := |
| 481 | built_general_sepolicy.conf := |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 482 | built_nl := |
William Roberts | 50a478e | 2015-12-28 16:19:54 -0800 | [diff] [blame] | 483 | add_nl := |
Alice Chu | cdfb06f | 2012-11-01 11:33:04 -0700 | [diff] [blame] | 484 | |
| 485 | include $(call all-makefiles-under,$(LOCAL_PATH)) |