diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-08-31 11:37:20 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-08-31 11:37:20 +0100 |
commit | d89af6295418a0aeccfbfffd840e2cc097744bc1 (patch) | |
tree | 3cc30a6482761f83c658547e5e4c64a2acf4cdf3 /tools/python/Makefile | |
parent | b1ed04146414f7bbef7e76289b6d4b0bf79a3203 (diff) | |
download | xen-d89af6295418a0aeccfbfffd840e2cc097744bc1.tar.gz xen-d89af6295418a0aeccfbfffd840e2cc097744bc1.tar.bz2 xen-d89af6295418a0aeccfbfffd840e2cc097744bc1.zip |
Xen Security Modules: Tools.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
Diffstat (limited to 'tools/python/Makefile')
-rw-r--r-- | tools/python/Makefile | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/tools/python/Makefile b/tools/python/Makefile index c4eda62b42..832808237a 100644 --- a/tools/python/Makefile +++ b/tools/python/Makefile @@ -1,6 +1,14 @@ XEN_ROOT = ../.. include $(XEN_ROOT)/tools/Rules.mk +XEN_SECURITY_MODULE = dummy +ifeq ($(FLASK_ENABLE),y) +XEN_SECURITY_MODULE = flask +endif +ifeq ($(ACM_SECURITY),y) +XEN_SECURITY_MODULE = acm +endif + .PHONY: all all: build @@ -16,9 +24,9 @@ NLSDIR = /usr/share/locale .PHONY: build buildpy buildpy: - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build + CC="$(CC)" CFLAGS="$(CFLAGS)" XEN_SECURITY_MODULE="$(XEN_SECURITY_MODULE)" python setup.py build -build: buildpy refresh-pot refresh-po $(CATALOGS) +build: xsm.py buildpy refresh-pot refresh-po $(CATALOGS) # NB we take care to only update the .pot file it strings have # actually changed. This is complicated by the embedded date @@ -53,6 +61,18 @@ refresh-po: $(POTFILE) %.mo: %.po $(MSGFMT) -c -o $@ $< +xsm.py: + @(set -e; \ + echo "XEN_SECURITY_MODULE = \""$(XEN_SECURITY_MODULE)"\""; \ + echo "from xsm_core import *"; \ + echo ""; \ + echo "import xen.util.xsm."$(XEN_SECURITY_MODULE)"."$(XEN_SECURITY_MODULE)" as xsm_module"; \ + echo ""; \ + echo "xsm_init(xsm_module)"; \ + echo "from xen.util.xsm."$(XEN_SECURITY_MODULE)"."$(XEN_SECURITY_MODULE)" import *"; \ + echo "del xsm_module"; \ + echo "") >xen/util/xsm/$@ + .PHONY: install ifndef XEN_PYTHON_NATIVE_INSTALL install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()") @@ -84,4 +104,4 @@ test: .PHONY: clean clean: - rm -rf build *.pyc *.pyo *.o *.a *~ $(CATALOGS) + rm -rf build *.pyc *.pyo *.o *.a *~ $(CATALOGS) xen/util/xsm/xsm.py |