<commit_before># SE Tools Main makefile

MAKEFILE =  Makefile
MAKE = make

LIBS		= -lfl -lm 
TCLVER		= $(shell env tclsh tcl_vars version)
TCL_LIBINC	= -L$(shell env tclsh tcl_vars pkgPath)
TCL_INCLUDE	= -I$(shell echo $(shell env tclsh tcl_vars pkgPath) | sed -e "s/lib/include/g")
#TCLVER		= 8.3
#TCL_INCLUDE	= -I/usr/include
#TCL_LIBINC	= -L/usr/lib
TCL_LIBS	= -ltk$(TCLVER) -ltcl$(TCLVER) -ldl $(LIBS)

LINKFLAGS	= 
CC		= gcc 
YACC		= bison -y
LEX		= flex -olex.yy.c


# File location defaults; used in various places in code
# Change these if you want different defaults
POLICY_SRC_DIR	= $(DESTDIR)/etc/security/selinux/src
POLICY_SRC_FILE = $(POLICY_SRC_DIR)/policy.conf
DEFAULT_LOG_FILE = /var/log/messages

# Compile options
# -DAPOL_PERFORM_TEST	
##		simple performance measure tests (shouldn't normally use)
# -DCONFIG_SECURITY_SELINUX_MLS 
##		compiles library to be compatible with MLS 
#		in the policy (experimental, see Readme)
#
CC_DEFINES	= 

CFLAGS		= -Wall -O2 $(TCL_INCLUDE) $(CC_DEFINES)
#CFLAGS		= -Wall -g $(TCL_INCLUDE) $(CC_DEFINES)
#CFLAGS		= -Wall -ansi -pedantic -g $(TCL_INCLUDE) $(CC_DEFINES)

# Install directories
# Binaries go here
BINDIR		= $(DESTDIR)/usr/bin


# The code uses the specified path below. If you change this, DO NOT add 
# a trailing path seperator ("/"). For example, use "/usr/share/setools" 
# instead of "/usr/share/setools/". This probably needs to become more 
# robust in the future.
#
INSTALL_LIBDIR	= $(DESTDIR)/usr/share/setools
#
# END NOTE


# This should be imported from tools/Makefile (deprecated)
SRC_POLICY_DIR = ../../

# all apps that have a te/fc file need to be listed here
POLICYINSTALLDIRS = seuser

# exports
export CFLAGS CC YACC LEX LINKFLAGS BINDIR INSTALL_LIBDIR LIBS TCL_LIBINC TCL_LIBS MAKE 
export POLICY_SRC_DIR SRC_POLICY_DIR POLICY_SRC_FILE DEFAULT_LOG_FILE

all:  all-libs apol awish seuser seuserx sepcut seaudit secmds

all-nogui:  corelibs seuser secmds

corelibs: libapol libseuser libseaudit

guilibs: libapol-tcl libseuser-tcl

all-libs: corelibs guilibs

help:
	@echo "Make targets for setools: "
	@echo "   install:         build and install everything (selinux required)"
	@echo "   install-nogui:   build and install all non-GUI tools (selinux required)"
	@echo ""
	@echo "   install-apol:    build and install apol (selinux not required)"
	@echo "   install-sepcut:  build and install sepct (selinux not required)"
	@echo "   install-seuser:  build and install command line seuser (selinux required)"
	@echo "   install-seuserx: build and install seuser and seuserx (selinux required)"
	@echo "   install-secmds:  build and install command line tools (selinux not required)"
	@echo "   install-seaudit: build and install seaudit (selinux not required)"
	@echo " "
	@echo "   all:             build everything, but don't install"
	@echo "   all-nogui:       only build non-GUI tools and libraries"
	@echo ""
	@echo "   docs:            generate setools documentation"
	@echo "   remove-docs:     remove setools documentation"
	@echo "   apol:            build policy analysis tool"
	@echo "   seuser:          build SE Linux command line user tool"
	@echo "   seuserx:         build SE Linux GUI user tool"
	@echo "   sepcut           build policy customization/browsing tool"
	@echo "   secmds:          build setools command line tools"
	@echo "   seaudit:         built audit log analysis tool"
	@echo "   awish:           build TCL/TK wish interpreter with SE Linux tools extensions"
	@echo " "
	@echo "   clean:          clean up interim files"
	@echo "   bare:           more extensive clean up"


apol: selinux_tool
	cd apol;
	@if [ "${shell env tclsh tcl_vars search_tcl_libs}" != "none" ]; then \
		cd apol; $(MAKE) apol; \
	else \
		echo "Could not build apol."; \
		echo "Tcl library is not built or not in expected location(s)."; \
	fi

awish: selinux_tool
	cd awish;
	@if [ "${shell env tclsh tcl_vars search_tcl_libs}" != "none" ]; then \
		cd awish; $(MAKE) awish; \
	else \
		echo "Could not build awish."; \<commit_msg>Removed these targets as they are only for our packaging process.<commit_after># SE Tools Main makefile

