mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Xen Security Modules: Tools.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
This commit is contained in:
1 parent
b1ed041464
commit
d89af62954
40 files changed
+2053
-61
No files matched your search
+23
-3
@@ -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
|
||||