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