ia64/xen-unstable

view tools/security/Makefile @ 7778:0b4596caf761

nloopbacks default is now 8. So vifnum of greater than 7 requires
an adjustment to nloopbacks. Warning comment updated.

Signed-off-by: Nivedita Singhvi (niv@us.ibm.com)
author kaf24@firebug.cl.cam.ac.uk
date Fri Nov 11 10:46:36 2005 +0100 (2005-11-11)
parents 1e40bed176d4
children cc1d77bba4b0
line source
1 XEN_ROOT = ../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 SRCS = secpol_tool.c
5 CFLAGS += -Wall
6 CFLAGS += -Werror
7 CFLAGS += -O3
8 CFLAGS += -fno-strict-aliasing
9 CFLAGS += -I. -I/usr/include/libxml2
10 CFLAGS_XML2BIN += $(shell xml2-config --cflags --libs )
11 #if above does not work, try -L/usr/lib -lxml2 -lz -lpthread -lm
12 XML2VERSION = $(shell xml2-config --version )
13 VALIDATE_SCHEMA=$(shell if [[ $(XML2VERSION) < 2.6.20 ]]; then echo ""; else echo "-DVALIDATE_SCHEMA"; fi; )
15 ifeq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
16 POLICY=null
17 endif
18 ifeq ($(ACM_USE_SECURITY_POLICY),ACM_CHINESE_WALL_POLICY)
19 POLICY=chwall
20 endif
21 ifeq ($(ACM_USE_SECURITY_POLICY),ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY)
22 POLICY=ste
23 endif
24 ifeq ($(ACM_USE_SECURITY_POLICY),ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY)
25 POLICY=chwall_ste
26 endif
27 POLICYFILE=./policies/$(POLICY)/$(POLICY).bin
29 ifneq ($(ACM_USE_SECURITY_POLICY), ACM_NULL_POLICY)
30 all: build
32 install:all
34 default:all
35 else
36 all:
38 install:
40 default:
41 endif
43 build: mk-symlinks
44 $(MAKE) secpol_tool
45 $(MAKE) secpol_xml2bin
46 $(MAKE) get_decision
47 chmod 700 ./setlabel.sh
48 chmod 700 ./updategrub.sh
49 chmod 700 ./getlabel.sh
51 secpol_tool : secpol_tool.c
52 $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $<
54 secpol_xml2bin : secpol_xml2bin.c secpol_xml2bin.h
55 $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_XML2BIN) $(VALIDATE_SCHEMA) -o $@ $<
57 clean:
58 rm -rf secpol_tool secpol_xml2bin xen
60 policy_clean:
61 rm -rf policies/*/*.bin policies/*/*.map
63 mrproper: clean policy_clean
66 $(POLICYFILE) : build
67 @./secpol_xml2bin $(POLICY) > /dev/null
69 boot_install: $(POLICYFILE)
70 @cp $(POLICYFILE) /boot
71 @./updategrub.sh $(POLICY) $(PWD)/$(XEN_ROOT)
73 LINUX_ROOT := $(XEN_ROOT)/linux-2.6-xen-sparse
74 mk-symlinks:
75 [ -e xen/linux ] || mkdir -p xen/linux
76 [ -e xen/io ] || mkdir -p xen/io
77 ( cd xen >/dev/null ; \
78 ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
79 ( cd xen/io >/dev/null ; \
80 ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
81 ( cd xen/linux >/dev/null ; \
82 ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )