ia64/xen-unstable

view tools/security/Makefile @ 19731:01748ccc4da3

Intel VT-d: fix Stoakley boot issue with iommu=1

Signed-off-by: Weidong Han <Weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 09:25:50 2009 +0100 (2009-06-05)
parents 887337323bd8
children
line source
1 XEN_ROOT = ../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 CFLAGS += -Werror
5 CFLAGS += -fno-strict-aliasing
6 CFLAGS += -I. $(CFLAGS_libxenctrl)
8 CPPFLAGS += -MMD -MF .$*.d
9 PROG_DEPS = .*.d
11 XML2VERSION = $(shell xml2-config --version )
12 CFLAGS += $(shell xml2-config --cflags )
13 CFLAGS += $(shell if [[ $(XML2VERSION) < 2.6.20 ]]; then echo ""; else echo "-DVALIDATE_SCHEMA"; fi )
14 LDFLAGS += $(shell xml2-config --libs ) # if this does not work, try -L/usr/lib -lxml2 -lz -lpthread -lm
16 SRCS_TOOL = secpol_tool.c
17 OBJS_TOOL := $(patsubst %.c,%.o,$(filter %.c,$(SRCS_TOOL)))
19 ACM_INST_TOOLS = xensec_tool xensec_gen
20 ACM_EZPOLICY = xensec_ezpolicy
21 ACM_OBJS = $(OBJS_TOOL) $(OBJS_GETD)
22 ACM_SCRIPTS = python/xensec_tools/acm_getlabel
24 ACM_CONFIG_DIR = $(XEN_CONFIG_DIR)/acm-security
25 ACM_POLICY_DIR = $(ACM_CONFIG_DIR)/policies
26 ACM_SCRIPT_DIR = $(ACM_CONFIG_DIR)/scripts
28 ACM_INST_HTML = python/xensec_gen/index.html
29 ACM_INST_CGI = python/xensec_gen/cgi-bin/policy.cgi
30 ACM_SECGEN_HTMLDIR= /var/lib/xensec_gen
31 ACM_SECGEN_CGIDIR = $(ACM_SECGEN_HTMLDIR)/cgi-bin
33 ACM_SCHEMA = security_policy.xsd
34 ACM_EXAMPLES = client_v1 test
35 ACM_DEF_POLICIES =
36 ACM_POLICY_SUFFIX = security_policy.xml
38 ifeq ($(ACM_SECURITY),y)
39 .PHONY: all
40 all: build
42 .PHONY: install
43 install: all $(ACM_CONFIG_FILE)
44 $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
45 $(INSTALL_PROG) $(ACM_INST_TOOLS) $(DESTDIR)$(SBINDIR)
46 $(INSTALL_PROG) $(ACM_EZPOLICY) $(DESTDIR)$(SBINDIR)
47 $(INSTALL_DIR) $(DESTDIR)$(ACM_CONFIG_DIR)
48 $(INSTALL_DIR) $(DESTDIR)$(ACM_POLICY_DIR)
49 $(INSTALL_DATA) policies/$(ACM_SCHEMA) $(DESTDIR)$(ACM_POLICY_DIR)
50 $(INSTALL_DIR) $(DESTDIR)$(ACM_POLICY_DIR)/example
51 set -e; for i in $(ACM_EXAMPLES); do \
52 $(INSTALL_DATA) policies/example/$$i-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/example/; \
53 done
54 set -e; for i in $(ACM_DEF_POLICIES); do \
55 $(INSTALL_DATA) policies/$$i-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR); \
56 done
57 $(INSTALL_DIR) $(DESTDIR)$(ACM_SCRIPT_DIR)
58 $(INSTALL_PROG) $(ACM_SCRIPTS) $(DESTDIR)$(ACM_SCRIPT_DIR)
59 $(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
60 $(INSTALL_DATA) $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
61 $(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
62 $(INSTALL_PROG) $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
63 $(PYTHON) python/setup.py install $(PYTHON_PREFIX_ARG) \
64 --root="$(DESTDIR)" --force
65 else
66 .PHONY: all
67 all:
69 .PHONY: install
70 install:
71 endif
73 .PHONY: build
74 build: $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
75 $(PYTHON) python/setup.py build
76 chmod 700 $(ACM_SCRIPTS)
78 xensec_tool: $(OBJS_TOOL)
79 $(CC) -g $(CFLAGS) $(LDFLAGS) -O0 -o $@ $^ $(LDFLAGS_libxenctrl)
81 xensec_gen: xensec_gen.py
82 cp -f $^ $@
84 .PHONY: clean
85 clean:
86 $(RM) $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
87 $(RM) $(ACM_OBJS)
88 $(RM) $(PROG_DEPS)
89 $(RM) -r build
91 .PHONY: mrproper
92 mrproper: clean
94 -include $(PROG_DEPS)