aboutsummaryrefslogtreecommitdiffstats
path: root/tools/flask
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-10-02 09:29:00 +0100
committerKeir Fraser <keir@xensource.com>2007-10-02 09:29:00 +0100
commitc42a6bd3c829cd1e1a2a3640c1af4bae30c97468 (patch)
tree30be92acfcbc8b734d708169ee70c7e3cc27b36a /tools/flask
parentece8f4f2592288a1511afabc6ed35cbb2ef7c8b0 (diff)
downloadxen-c42a6bd3c829cd1e1a2a3640c1af4bae30c97468.tar.gz
xen-c42a6bd3c829cd1e1a2a3640c1af4bae30c97468.tar.bz2
xen-c42a6bd3c829cd1e1a2a3640c1af4bae30c97468.zip
Fix non-portabilities in libflask.
Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/flask')
-rw-r--r--tools/flask/libflask/Makefile2
-rw-r--r--tools/flask/libflask/include/flask_op.h2
-rw-r--r--tools/flask/loadpolicy/Makefile11
3 files changed, 7 insertions, 8 deletions
diff --git a/tools/flask/libflask/Makefile b/tools/flask/libflask/Makefile
index 9c5cb770ff..db57575ea5 100644
--- a/tools/flask/libflask/Makefile
+++ b/tools/flask/libflask/Makefile
@@ -60,6 +60,6 @@ libflask.so.$(MAJOR): libflask.so.$(MAJOR).$(MINOR)
ln -sf $< $@
libflask.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libflask.so.$(MAJOR) -shared -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libflask.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^
-include $(DEPS)
diff --git a/tools/flask/libflask/include/flask_op.h b/tools/flask/libflask/include/flask_op.h
index 56cb213d67..4058ea85dc 100644
--- a/tools/flask/libflask/include/flask_op.h
+++ b/tools/flask/libflask/include/flask_op.h
@@ -39,7 +39,7 @@ typedef struct flask_op {
} flask_op_t;
int flask_load(int xc_handle, char *buf, int size);
-int flask_context_to_sid(int xc_handle, char *buf, int size, u_int32_t *sid);
+int flask_context_to_sid(int xc_handle, char *buf, int size, uint32_t *sid);
int flask_sid_to_context(int xc_handle, int sid, char *buf, int size);
int do_flask_op(int xc_handle, flask_op_t *op);
diff --git a/tools/flask/loadpolicy/Makefile b/tools/flask/loadpolicy/Makefile
index 3cad9a4720..19e11dbd9b 100644
--- a/tools/flask/loadpolicy/Makefile
+++ b/tools/flask/loadpolicy/Makefile
@@ -2,11 +2,6 @@ XEN_ROOT=../../..
include $(XEN_ROOT)/tools/Rules.mk
XEN_LIBXC = $(XEN_ROOT)/tools/libxc
-INSTALL = install
-INSTALL_DATA = $(INSTALL) -m0644
-INSTALL_PROG = $(INSTALL) -m0755
-INSTALL_DIR = $(INSTALL) -d -m0755
-
LIBXC_ROOT = $(XEN_ROOT)/tools/libxc
LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask
@@ -28,13 +23,17 @@ TESTFLAGS= -DTESTING
TESTENV = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR)
CLIENTS := flask-loadpolicy
+CLIENTS_SRCS := $(patsubst flask-%,%.c,$(CLIENTS))
CLIENTS_OBJS := $(patsubst flask-%,%.o,$(CLIENTS))
.PHONY: all
all: $(CLIENTS)
$(CLIENTS): flask-%: %.o
- $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@
+
+$(CLIENTS_OBJS): $(CLIENTS_SRCS)
+ $(COMPILE.c) -o $@ $<
.PHONY: clean
clean: