aboutsummaryrefslogtreecommitdiffstats
path: root/xen/xsm/flask/Makefile
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-01-10 17:30:47 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-01-10 17:30:47 +0000
commitd05b3ddfdc8bb4c51c9764a6afaf7a3cce4a15fd (patch)
tree5de7abcce26a2b07ab1ce61e4ea903ac4345ace0 /xen/xsm/flask/Makefile
parent58f88f9eb2f2b16f1870c592c3310593039096e8 (diff)
downloadxen-d05b3ddfdc8bb4c51c9764a6afaf7a3cce4a15fd.tar.gz
xen-d05b3ddfdc8bb4c51c9764a6afaf7a3cce4a15fd.tar.bz2
xen-d05b3ddfdc8bb4c51c9764a6afaf7a3cce4a15fd.zip
flask: move policy headers into hypervisor
Rather than keeping around headers that are autogenerated in order to avoid adding build dependencies from xen/ to files in tools/, move the relevant parts of the FLASK policy into the hypervisor tree and generate the headers as part of the hypervisor's build. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/xsm/flask/Makefile')
-rw-r--r--xen/xsm/flask/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index 92fb410123..1256512171 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -5,3 +5,28 @@ obj-y += flask_op.o
subdir-y += ss
CFLAGS += -I./include
+
+AWK = awk
+
+CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+ else if [ -x /bin/bash ]; then echo /bin/bash; \
+ else echo sh; fi ; fi)
+
+FLASK_H_DEPEND = policy/security_classes policy/initial_sids
+AV_H_DEPEND = policy/access_vectors
+
+FLASK_H_FILES = include/flask.h include/class_to_string.h include/initial_sid_to_string.h
+AV_H_FILES = include/av_perm_to_string.h include/av_permissions.h
+ALL_H_FILES = $(FLASK_H_FILES) $(AV_H_FILES)
+
+$(obj-y) ss/built_in.o: $(ALL_H_FILES)
+
+$(FLASK_H_FILES): $(FLASK_H_DEPEND)
+ $(CONFIG_SHELL) policy/mkflask.sh $(AWK) $(FLASK_H_DEPEND)
+
+$(AV_H_FILES): $(AV_H_DEPEND)
+ $(CONFIG_SHELL) policy/mkaccess_vector.sh $(AWK) $(AV_H_DEPEND)
+
+.PHONY: clean
+clean::
+ rm -f $(ALL_H_FILES) *.o $(DEPS)