blob: fcecb291ec6328ab121fe78821312e2e323d1320 [file] [log] [blame]
Stephen Smalley2dd4e512012-01-04 12:33:27 -05001LOCAL_PATH:= $(call my-dir)
William Robertsf0e0a942012-08-27 15:41:15 -07002
Dan Cashman36ee91d2017-07-07 14:59:51 -07003include $(LOCAL_PATH)/definitions.mk
Jeff Vander Stoepecd288f2019-02-15 12:18:15 -08004include $(LOCAL_PATH)/policy_version.mk
Dan Cashman36ee91d2017-07-07 14:59:51 -07005
Stephen Smalley2dd4e512012-01-04 12:33:27 -05006include $(CLEAR_VARS)
Stephen Smalley2dd4e512012-01-04 12:33:27 -05007
8MLS_SENS=1
9MLS_CATS=1024
10
Stephen Smalley8e0ca882015-04-01 10:14:56 -040011ifdef BOARD_SEPOLICY_UNION
12$(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.)
13endif
Robert Craig6b0ff472014-01-29 13:10:58 -050014
William Robertsd2185582015-07-16 11:28:02 -070015ifdef BOARD_SEPOLICY_M4DEFS
16LOCAL_ADDITIONAL_M4DEFS := $(addprefix -D, $(BOARD_SEPOLICY_M4DEFS))
Dan Cashman36ee91d2017-07-07 14:59:51 -070017else
18LOCAL_ADDITIONAL_M4DEFS :=
William Robertsd2185582015-07-16 11:28:02 -070019endif
20
dcashmancc39f632016-07-22 13:13:11 -070021# sepolicy is now divided into multiple portions:
22# public - policy exported on which non-platform policy developers may write
23# additional policy. types and attributes are versioned and included in
24# delivered non-platform policy, which is to be combined with platform policy.
25# private - platform-only policy required for platform functionality but which
26# is not exported to vendor policy developers and as such may not be assumed
27# to exist.
Alex Klyubin55961722017-01-30 18:44:59 -080028# vendor - vendor-only policy required for vendor functionality. This policy can
29# reference the public policy but cannot reference the private policy. This
30# policy is for components which are produced from the core/non-vendor tree and
31# placed into a vendor partition.
dcashman07791552016-12-07 11:27:47 -080032# mapping - This contains policy statements which map the attributes
dcashmancc39f632016-07-22 13:13:11 -070033# exposed in the public policy of previous versions to the concrete types used
34# in this policy to ensure that policy targeting attributes from public
35# policy from an older platform version continues to work.
36
dcashman2e00e632016-10-12 14:58:09 -070037# build process for device:
dcashmancc39f632016-07-22 13:13:11 -070038# 1) convert policies to CIL:
39# - private + public platform policy to CIL
40# - mapping file to CIL (should already be in CIL form)
41# - non-platform public policy to CIL
42# - non-platform public + private policy to CIL
43# 2) attributize policy
dcashmancc39f632016-07-22 13:13:11 -070044# - run script which takes non-platform public and non-platform combined
45# private + public policy and produces attributized and versioned
46# non-platform policy
47# 3) combine policy files
48# - combine mapping, platform and non-platform policy.
49# - compile output binary policy file
50
51PLAT_PUBLIC_POLICY := $(LOCAL_PATH)/public
52PLAT_PRIVATE_POLICY := $(LOCAL_PATH)/private
Alex Klyubin55961722017-01-30 18:44:59 -080053PLAT_VENDOR_POLICY := $(LOCAL_PATH)/vendor
dcashman2e00e632016-10-12 14:58:09 -070054REQD_MASK_POLICY := $(LOCAL_PATH)/reqd_mask
Felix8c53a332020-07-14 21:28:51 +020055
56SYSTEM_EXT_PUBLIC_POLICY := $(SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS)
Felix8c53a332020-07-14 21:28:51 +020057SYSTEM_EXT_PRIVATE_POLICY := $(SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS)
Felix8c53a332020-07-14 21:28:51 +020058
Tri Vo9918f282019-02-01 11:41:08 -080059PRODUCT_PUBLIC_POLICY := $(PRODUCT_PUBLIC_SEPOLICY_DIRS)
60PRODUCT_PRIVATE_POLICY := $(PRODUCT_PRIVATE_SEPOLICY_DIRS)
Tri Vo75887dd2018-12-14 14:30:56 -080061
Bowgo Tsai948934b2019-08-29 17:12:11 +080062ifneq (,$(SYSTEM_EXT_PUBLIC_POLICY)$(SYSTEM_EXT_PRIVATE_POLICY))
Bowgo Tsaiac381252019-10-04 14:34:18 +080063HAS_SYSTEM_EXT_SEPOLICY_DIR := true
Bowgo Tsai948934b2019-08-29 17:12:11 +080064endif
65
Tri Vo75887dd2018-12-14 14:30:56 -080066# TODO(b/119305624): Currently if the device doesn't have a product partition,
67# we install product sepolicy into /system/product. We do that because bits of
68# product sepolicy that's still in /system might depend on bits that have moved
69# to /product. Once we finish migrating product sepolicy out of system, change
70# it so that if no product partition is present, product sepolicy artifacts are
71# not built and installed at all.
72ifneq (,$(PRODUCT_PUBLIC_POLICY)$(PRODUCT_PRIVATE_POLICY))
Bowgo Tsai7c4150c2019-10-04 15:36:05 +080073HAS_PRODUCT_SEPOLICY_DIR := true
Tri Vo75887dd2018-12-14 14:30:56 -080074endif
dcashman2e00e632016-10-12 14:58:09 -070075
Inseob Kim8ada8a72020-11-09 20:58:58 +090076ifneq ($(PLATFORM_SEPOLICY_VERSION),$(BOARD_SEPOLICY_VERS))
77mixed_sepolicy_build := true
78else
79mixed_sepolicy_build :=
80endif
81
Joel Galenson5988b562018-01-03 16:53:24 -080082NEVERALLOW_ARG :=
83ifeq ($(SELINUX_IGNORE_NEVERALLOWS),true)
84ifeq ($(TARGET_BUILD_VARIANT),user)
85$(error SELINUX_IGNORE_NEVERALLOWS := true cannot be used in user builds)
86endif
87$(warning Be careful when using the SELINUX_IGNORE_NEVERALLOWS flag. \
88 It does not work in user builds and using it will \
89 not stop you from failing CTS.)
90NEVERALLOW_ARG := -N
91endif
92
Bowgo Tsai45457e32017-11-27 11:41:33 +080093# BOARD_SEPOLICY_DIRS was used for vendor/odm sepolicy customization before.
94# It has been replaced by BOARD_VENDOR_SEPOLICY_DIRS (mandatory) and
95# BOARD_ODM_SEPOLICY_DIRS (optional). BOARD_SEPOLICY_DIRS is still allowed for
96# backward compatibility, which will be merged into BOARD_VENDOR_SEPOLICY_DIRS.
Bowgo Tsaiafbcf212018-02-05 17:34:52 +080097ifdef BOARD_SEPOLICY_DIRS
98BOARD_VENDOR_SEPOLICY_DIRS += $(BOARD_SEPOLICY_DIRS)
99endif
Dan Cashman4d24a772017-04-12 14:28:34 -0700100
Inseob Kim8ada8a72020-11-09 20:58:58 +0900101# Set default values for these prebuilt directories
102ifeq (,$(BOARD_REQD_MASK_POLICY))
103BOARD_REQD_MASK_POLICY := $(REQD_MASK_POLICY)
104endif
105
106ifeq (,$(BOARD_PLAT_VENDOR_POLICY))
107BOARD_PLAT_VENDOR_POLICY := $(PLAT_VENDOR_POLICY)
108endif
109
110$(foreach p,SYSTEM_EXT PRODUCT,$(foreach q,PUBLIC PRIVATE,$(eval \
111 $(if $(BOARD_$(p)_$(q)_PREBUILT_DIRS),,\
112 BOARD_$(p)_$(q)_PREBUILT_DIRS := $($(p)_$(q)_POLICY) \
113 ) \
114)))
115
dcashmancc39f632016-07-22 13:13:11 -0700116###########################################################
117# Compute policy files to be used in policy build.
118# $(1): files to include
119# $(2): directories in which to find files
120###########################################################
121
122define build_policy
Cole Faust087d5272021-09-30 15:48:34 -0700123$(strip $(foreach type, $(1), $(foreach file, $(addsuffix /$(type), $(2)), $(sort $(wildcard $(file))))))
dcashmancc39f632016-07-22 13:13:11 -0700124endef
William Roberts29d14682016-01-04 12:20:57 -0800125
Bowgo Tsaiafbcf212018-02-05 17:34:52 +0800126# Builds paths for all policy files found in BOARD_VENDOR_SEPOLICY_DIRS.
William Roberts49693f12016-01-04 12:20:57 -0800127# $(1): the set of policy name paths to build
Inseob Kim7174ffe2021-12-08 22:45:58 +0900128build_vendor_policy = $(call build_policy, $(1), $(BOARD_PLAT_VENDOR_POLICY) $(BOARD_VENDOR_SEPOLICY_DIRS))
William Roberts49693f12016-01-04 12:20:57 -0800129
Bowgo Tsaibae15172017-11-29 16:14:53 +0800130# Builds paths for all policy files found in BOARD_ODM_SEPOLICY_DIRS.
131build_odm_policy = $(call build_policy, $(1), $(BOARD_ODM_SEPOLICY_DIRS))
132
dcashman704741a2014-07-25 19:11:52 -0700133sepolicy_build_files := security_classes \
134 initial_sids \
135 access_vectors \
136 global_macros \
Nick Kralevicha17a2662014-11-05 15:30:41 -0800137 neverallow_macros \
dcashman704741a2014-07-25 19:11:52 -0700138 mls_macros \
dcashman2e00e632016-10-12 14:58:09 -0700139 mls_decl \
dcashman704741a2014-07-25 19:11:52 -0700140 mls \
141 policy_capabilities \
142 te_macros \
143 attributes \
Jeff Vander Stoepcbaa2b72015-12-22 10:39:34 -0800144 ioctl_defines \
Jeff Vander Stoepde9b5302015-06-05 15:28:55 -0700145 ioctl_macros \
dcashman704741a2014-07-25 19:11:52 -0700146 *.te \
dcashman2e00e632016-10-12 14:58:09 -0700147 roles_decl \
dcashman704741a2014-07-25 19:11:52 -0700148 roles \
149 users \
150 initial_sid_contexts \
151 fs_use \
152 genfs_contexts \
153 port_contexts
154
Chris Gross12c0b242020-09-21 15:32:16 -0700155sepolicy_compat_files := $(foreach ver, $(PLATFORM_SEPOLICY_COMPAT_VERSIONS), \
156 $(addprefix compat/$(ver)/, $(addsuffix .cil, $(ver))))
157
Tri Vo71f12392019-10-07 16:31:40 -0700158# Security classes and permissions defined outside of system/sepolicy.
159security_class_extension_files := $(call build_policy, security_classes access_vectors, \
160 $(SYSTEM_EXT_PUBLIC_POLICY) $(SYSTEM_EXT_PRIVATE_POLICY) \
161 $(PRODUCT_PUBLIC_POLICY) $(PRODUCT_PRIVATE_POLICY) \
162 $(BOARD_VENDOR_SEPOLICY_DIRS) $(BOARD_ODM_SEPOLICY_DIRS))
163
164ifneq (,$(strip $(security_class_extension_files)))
165 $(error Only platform SELinux policy may define classes and permissions: $(strip $(security_class_extension_files)))
166endif
167
Bowgo Tsaiac381252019-10-04 14:34:18 +0800168ifdef HAS_SYSTEM_EXT_SEPOLICY_DIR
169 # Checks if there are public system_ext policy files.
170 policy_files := $(call build_policy, $(sepolicy_build_files), $(SYSTEM_EXT_PUBLIC_POLICY))
171 ifneq (,$(strip $(policy_files)))
172 HAS_SYSTEM_EXT_PUBLIC_SEPOLICY := true
173 endif
174 # Checks if there are public/private system_ext policy files.
175 policy_files := $(call build_policy, $(sepolicy_build_files), $(SYSTEM_EXT_PUBLIC_POLICY) $(SYSTEM_EXT_PRIVATE_POLICY))
176 ifneq (,$(strip $(policy_files)))
177 HAS_SYSTEM_EXT_SEPOLICY := true
178 endif
179endif # ifdef HAS_SYSTEM_EXT_SEPOLICY_DIR
180
Bowgo Tsai7c4150c2019-10-04 15:36:05 +0800181ifdef HAS_PRODUCT_SEPOLICY_DIR
182 # Checks if there are public product policy files.
183 policy_files := $(call build_policy, $(sepolicy_build_files), $(PRODUCT_PUBLIC_POLICY))
184 ifneq (,$(strip $(policy_files)))
185 HAS_PRODUCT_PUBLIC_SEPOLICY := true
186 endif
187 # Checks if there are public/private product policy files.
188 policy_files := $(call build_policy, $(sepolicy_build_files), $(PRODUCT_PUBLIC_POLICY) $(PRODUCT_PRIVATE_POLICY))
189 ifneq (,$(strip $(policy_files)))
190 HAS_PRODUCT_SEPOLICY := true
191 endif
192endif # ifdef HAS_PRODUCT_SEPOLICY_DIR
193
Alex Klyubin7cda44f2017-03-21 14:28:53 -0700194# CIL files which contain workarounds for current limitation of human-readable
195# module policy language. These files are appended to the CIL files produced
196# from module language files.
197sepolicy_build_cil_workaround_files := technical_debt.cil
198
Dan Cashman1c040272016-12-15 15:28:44 -0800199my_target_arch := $(TARGET_ARCH)
200ifneq (,$(filter mips mips64,$(TARGET_ARCH)))
201 my_target_arch := mips
202endif
203
Jeff Vander Stoepd2053bd2017-03-15 13:37:35 -0700204intermediates := $(TARGET_OUT_INTERMEDIATES)/ETC/sepolicy_intermediates
205
Jeff Vander Stoep74434842017-03-13 12:22:15 -0700206with_asan := false
207ifneq (,$(filter address,$(SANITIZE_TARGET)))
208 with_asan := true
209endif
210
Pirama Arumuga Nainarce9c0c52019-06-13 15:05:15 -0700211with_native_coverage := false
212ifeq ($(NATIVE_COVERAGE),true)
213 with_native_coverage := true
214endif
Oliver Nguyenfad5f812019-12-09 16:37:59 -0800215ifeq ($(CLANG_COVERAGE),true)
216 with_native_coverage := true
217endif
Pirama Arumuga Nainarce9c0c52019-06-13 15:05:15 -0700218
Inseob Kimed59c222019-09-26 15:14:55 +0900219treble_sysprop_neverallow := true
220ifeq ($(BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW),true)
221 treble_sysprop_neverallow := false
222endif
223
Inseob Kimafc09932020-09-28 13:32:43 +0900224enforce_sysprop_owner := true
225ifeq ($(BUILD_BROKEN_ENFORCE_SYSPROP_OWNER),true)
226 enforce_sysprop_owner := false
227endif
228
Hridya Valsarajua885dd82021-04-26 16:32:17 -0700229enforce_debugfs_restriction := false
230ifeq ($(PRODUCT_SET_DEBUGFS_RESTRICTIONS),true)
231 enforce_debugfs_restriction := true
232endif
233
Inseob Kimd8de8752023-08-18 18:17:09 +0900234ifneq ($(PRODUCT_SHIPPING_API_LEVEL),)
235 product_shipping_api_level := $(PRODUCT_SHIPPING_API_LEVEL)
236else
Inseob Kimafc09932020-09-28 13:32:43 +0900237 #$(warning no product shipping level defined)
Inseob Kimd8de8752023-08-18 18:17:09 +0900238 product_shipping_api_level := 0
239endif
240
241ifneq ($(BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW),)
242 ifneq ($(call math_lt,29,$(product_shipping_api_level)),)
243 $(error BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW cannot be set on a device shipping with R or later, and this is tested by CTS.)
244 endif
245endif
246
247ifneq ($(BUILD_BROKEN_ENFORCE_SYSPROP_OWNER),)
248 ifneq ($(call math_lt,30,$(product_shipping_api_level)),)
Inseob Kimafc09932020-09-28 13:32:43 +0900249 $(error BUILD_BROKEN_ENFORCE_SYSPROP_OWNER cannot be set on a device shipping with S or later, and this is tested by CTS.)
250 endif
251endif
252
Inseob Kimd8de8752023-08-18 18:17:09 +0900253ifneq ($(BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN),)
254 ifneq ($(call math_lt,34,$(product_shipping_api_level)),)
255 $(error BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN cannot be set on a device shipping with V or later, and this is tested by CTS.)
256 endif
257endif
258
259product_shipping_api_level :=
260
Jeff Vander Stoep3ca843a2017-10-04 09:42:29 -0700261# Library extension for host-side tests
Jeff Vander Stoepe06e4c12017-10-04 18:15:44 -0700262ifeq ($(HOST_OS),darwin)
Jeff Vander Stoep3ca843a2017-10-04 09:42:29 -0700263SHAREDLIB_EXT=dylib
264else
265SHAREDLIB_EXT=so
266endif
267
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100268#################################
269
Dan Cashman4f9a6482017-04-10 12:27:18 -0700270include $(CLEAR_VARS)
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100271
Dan Cashman4f9a6482017-04-10 12:27:18 -0700272LOCAL_MODULE := selinux_policy
Bob Badour601ebb42021-02-03 23:07:40 -0800273LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
274LOCAL_LICENSE_CONDITIONS := notice unencumbered
275LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
Dan Cashman4f9a6482017-04-10 12:27:18 -0700276LOCAL_MODULE_TAGS := optional
Tri Vo1f4a28b2018-05-08 18:52:11 -0700277LOCAL_REQUIRED_MODULES += \
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100278 selinux_policy_nonsystem \
279 selinux_policy_system \
Tri Vo1f4a28b2018-05-08 18:52:11 -0700280
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100281include $(BUILD_PHONY_PACKAGE)
Tri Vo1f4a28b2018-05-08 18:52:11 -0700282
Jooyung Han749cf932019-05-30 01:05:43 +0900283# selinux_policy is a main goal and triggers lots of tests.
284# Most tests are FAKE modules, so aren'triggered on normal builds. (e.g. 'm')
285# By setting as droidcore's dependency, tests will run on normal builds.
286droidcore: selinux_policy
Tri Vo1f4a28b2018-05-08 18:52:11 -0700287
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100288include $(CLEAR_VARS)
289LOCAL_MODULE := selinux_policy_system
Bob Badour601ebb42021-02-03 23:07:40 -0800290LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
291LOCAL_LICENSE_CONDITIONS := notice unencumbered
292LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
Tri Vo1f4a28b2018-05-08 18:52:11 -0700293# These build targets are not used on non-Treble devices. However, we build these to avoid
294# divergence between Treble and non-Treble devices.
Dan Cashman4f9a6482017-04-10 12:27:18 -0700295LOCAL_REQUIRED_MODULES += \
Tri Vo937e6642019-01-15 15:16:55 -0800296 plat_mapping_file \
Tri Vo61178552019-10-10 16:29:40 -0700297 $(addprefix plat_,$(addsuffix .cil,$(PLATFORM_SEPOLICY_COMPAT_VERSIONS))) \
Jeff Vander Stoep564e2922019-05-02 13:48:44 -0700298 $(addsuffix .compat.cil,$(PLATFORM_SEPOLICY_COMPAT_VERSIONS)) \
Dan Cashman4f9a6482017-04-10 12:27:18 -0700299 plat_sepolicy.cil \
Dan Cashman4f9a6482017-04-10 12:27:18 -0700300 secilc \
Dan Cashman91d398d2017-09-26 12:58:29 -0700301
Inseob Kim8ada8a72020-11-09 20:58:58 +0900302ifneq ($(PRODUCT_PRECOMPILED_SEPOLICY),false)
303LOCAL_REQUIRED_MODULES += plat_sepolicy_and_mapping.sha256
304endif
305
Jeff Vander Stoep7a68c5a2017-06-08 13:24:15 -0700306LOCAL_REQUIRED_MODULES += \
Bowgo Tsai741a70a2018-02-05 17:41:02 +0800307 build_sepolicy \
Jeff Vander Stoep13fb5ed2017-08-22 13:29:53 -0700308 plat_file_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900309 plat_file_contexts_test \
Janis Danisevskisc40681f2020-07-25 13:02:29 -0700310 plat_keystore2_key_contexts \
Jeff Vander Stoep13fb5ed2017-08-22 13:29:53 -0700311 plat_mac_permissions.xml \
312 plat_property_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900313 plat_property_contexts_test \
Jeff Vander Stoep13fb5ed2017-08-22 13:29:53 -0700314 plat_seapp_contexts \
315 plat_service_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900316 plat_service_contexts_test \
Jeff Vander Stoep13fb5ed2017-08-22 13:29:53 -0700317 plat_hwservice_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900318 plat_hwservice_contexts_test \
Pawan0ecf99d2022-09-12 23:20:53 +0000319 fuzzer_bindings_test \
Yi-Yo Chiang2c189652021-11-08 19:30:04 +0800320 plat_bug_map \
Dan Cashman91d398d2017-09-26 12:58:29 -0700321 searchpolicy \
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100322
Dan Cashman91d398d2017-09-26 12:58:29 -0700323ifneq ($(with_asan),true)
Jeff Vander Stoep3d4965b2018-02-13 20:29:55 -0800324ifneq ($(SELINUX_IGNORE_NEVERALLOWS),true)
Dan Cashman91d398d2017-09-26 12:58:29 -0700325LOCAL_REQUIRED_MODULES += \
Inseob Kim16d3be32022-01-07 09:15:27 +0900326 sepolicy_compat_test \
Dan Cashman91d398d2017-09-26 12:58:29 -0700327
Inseob Kim61257ca2022-02-25 11:26:16 +0900328# HACK: sepolicy_test is implemented as genrule
329# genrule modules aren't installable, so LOCAL_REQUIRED_MODULES doesn't work.
330# Instead, use LOCAL_ADDITIONAL_DEPENDENCIES with intermediate output
331LOCAL_ADDITIONAL_DEPENDENCIES += $(call intermediates-dir-for,ETC,sepolicy_test)/sepolicy_test
332
Steven Moreland1cb64c42019-09-20 11:16:29 -0700333LOCAL_REQUIRED_MODULES += \
334 $(addprefix treble_sepolicy_tests_,$(PLATFORM_SEPOLICY_COMPAT_VERSIONS)) \
335
Steven Moreland1cb64c42019-09-20 11:16:29 -0700336endif # SELINUX_IGNORE_NEVERALLOWS
337endif # with_asan
Dan Cashman91d398d2017-09-26 12:58:29 -0700338
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100339ifneq ($(PLATFORM_SEPOLICY_VERSION),$(TOT_SEPOLICY_VERSION))
340LOCAL_REQUIRED_MODULES += \
Inseob Kimd5816612021-09-15 03:01:05 +0000341 sepolicy_freeze_test
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100342endif # ($(PLATFORM_SEPOLICY_VERSION),$(TOT_SEPOLICY_VERSION))
343
344include $(BUILD_PHONY_PACKAGE)
345
346#################################
347
348include $(CLEAR_VARS)
349
Justin Yun0f722692020-10-07 18:28:47 +0900350LOCAL_MODULE := selinux_policy_system_ext
Bob Badour601ebb42021-02-03 23:07:40 -0800351LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
352LOCAL_LICENSE_CONDITIONS := notice unencumbered
353LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
Justin Yun0f722692020-10-07 18:28:47 +0900354# Include precompiled policy, unless told otherwise.
355ifneq ($(PRODUCT_PRECOMPILED_SEPOLICY),false)
Inseob Kima76c0c82021-04-29 19:45:50 +0900356ifdef HAS_SYSTEM_EXT_SEPOLICY
Justin Yun0f722692020-10-07 18:28:47 +0900357LOCAL_REQUIRED_MODULES += system_ext_sepolicy_and_mapping.sha256
358endif
Inseob Kima76c0c82021-04-29 19:45:50 +0900359endif
Justin Yun0f722692020-10-07 18:28:47 +0900360
361ifdef HAS_SYSTEM_EXT_SEPOLICY
362LOCAL_REQUIRED_MODULES += system_ext_sepolicy.cil
363endif
364
365ifdef HAS_SYSTEM_EXT_PUBLIC_SEPOLICY
366LOCAL_REQUIRED_MODULES += \
367 system_ext_mapping_file
368
369system_ext_compat_files := $(call build_policy, $(sepolicy_compat_files), $(SYSTEM_EXT_PRIVATE_POLICY))
370
371LOCAL_REQUIRED_MODULES += $(addprefix system_ext_, $(notdir $(system_ext_compat_files)))
372
373endif
374
375ifdef HAS_SYSTEM_EXT_SEPOLICY_DIR
376LOCAL_REQUIRED_MODULES += \
377 system_ext_file_contexts \
378 system_ext_file_contexts_test \
379 system_ext_hwservice_contexts \
380 system_ext_hwservice_contexts_test \
381 system_ext_property_contexts \
382 system_ext_property_contexts_test \
383 system_ext_seapp_contexts \
384 system_ext_service_contexts \
385 system_ext_service_contexts_test \
386 system_ext_mac_permissions.xml \
Yi-Yo Chiang2c189652021-11-08 19:30:04 +0800387 system_ext_bug_map \
Yi-Yo Chiang8be93c02021-04-13 02:49:29 +0800388 $(addprefix system_ext_,$(addsuffix .compat.cil,$(PLATFORM_SEPOLICY_COMPAT_VERSIONS))) \
Justin Yun0f722692020-10-07 18:28:47 +0900389
390endif
391
392include $(BUILD_PHONY_PACKAGE)
393
394#################################
395
396include $(CLEAR_VARS)
397
398LOCAL_MODULE := selinux_policy_product
Bob Badour601ebb42021-02-03 23:07:40 -0800399LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
400LOCAL_LICENSE_CONDITIONS := notice unencumbered
401LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
Justin Yun0f722692020-10-07 18:28:47 +0900402# Include precompiled policy, unless told otherwise.
403ifneq ($(PRODUCT_PRECOMPILED_SEPOLICY),false)
Inseob Kima76c0c82021-04-29 19:45:50 +0900404ifdef HAS_PRODUCT_SEPOLICY
Justin Yun0f722692020-10-07 18:28:47 +0900405LOCAL_REQUIRED_MODULES += product_sepolicy_and_mapping.sha256
406endif
Inseob Kima76c0c82021-04-29 19:45:50 +0900407endif
Justin Yun0f722692020-10-07 18:28:47 +0900408
409ifdef HAS_PRODUCT_SEPOLICY
410LOCAL_REQUIRED_MODULES += product_sepolicy.cil
411endif
412
413ifdef HAS_PRODUCT_PUBLIC_SEPOLICY
414LOCAL_REQUIRED_MODULES += \
415 product_mapping_file
416
417product_compat_files := $(call build_policy, $(sepolicy_compat_files), $(PRODUCT_PRIVATE_POLICY))
418
419LOCAL_REQUIRED_MODULES += $(addprefix product_, $(notdir $(product_compat_files)))
420
421endif
422
423ifdef HAS_PRODUCT_SEPOLICY_DIR
424LOCAL_REQUIRED_MODULES += \
425 product_file_contexts \
426 product_file_contexts_test \
427 product_hwservice_contexts \
428 product_hwservice_contexts_test \
429 product_property_contexts \
430 product_property_contexts_test \
431 product_seapp_contexts \
432 product_service_contexts \
433 product_service_contexts_test \
434 product_mac_permissions.xml \
435
436endif
437
438include $(BUILD_PHONY_PACKAGE)
439
440#################################
441
442include $(CLEAR_VARS)
443
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100444LOCAL_MODULE := selinux_policy_nonsystem
Bob Badour601ebb42021-02-03 23:07:40 -0800445LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
446LOCAL_LICENSE_CONDITIONS := notice unencumbered
447LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100448# Include precompiled policy, unless told otherwise.
449ifneq ($(PRODUCT_PRECOMPILED_SEPOLICY),false)
450LOCAL_REQUIRED_MODULES += \
451 precompiled_sepolicy \
Inseob Kima76c0c82021-04-29 19:45:50 +0900452 precompiled_sepolicy.plat_sepolicy_and_mapping.sha256
453
454ifdef HAS_SYSTEM_EXT_SEPOLICY
455LOCAL_REQUIRED_MODULES += precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256
456endif
457
458ifdef HAS_PRODUCT_SEPOLICY
459LOCAL_REQUIRED_MODULES += precompiled_sepolicy.product_sepolicy_and_mapping.sha256
460endif
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100461
462endif # ($(PRODUCT_PRECOMPILED_SEPOLICY),false)
463
464
465# These build targets are not used on non-Treble devices. However, we build these to avoid
466# divergence between Treble and non-Treble devices.
467LOCAL_REQUIRED_MODULES += \
468 plat_pub_versioned.cil \
469 vendor_sepolicy.cil \
470 plat_sepolicy_vers.txt \
471
472LOCAL_REQUIRED_MODULES += \
473 vendor_file_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900474 vendor_file_contexts_test \
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100475 vendor_mac_permissions.xml \
476 vendor_property_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900477 vendor_property_contexts_test \
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100478 vendor_seapp_contexts \
linpeter87c72612020-06-12 16:25:41 +0800479 vendor_service_contexts \
Inseob Kimb5e23532022-02-16 02:26:11 +0000480 vendor_service_contexts_test \
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100481 vendor_hwservice_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900482 vendor_hwservice_contexts_test \
Yi-Yo Chiang2c189652021-11-08 19:30:04 +0800483 vendor_bug_map \
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100484 vndservice_contexts \
Inseob Kimc7596c42022-02-25 11:45:41 +0900485 vndservice_contexts_test \
Anton Hansson8cfe1e62018-07-02 14:31:29 +0100486
Bowgo Tsai45457e32017-11-27 11:41:33 +0800487ifdef BOARD_ODM_SEPOLICY_DIRS
Bowgo Tsaibae15172017-11-29 16:14:53 +0800488LOCAL_REQUIRED_MODULES += \
489 odm_sepolicy.cil \
Bowgo Tsaiecf656b2017-11-29 16:15:28 +0800490 odm_file_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900491 odm_file_contexts_test \
Bowgo Tsai1f717b12017-11-29 16:15:55 +0800492 odm_seapp_contexts \
Bowgo Tsaiad6231f2017-11-29 16:16:26 +0800493 odm_property_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900494 odm_property_contexts_test \
Inseob Kim3bb20332022-10-24 20:41:45 +0900495 odm_service_contexts \
496 odm_service_contexts_test \
Bowgo Tsaiaf7d85f2017-11-29 16:06:15 +0800497 odm_hwservice_contexts \
Inseob Kimb554e592019-04-15 20:10:46 +0900498 odm_hwservice_contexts_test \
Bowgo Tsaiaf7d85f2017-11-29 16:06:15 +0800499 odm_mac_permissions.xml
Bowgo Tsai45457e32017-11-27 11:41:33 +0800500endif
Tri Vo75887dd2018-12-14 14:30:56 -0800501
Justin Yun0f722692020-10-07 18:28:47 +0900502LOCAL_REQUIRED_MODULES += selinux_policy_system_ext
503LOCAL_REQUIRED_MODULES += selinux_policy_product
Tri Vo4eb68152019-01-23 09:47:05 -0800504
Bowgo Tsaie7636672019-04-19 22:03:33 +0800505# Builds an addtional userdebug sepolicy into the debug ramdisk.
506LOCAL_REQUIRED_MODULES += \
507 userdebug_plat_sepolicy.cil \
508
Dan Cashman4f9a6482017-04-10 12:27:18 -0700509include $(BUILD_PHONY_PACKAGE)
510
Ying Wang02fb5f32012-01-17 17:51:09 -0800511##################################
Inseob Kim3ac62fe2021-12-16 19:00:03 +0900512# Policy files are now built with Android.bp. Grab them from intermediate.
513# See Android.bp for details of policy files.
Inseob Kima49e7242021-03-22 10:26:13 +0900514#
Inseob Kima49e7242021-03-22 10:26:13 +0900515built_plat_cil := $(call intermediates-dir-for,ETC,plat_sepolicy.cil)/plat_sepolicy.cil
Inseob Kima49e7242021-03-22 10:26:13 +0900516
517ifdef HAS_SYSTEM_EXT_SEPOLICY
518built_system_ext_cil := $(call intermediates-dir-for,ETC,system_ext_sepolicy.cil)/system_ext_sepolicy.cil
Inseob Kima49e7242021-03-22 10:26:13 +0900519endif # ifdef HAS_SYSTEM_EXT_SEPOLICY
520
521ifdef HAS_PRODUCT_SEPOLICY
522built_product_cil := $(call intermediates-dir-for,ETC,product_sepolicy.cil)/product_sepolicy.cil
Inseob Kima49e7242021-03-22 10:26:13 +0900523endif # ifdef HAS_PRODUCT_SEPOLICY
524
Inseob Kim3d5f9252021-12-21 20:42:35 +0900525built_sepolicy := $(call intermediates-dir-for,ETC,precompiled_sepolicy)/precompiled_sepolicy
Inseob Kim893eef22021-12-29 13:53:38 +0900526built_sepolicy_neverallows := $(call intermediates-dir-for,ETC,sepolicy_neverallows)/sepolicy_neverallows
527built_sepolicy_neverallows += $(call intermediates-dir-for,ETC,sepolicy_neverallows_vendor)/sepolicy_neverallows_vendor
Stephen Smalley01a58af2012-10-02 12:46:37 -0400528
dcashman704741a2014-07-25 19:11:52 -0700529##################################
dcashmand225b692016-12-12 09:29:04 -0800530# TODO - remove this. Keep around until we get the filesystem creation stuff taken care of.
531#
William Robertsb8769932015-06-29 16:31:23 -0700532include $(CLEAR_VARS)
533
Richard Hainesc2d01912015-08-06 17:43:52 +0100534LOCAL_MODULE := file_contexts.bin
Bob Badour601ebb42021-02-03 23:07:40 -0800535LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
536LOCAL_LICENSE_CONDITIONS := notice unencumbered
537LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
Ying Wang02fb5f32012-01-17 17:51:09 -0800538LOCAL_MODULE_CLASS := ETC
539LOCAL_MODULE_TAGS := optional
540LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
541
Stephen Smalley5b340be2012-03-06 11:12:41 -0500542include $(BUILD_SYSTEM)/base_rules.mk
Ying Wang02fb5f32012-01-17 17:51:09 -0800543
William Roberts49693f12016-01-04 12:20:57 -0800544# The file_contexts.bin is built in the following way:
545# 1. Collect all file_contexts files in THIS repository and process them with
546# m4 into a tmp file called file_contexts.local.tmp.
Jooyung Han0606ce72020-09-23 19:16:10 +0900547# 2. Collect all file_contexts files from LOCAL_FILE_CONTEXTS of installed
548# modules with m4 with a tmp file called file_contexts.modules.tmp.
549# 3. Collect all device specific file_contexts files and process them with m4
William Roberts49693f12016-01-04 12:20:57 -0800550# into a tmp file called file_contexts.device.tmp.
Jooyung Han0606ce72020-09-23 19:16:10 +0900551# 4. Run checkfc -e (allow no device fc entries ie empty) and fc_sort on
William Roberts49693f12016-01-04 12:20:57 -0800552# file_contexts.device.tmp and output to file_contexts.device.sorted.tmp.
Jooyung Han0606ce72020-09-23 19:16:10 +0900553# 5. Concatenate file_contexts.local.tmp, file_contexts.modules.tmp and
Inseob Kim8ada8a72020-11-09 20:58:58 +0900554# file_contexts.device.sorted.tmp into file_contexts.concat.tmp.
Jooyung Han0606ce72020-09-23 19:16:10 +0900555# 6. Run checkfc and sefcontext_compile on file_contexts.concat.tmp to produce
William Roberts49693f12016-01-04 12:20:57 -0800556# file_contexts.bin.
557#
558# Note: That a newline file is placed between each file_context file found to
559# ensure a proper build when an fc file is missing an ending newline.
William Roberts29d14682016-01-04 12:20:57 -0800560
Dan Cashman1b0a71f2017-05-08 14:26:52 -0700561local_fc_files := $(call build_policy, file_contexts, $(PLAT_PRIVATE_POLICY))
562
Bowgo Tsaiac381252019-10-04 14:34:18 +0800563ifdef HAS_SYSTEM_EXT_SEPOLICY_DIR
Bowgo Tsai86a048d2019-09-09 22:04:06 +0800564local_fc_files += $(call build_policy, file_contexts, $(SYSTEM_EXT_PRIVATE_POLICY))
565endif
566
Bowgo Tsai7c4150c2019-10-04 15:36:05 +0800567ifdef HAS_PRODUCT_SEPOLICY_DIR
Tri Vo75887dd2018-12-14 14:30:56 -0800568local_fc_files += $(call build_policy, file_contexts, $(PRODUCT_PRIVATE_POLICY))
569endif
570
William Roberts49693f12016-01-04 12:20:57 -0800571ifneq ($(filter address,$(SANITIZE_TARGET)),)
Mark Salyzyn9b398f32018-06-13 08:02:29 -0700572 local_fc_files += $(wildcard $(addsuffix /file_contexts_asan, $(PLAT_PRIVATE_POLICY)))
573endif
574ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
575 local_fc_files += $(wildcard $(addsuffix /file_contexts_overlayfs, $(PLAT_PRIVATE_POLICY)))
William Roberts49693f12016-01-04 12:20:57 -0800576endif
Jooyung Hana9324742019-11-20 17:54:34 +0900577
William Roberts49693f12016-01-04 12:20:57 -0800578file_contexts.local.tmp := $(intermediates)/file_contexts.local.tmp
Jooyung Han0606ce72020-09-23 19:16:10 +0900579$(call merge-fc-files,$(local_fc_files),$(file_contexts.local.tmp))
580
581# The rule for file_contexts.modules.tmp is defined in build/make/core/Makefile.
582# it gathers LOCAL_FILE_CONTEXTS from product_MODULES
583file_contexts.modules.tmp := $(intermediates)/file_contexts.modules.tmp
William Roberts49693f12016-01-04 12:20:57 -0800584
Bowgo Tsaiafbcf212018-02-05 17:34:52 +0800585device_fc_files := $(call build_vendor_policy, file_contexts)
Bowgo Tsaibae15172017-11-29 16:14:53 +0800586
587ifdef BOARD_ODM_SEPOLICY_DIRS
588device_fc_files += $(call build_odm_policy, file_contexts)
589endif
590
William Roberts49693f12016-01-04 12:20:57 -0800591file_contexts.device.tmp := $(intermediates)/file_contexts.device.tmp
592$(file_contexts.device.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
Dan Willemsen3c3e59b2019-06-19 10:52:50 -0700593$(file_contexts.device.tmp): PRIVATE_DEVICE_FC_FILES := $(device_fc_files)
594$(file_contexts.device.tmp): $(device_fc_files) $(M4)
William Roberts49693f12016-01-04 12:20:57 -0800595 @mkdir -p $(dir $@)
Dan Willemsen3c3e59b2019-06-19 10:52:50 -0700596 $(hide) $(M4) --fatal-warnings -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_DEVICE_FC_FILES) > $@
William Roberts49693f12016-01-04 12:20:57 -0800597
598file_contexts.device.sorted.tmp := $(intermediates)/file_contexts.device.sorted.tmp
599$(file_contexts.device.sorted.tmp): PRIVATE_SEPOLICY := $(built_sepolicy)
Bowgo Tsaiafbcf212018-02-05 17:34:52 +0800600$(file_contexts.device.sorted.tmp): $(file_contexts.device.tmp) $(built_sepolicy) \
601 $(HOST_OUT_EXECUTABLES)/fc_sort $(HOST_OUT_EXECUTABLES)/checkfc
William Roberts49693f12016-01-04 12:20:57 -0800602 @mkdir -p $(dir $@)
dcashman07791552016-12-07 11:27:47 -0800603 $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -e $(PRIVATE_SEPOLICY) $<
Jeff Vander Stoep1ca7a4c2019-04-10 16:53:17 -0700604 $(hide) $(HOST_OUT_EXECUTABLES)/fc_sort -i $< -o $@
William Roberts49693f12016-01-04 12:20:57 -0800605
606file_contexts.concat.tmp := $(intermediates)/file_contexts.concat.tmp
Jooyung Han0606ce72020-09-23 19:16:10 +0900607$(call merge-fc-files,\
608 $(file_contexts.local.tmp) $(file_contexts.modules.tmp) $(file_contexts.device.sorted.tmp),\
609 $(file_contexts.concat.tmp))
Stephen Smalley5b340be2012-03-06 11:12:41 -0500610
William Roberts3746a0a2015-09-25 10:18:44 -0700611$(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy)
William Roberts49693f12016-01-04 12:20:57 -0800612$(LOCAL_BUILT_MODULE): $(file_contexts.concat.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/sefcontext_compile $(HOST_OUT_EXECUTABLES)/checkfc
Richard Hainesc2d01912015-08-06 17:43:52 +0100613 @mkdir -p $(dir $@)
dcashman07791552016-12-07 11:27:47 -0800614 $(hide) $(HOST_OUT_EXECUTABLES)/checkfc $(PRIVATE_SEPOLICY) $<
Richard Hainesc2d01912015-08-06 17:43:52 +0100615 $(hide) $(HOST_OUT_EXECUTABLES)/sefcontext_compile -o $@ $<
616
Robert Craig8b7545b2014-03-20 09:35:08 -0400617built_fc := $(LOCAL_BUILT_MODULE)
William Roberts49693f12016-01-04 12:20:57 -0800618local_fc_files :=
619local_fcfiles_with_nl :=
620device_fc_files :=
621device_fcfiles_with_nl :=
622file_contexts.concat.tmp :=
623file_contexts.device.sorted.tmp :=
624file_contexts.device.tmp :=
625file_contexts.local.tmp :=
Jooyung Han0606ce72020-09-23 19:16:10 +0900626file_contexts.modules.tmp :=
William Roberts171a0622012-08-16 10:55:05 -0700627
Ying Wang02fb5f32012-01-17 17:51:09 -0800628##################################
Bowgo Tsaiaf7d85f2017-11-29 16:06:15 +0800629
Inseob Kimb554e592019-04-15 20:10:46 +0900630all_fc_files := $(TARGET_OUT)/etc/selinux/plat_file_contexts
631all_fc_files += $(TARGET_OUT_VENDOR)/etc/selinux/vendor_file_contexts
Bowgo Tsaiac381252019-10-04 14:34:18 +0800632ifdef HAS_SYSTEM_EXT_SEPOLICY_DIR
Bowgo Tsai86a048d2019-09-09 22:04:06 +0800633all_fc_files += $(TARGET_OUT_SYSTEM_EXT)/etc/selinux/system_ext_file_contexts
634endif
Bowgo Tsai7c4150c2019-10-04 15:36:05 +0800635ifdef HAS_PRODUCT_SEPOLICY_DIR
Inseob Kimb554e592019-04-15 20:10:46 +0900636all_fc_files += $(TARGET_OUT_PRODUCT)/etc/selinux/product_file_contexts
Tri Vo3361ec42018-12-18 19:51:19 -0800637endif
Bowgo Tsaibae15172017-11-29 16:14:53 +0800638ifdef BOARD_ODM_SEPOLICY_DIRS
Inseob Kimb554e592019-04-15 20:10:46 +0900639all_fc_files += $(TARGET_OUT_ODM)/etc/selinux/odm_file_contexts
Bowgo Tsaibae15172017-11-29 16:14:53 +0800640endif
Bowgo Tsaiafbcf212018-02-05 17:34:52 +0800641all_fc_args := $(foreach file, $(all_fc_files), -f $(file))
642
rpcraigb19665c2012-07-30 09:33:03 -0400643##################################
Tri Vo14069262018-01-31 16:22:35 -0800644# Tests for Treble compatibility of current platform policy and vendor policy of
645# given release version.
Inseob Kim4d90b7e2021-09-27 13:43:01 +0000646
647built_plat_sepolicy := $(call intermediates-dir-for,ETC,base_plat_sepolicy)/base_plat_sepolicy
648built_system_ext_sepolicy := $(call intermediates-dir-for,ETC,base_system_ext_sepolicy)/base_system_ext_sepolicy
649built_product_sepolicy := $(call intermediates-dir-for,ETC,base_product_sepolicy)/base_product_sepolicy
650
651base_plat_pub_policy.cil := $(call intermediates-dir-for,ETC,base_plat_pub_policy.cil)/base_plat_pub_policy.cil
652base_system_ext_pub_polcy.cil := $(call intermediates-dir-for,ETC,base_system_ext_pub_polcy.cil)/base_system_ext_pub_polcy.cil
653base_product_pub_policy.cil := $(call intermediates-dir-for,ETC,base_product_pub_policy.cil)/base_product_pub_policy.cil
654
Inseob Kimed2dc8c2021-12-10 18:34:41 +0900655$(foreach v,$(PLATFORM_SEPOLICY_COMPAT_VERSIONS), \
656 $(eval version_under_treble_tests := $(v)) \
657 $(eval include $(LOCAL_PATH)/treble_sepolicy_tests_for_release.mk) \
658)
Jae Shin1fa96342018-07-11 18:30:44 +0900659
Inseob Kim4d90b7e2021-09-27 13:43:01 +0000660built_plat_sepolicy :=
661built_system_ext_sepolicy :=
662built_product_sepolicy :=
663base_plat_pub_policy.cil :=
664base_system_ext_pub_polcy.cil :=
665base_product_pub_policy.cil :=
Inseob Kimb554e592019-04-15 20:10:46 +0900666all_fc_files :=
667all_fc_args :=
Dan Cashman91d398d2017-09-26 12:58:29 -0700668
Jeff Vander Stoep1fc06822017-05-31 15:36:07 -0700669#################################
Tri Vo81198bb2018-03-15 11:38:08 -0700670
rpcraig47cd3962012-10-17 21:09:52 -0400671
Bowgo Tsaiafbcf212018-02-05 17:34:52 +0800672build_vendor_policy :=
Bowgo Tsaibae15172017-11-29 16:14:53 +0800673build_odm_policy :=
Dan Cashman1c040272016-12-15 15:28:44 -0800674build_policy :=
Alex Klyubin8f7173b2017-02-25 14:47:53 -0800675built_plat_cil :=
Bowgo Tsai948934b2019-08-29 17:12:11 +0800676built_system_ext_cil :=
677built_product_cil :=
Dan Cashman1c040272016-12-15 15:28:44 -0800678built_sepolicy :=
Joel Galenson5988b562018-01-03 16:53:24 -0800679built_sepolicy_neverallows :=
Sandeep Patila058b562016-12-27 15:10:48 -0800680built_plat_svc :=
Bowgo Tsaiafbcf212018-02-05 17:34:52 +0800681built_vendor_svc :=
Inseob Kimed59c222019-09-26 15:14:55 +0900682treble_sysprop_neverallow :=
Inseob Kimafc09932020-09-28 13:32:43 +0900683enforce_sysprop_owner :=
Hridya Valsarajua885dd82021-04-26 16:32:17 -0700684enforce_debugfs_restriction :=
Dan Cashman1c040272016-12-15 15:28:44 -0800685my_target_arch :=
Dan Cashman1c040272016-12-15 15:28:44 -0800686sepolicy_build_files :=
Alex Klyubin7cda44f2017-03-21 14:28:53 -0700687sepolicy_build_cil_workaround_files :=
Jeff Vander Stoep74434842017-03-13 12:22:15 -0700688with_asan :=
Alice Chucdfb06f2012-11-01 11:33:04 -0700689
690include $(call all-makefiles-under,$(LOCAL_PATH))