Chris PeBenito 134191
# flask needs to know where to export the libselinux headers.
Chris PeBenito 134191
LIBSEL ?= ../../libselinux
Chris PeBenito 134191
Chris PeBenito 134191
# flask needs to know where to export the kernel headers.
Chris PeBenito 134191
LINUXDIR ?= ../../../linux-2.6
Chris PeBenito 134191
Chris PeBenito 134191
AWK = awk
Chris PeBenito 134191
Chris PeBenito 134191
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
Chris PeBenito 134191
          else if [ -x /bin/bash ]; then echo /bin/bash; \
Chris PeBenito 134191
          else echo sh; fi ; fi)
Chris PeBenito 134191
Chris PeBenito 134191
FLASK_H_DEPEND = security_classes initial_sids
Chris PeBenito 134191
AV_H_DEPEND = access_vectors
Chris PeBenito 134191
Chris PeBenito 134191
FLASK_H_FILES = class_to_string.h flask.h initial_sid_to_string.h
Chris PeBenito 134191
AV_H_FILES = av_inherit.h common_perm_to_string.h av_perm_to_string.h av_permissions.h
Chris PeBenito 134191
ALL_H_FILES = $(FLASK_H_FILES) $(AV_H_FILES)
Chris PeBenito 134191
Chris PeBenito 134191
all:  $(ALL_H_FILES)
Chris PeBenito 134191
Chris PeBenito 134191
$(FLASK_H_FILES): $(FLASK_H_DEPEND)
Chris PeBenito 134191
	$(CONFIG_SHELL) mkflask.sh $(AWK) $(FLASK_H_DEPEND)
Chris PeBenito 134191
Chris PeBenito 134191
$(AV_H_FILES): $(AV_H_DEPEND)
Chris PeBenito 134191
	$(CONFIG_SHELL) mkaccess_vector.sh $(AWK) $(AV_H_DEPEND)
Chris PeBenito 134191
Chris PeBenito 134191
tolib: all
Chris PeBenito 134191
	install -m 644 flask.h av_permissions.h $(LIBSEL)/include/selinux
Chris PeBenito 134191
	install -m 644 class_to_string.h av_inherit.h common_perm_to_string.h av_perm_to_string.h $(LIBSEL)/src
Chris PeBenito 134191
Chris PeBenito 134191
tokern: all
Chris PeBenito 134191
	install -m 644 $(ALL_H_FILES) $(LINUXDIR)/security/selinux/include
Chris PeBenito 134191
Chris PeBenito 134191
install: all
Chris PeBenito 134191
Chris PeBenito 134191
relabel:
Chris PeBenito 134191
Chris PeBenito 134191
clean:  
Chris PeBenito 134191
	rm -f $(FLASK_H_FILES)
Chris PeBenito 134191
	rm -f $(AV_H_FILES)