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