direct-io.hg

view tools/security/Makefile @ 11330:3e54734e55f3

[IA64] Remove extraneous verbose output to clean up Fedora boot.

Signed-off-by: Aron Griffis <aron@hp.com>
author awilliam@xenbuild.aw
date Wed Aug 23 13:26:46 2006 -0600 (2006-08-23)
parents 947e09f90b3b
children daed6ac9d1f7
line source
1 XEN_ROOT = ../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 CFLAGS += -Werror
5 CFLAGS += -fno-strict-aliasing
6 CFLAGS += -I. -I $(XEN_LIBXC)
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 ifeq ($(ACM_DEFAULT_SECURITY_POLICY),ACM_NULL_POLICY)
17 POLICY=null
18 endif
19 ifeq ($(ACM_DEFAULT_SECURITY_POLICY),ACM_CHINESE_WALL_POLICY)
20 POLICY=chwall
21 endif
22 ifeq ($(ACM_DEFAULT_SECURITY_POLICY),ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY)
23 POLICY=ste
24 endif
25 ifeq ($(ACM_DEFAULT_SECURITY_POLICY),ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY)
26 POLICY=chwall_ste
27 endif
29 SRCS_TOOL = secpol_tool.c
30 OBJS_TOOL := $(patsubst %.c,%.o,$(filter %.c,$(SRCS_TOOL)))
31 SRCS_XML2BIN = secpol_xml2bin.c secpol_xml2bin.h
32 OBJS_XML2BIN := $(patsubst %.c,%.o,$(filter %.c,$(SRCS_XML2BIN)))
34 ACM_INST_TOOLS = xensec_tool xensec_xml2bin xensec_gen
35 ACM_EZPOLICY = xensec_ezpolicy
36 ACM_OBJS = $(OBJS_TOOL) $(OBJS_XML2BIN) $(OBJS_GETD)
37 ACM_SCRIPTS = python/xensec_tools/acm_getlabel
39 ACM_CONFIG_DIR = /etc/xen/acm-security
40 ACM_POLICY_DIR = $(ACM_CONFIG_DIR)/policies
41 ACM_SCRIPT_DIR = $(ACM_CONFIG_DIR)/scripts
43 ACM_INST_HTML = python/xensec_gen/index.html
44 ACM_INST_CGI = python/xensec_gen/cgi-bin/policy.cgi
45 ACM_SECGEN_HTMLDIR= /var/lib/xensec_gen
46 ACM_SECGEN_CGIDIR = $(ACM_SECGEN_HTMLDIR)/cgi-bin
48 ACM_SCHEMA = security_policy.xsd
49 ACM_EXAMPLES = chwall ste chwall_ste
50 ACM_POLICY_SUFFIX = security_policy.xml
52 ifeq ($(ACM_SECURITY),y)
53 .PHONY: all
54 all: build
56 .PHONY: install
57 install: all $(ACM_CONFIG_FILE)
58 $(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
59 $(INSTALL_PROG) -p $(ACM_INST_TOOLS) $(DESTDIR)/usr/sbin
60 $(INSTALL_PROG) -p $(ACM_EZPOLICY) $(DESTDIR)/usr/sbin
61 $(INSTALL_DIR) -p $(DESTDIR)$(ACM_CONFIG_DIR)
62 $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)
63 $(INSTALL_DATA) -p policies/$(ACM_SCHEMA) $(DESTDIR)$(ACM_POLICY_DIR)
64 $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/example
65 for i in $(ACM_EXAMPLES); do \
66 $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \
67 $(INSTALL_DATA) -p policies/example/$$i/client_v1-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \
68 done
69 $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SCRIPT_DIR)
70 $(INSTALL_PROG) -p $(ACM_SCRIPTS) $(DESTDIR)$(ACM_SCRIPT_DIR)
71 $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
72 $(INSTALL_DATA) -p $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
73 $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_CGIDIR)
74 $(INSTALL_PROG) -p $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
75 ifndef XEN_PYTHON_NATIVE_INSTALL
76 python python/setup.py install --home="$(DESTDIR)/usr"
77 else
78 python python/setup.py install --root="$(DESTDIR)"
79 endif
80 else
81 .PHONY: all
82 all:
84 .PHONY: install
85 install:
86 endif
88 .PHONY: build
89 build: mk-symlinks $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
90 python python/setup.py build
91 chmod 700 $(ACM_SCRIPTS)
93 xensec_tool: $(OBJS_TOOL)
94 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -L$(XEN_LIBXC) -lxenctrl
96 xensec_xml2bin: $(OBJS_XML2BIN)
97 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
99 xensec_gen: xensec_gen.py
100 cp -f $^ $@
102 .PHONY: clean
103 clean:
104 $(RM) $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
105 $(RM) $(ACM_OBJS)
106 $(RM) $(PROG_DEPS)
107 $(RM) -r xen
108 $(RM) -r build
110 .PHONY: mrproper
111 mrproper: clean
113 -include $(PROG_DEPS)