1obj-y += avc.o 2obj-y += hooks.o 3obj-y += flask_op.o 4 5subdir-y += ss 6 7CFLAGS += -I./include 8 9AWK = awk 10 11CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ 12 else if [ -x /bin/bash ]; then echo /bin/bash; \ 13 else echo sh; fi ; fi) 14 15FLASK_H_DEPEND = policy/security_classes policy/initial_sids 16AV_H_DEPEND = policy/access_vectors 17 18FLASK_H_FILES = include/flask.h include/class_to_string.h include/initial_sid_to_string.h 19AV_H_FILES = include/av_perm_to_string.h include/av_permissions.h 20ALL_H_FILES = $(FLASK_H_FILES) $(AV_H_FILES) 21 22$(obj-y) ss/built_in.o: $(ALL_H_FILES) 23 24$(FLASK_H_FILES): $(FLASK_H_DEPEND) 25 $(CONFIG_SHELL) policy/mkflask.sh $(AWK) include $(FLASK_H_DEPEND) 26 27$(AV_H_FILES): $(AV_H_DEPEND) 28 $(CONFIG_SHELL) policy/mkaccess_vector.sh $(AWK) $(AV_H_DEPEND) 29 30obj-$(CONFIG_XSM_POLICY) += policy.o 31 32FLASK_BUILD_DIR := $(CURDIR) 33POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) 34 35policy.bin: FORCE 36 $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common -C $(XEN_ROOT)/tools/flask/policy FLASK_BUILD_DIR=$(FLASK_BUILD_DIR) 37 cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@ 38 39policy.c: policy.bin gen-policy.py 40 $(PYTHON) gen-policy.py < $< > $@ 41 42.PHONY: clean 43clean:: 44 rm -f $(ALL_H_FILES) *.o $(DEPS_RM) policy.* $(POLICY_SRC) 45