2007-03-23 20:32:23 +00:00
|
|
|
PYTHON ?= python
|
|
|
|
|
2005-06-01 15:40:37 +00:00
|
|
|
# flask needs to know where to export the libselinux headers.
|
2007-03-23 20:32:23 +00:00
|
|
|
LIBSELINUX_D ?= ../../libselinux
|
2005-06-01 15:40:37 +00:00
|
|
|
|
|
|
|
# flask needs to know where to export the kernel headers.
|
2007-03-23 20:32:23 +00:00
|
|
|
LINUX_D ?= ../../../linux-2.6
|
|
|
|
|
|
|
|
ACCESS_VECTORS_F = access_vectors
|
|
|
|
INITIAL_SIDS_F = initial_sids
|
|
|
|
SECURITY_CLASSES_F = security_classes
|
|
|
|
|
|
|
|
USER_D = userspace
|
|
|
|
KERN_D = kernel
|
2005-06-01 15:40:37 +00:00
|
|
|
|
2007-03-23 20:32:23 +00:00
|
|
|
LIBSELINUX_INCLUDE_H = flask.h av_permissions.h
|
|
|
|
LIBSELINUX_SOURCE_H = class_to_string.h av_inherit.h common_perm_to_string.h av_perm_to_string.h
|
2005-06-01 15:40:37 +00:00
|
|
|
|
2007-03-23 20:32:23 +00:00
|
|
|
FLASK_H = class_to_string.h flask.h initial_sid_to_string.h
|
|
|
|
ACCESS_VECTORS_H = av_inherit.h common_perm_to_string.h av_perm_to_string.h av_permissions.h
|
|
|
|
ALL_H = $(FLASK_H) $(ACCESS_VECTORS_H)
|
2005-06-01 15:40:37 +00:00
|
|
|
|
2007-03-23 20:32:23 +00:00
|
|
|
USER_H = $(addprefix $(USER_D)/, $(ALL_H))
|
|
|
|
KERN_H = $(addprefix $(KERN_D)/, $(ALL_H))
|
2005-06-01 15:40:37 +00:00
|
|
|
|
2007-03-23 20:32:23 +00:00
|
|
|
FLASK_NOWARNINGS = --nowarnings
|
2005-06-01 15:40:37 +00:00
|
|
|
|
2007-03-23 20:32:23 +00:00
|
|
|
all: $(USER_H) $(KERN_H)
|
2005-06-01 15:40:37 +00:00
|
|
|
|
2007-10-16 18:30:23 +00:00
|
|
|
$(USER_H): flask.py $(ACCESS_VECTORS_F) $(INITIAL_SIDS_F) $(SECURITY_CLASSES_F)
|
2007-03-23 20:32:23 +00:00
|
|
|
mkdir -p $(USER_D)
|
|
|
|
$(PYTHON) flask.py -a $(ACCESS_VECTORS_F) -i $(INITIAL_SIDS_F) -s $(SECURITY_CLASSES_F) -o $(USER_D) -u $(FLASK_NOWARNINGS)
|
2005-06-01 15:40:37 +00:00
|
|
|
|
2007-10-16 18:30:23 +00:00
|
|
|
$(KERN_H): flask.py $(ACCESS_VECTORS_F) $(INITIAL_SIDS_F) $(SECURITY_CLASSES_F)
|
2007-03-23 20:32:23 +00:00
|
|
|
mkdir -p $(KERN_D)
|
|
|
|
$(PYTHON) flask.py -a $(ACCESS_VECTORS_F) -i $(INITIAL_SIDS_F) -s $(SECURITY_CLASSES_F) -o $(KERN_D) -k $(FLASK_NOWARNINGS)
|
2005-06-01 15:40:37 +00:00
|
|
|
|
|
|
|
tolib: all
|
2007-03-23 20:32:23 +00:00
|
|
|
install -m 644 $(addprefix $(USER_D)/, $(LIBSELINUX_INCLUDE_H)) $(LIBSELINUX_D)/include/selinux
|
|
|
|
install -m 644 $(addprefix $(USER_D)/, $(LIBSELINUX_SOURCE_H)) $(LIBSELINUX_D)/src
|
2005-06-01 15:40:37 +00:00
|
|
|
|
|
|
|
tokern: all
|
2007-03-23 20:32:23 +00:00
|
|
|
install -m 644 $(KERN_H) $(LINUX_D)/security/selinux/include
|
2005-06-01 15:40:37 +00:00
|
|
|
|
|
|
|
install: all
|
|
|
|
|
|
|
|
relabel:
|
|
|
|
|
|
|
|
clean:
|
2007-03-23 20:32:23 +00:00
|
|
|
rm -fr userspace
|
|
|
|
rm -fr kernel
|