1# SPDX-License-Identifier: GPL-2.0 2tomoyo-objs := audit.o common.o condition.o domain.o environ.o file.o gc.o group.o memory.o mount.o network.o proxy.o realpath.o securityfs_if.o util.o 3obj-y += init.o load_policy.o 4ifdef CONFIG_SECURITY_TOMOYO_LKM 5obj-m += tomoyo.o 6else 7obj-y += tomoyo.o 8endif 9 10targets += builtin-policy.h 11 12quiet_cmd_policy = POLICY $@ 13 cmd_policy = { \ 14 $(foreach x, profile exception_policy domain_policy manager stat, \ 15 printf 'static char tomoyo_builtin_$x[] __initdata =\n'; \ 16 sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' -e 's/\(.*\)/\t"\1\\n"/' -- $(firstword $(filter %/$x.conf %/$x.conf.default, $^) /dev/null); \ 17 printf '\t"";\n';) \ 18 } > $@ 19 20$(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(src)/policy/*.conf.default) FORCE 21 $(call if_changed,policy) 22 23ifndef CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING 24$(obj)/common.o: $(obj)/builtin-policy.h 25endif 26