MAKEFILE =  Makefile
MAKE = make

LIBS		= -lfl -lm 
TCLVER		= $(shell env tclsh tcl_vars version)
TCL_LIBINC	= -L$(shell env tclsh tcl_vars pkgPath)
TCL_INCLUDE	= -I$(shell echo $(shell env tclsh tcl_vars pkgPath) | sed -e "s/lib/include/g")
#TCLVER		= 8.3
#TCL_INCLUDE	= -I/usr/include
#TCL_LIBINC	= -L/usr/lib
TCL_LIBS	= -ltk$(TCLVER) -ltcl$(TCLVER) -ldl $(LIBS)

LINKFLAGS	= 
CC		= gcc 
YACC		= bison -y
LEX		= flex -olex.yy.c


# File location defaults; used in various places in code
# Change these if you want different defaults
POLICY_SRC_DIR	= $(DESTDIR)/etc/security/selinux/src
POLICY_SRC_FILE = $(POLICY_SRC_DIR)/policy.conf
DEFAULT_LOG_FILE = /var/log/messages

# Compile options
# -DAPOL_PERFORM_TEST	
##		simple performance measure tests (shouldn't normally use)
# -DCONFIG_SECURITY_SELINUX_MLS 
##		compiles library to be compatible with MLS 
#		in the policy (experimental, see Readme)
#
CC_DEFINES	= 

CFLAGS		= -Wall -O2 $(TCL_INCLUDE) $(CC_DEFINES)
#CFLAGS		= -Wall -g $(TCL_INCLUDE) $(CC_DEFINES)
#CFLAGS		= -Wall -ansi -pedantic -g $(TCL_INCLUDE) $(CC_DEFINES)

# Install directories
# Binaries go here
BINDIR		= $(DESTDIR)/usr/bin


# The code uses the specified path below. If you change this, DO NOT add 
# a trailing path seperator ("/"). For example, use "/usr/share/setools" 
# instead of "/usr/share/setools/". This probably needs to become more 
# robust in the future.
#
INSTALL_LIBDIR	= $(DESTDIR)/usr/share/setools
#
# END NOTE


# This should be imported from tools/Makefile (deprecated)
SRC_POLICY_DIR = ../../

# all apps that have a te/fc file need to be listed here
POLICYINSTALLDIRS = seuser

# exports
export CFLAGS CC YACC LEX LINKFLAGS BINDIR INSTALL_LIBDIR LIBS TCL_LIBINC TCL_LIBS MAKE 
export POLICY_SRC_DIR SRC_POLICY_DIR POLICY_SRC_FILE DEFAULT_LOG_FILE

all:  all-libs apol awish seuser seuserx sepcut seaudit secmds

all-nogui:  corelibs seuser secmds

corelibs: libapol libseuser libseaudit

guilibs: libapol-tcl libseuser-tcl

all-libs: corelibs guilibs

help:
	@echo "Make targets for setools: "
	@echo "   install:         build and install everything (selinux required)"
	@echo "   install-nogui:   build and install all non-GUI tools (selinux required)"
	@echo ""
	@echo "   install-apol:    build and install apol (selinux not required)"
	@echo "   install-sepcut:  build and install sepct (selinux not required)"
	@echo "   install-seuser:  build and install command line seuser (selinux required)"
	@echo "   install-seuserx: build and install seuser and seuserx (selinux required)"
	@echo "   install-secmds:  build and install command line tools (selinux not required)"
	@echo "   install-seaudit: build and install seaudit (selinux not required)"
	@echo " "
	@echo "   all:             build everything, but don't install"
	@echo "   all-nogui:       only build non-GUI tools and libraries"
	@echo ""
	@echo "   apol:            build policy analysis tool"
	@echo "   seuser:          build SE Linux command line user tool"
	@echo "   seuserx:         build SE Linux GUI user tool"
	@echo "   sepcut           build policy customization/browsing tool"
	@echo "   secmds:          build setools command line tools"
	@echo "   seaudit:         built audit log analysis tool"
	@echo "   awish:           build TCL/TK wish interpreter with SE Linux tools extensions"
	@echo " "
	@echo "   clean:          clean up interim files"
	@echo "   bare:           more extensive clean up"


apol: selinux_tool
	cd apol;
	@if [ "${shell env tclsh tcl_vars search_tcl_libs}" != "none" ]; then \
		cd apol; $(MAKE) apol; \
	else \
		echo "Could not build apol."; \
		echo "Tcl library is not built or not in expected location(s)."; \
	fi

awish: selinux_tool
	cd awish;
	@if [ "${shell env tclsh tcl_vars search_tcl_libs}" != "none" ]; then \
		cd awish; $(MAKE) awish; \
	else \
		echo "Could not build awish."; \
{'fraction_non_alphanumeric': 0.09907430572929697, 'fraction_numerical': 0.0007505629221916438, 'mean_word_length': 3.4171270718232045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '542698', 'n_tokens_mistral': 2941, 'n_tokens_neox': 2816, 'n_words': 922}