<commit_before>##
# Variables included by all Makefiles.
##

## Directory definitions

libdir       = $(slateroot)/lib
mobiusdir    = $(slateroot)/src/mobius
pluginsdir   = $(slateroot)/src/plugins
testdir      = $(slateroot)/tests

prefix      = /usr/local
datadir     = $(prefix)/share/slate
exec_prefix = $(prefix)/bin
execname    = slate
includedir  = $(prefix)/include
mandir      = $(prefix)/share/man
man1dir     = $(mandir)/man1
infodir     = $(prefix)/info
lispdir     = $(prefix)/share/emacs/site-lisp
DEVNULL     := /dev/null

## Build modes. Set on command line using QUIET=1, DEBUG=1 or PROFILE=1


ifdef QUIET
  VERBOSE := 0
  SILENT := @
  SILENT_ERRORS := 2> $(DEVNULL)
  LIBTOOL_FLAGS += --silent
endif

ifdef DEBUG
  MODE := debug
  COPTFLAGS += -g
  CFLAGS += -DSLATE_BUILD_TYPE="\"Debug\""
else
  MODE := optimized
  CFLAGS += -DSLATE_BUILD_TYPE="\"Optimized\""
  COPTFLAGS += -O2
endif

ifdef PROFILE
  MODE += profiled
  COPTFLAGS += -pg -g
  CFLAGS += -DSLATE_BUILD_TYPE="\"Profile\""
else
#  COPTFLAGS += -fomit-frame-pointer 
endif



## All required executables

#CC          := gcc
CP          := cp -f
LIBTOOL     ?= libtool
ECHO        := echo
WGET        := wget -q --cache=off
SECHO       := @$(ECHO)
INSTALL     := install
TAR         := tar
GZIP        := gzip
ETAGS       := etags
EMACS       := emacs

## Platform independent definitions

INCLUDES    += 
CFLAGS      += -DSLATE_DATADIR=$(datadir) -D_POSIX_SOURCE=200112L
CFLAGS      += $(COPTFLAGS) -std=c99 -Wall -pedantic -pthread $(PRINT_DEBUG)  $(INCLUDES)

## Determine the host system's byte order.
## This creates a temporary test executable in the $(slateroot) directory
## since we can guarantee write permissions there on all platforms. 

BYTE_ORDER  := "int main(){union{long l;char c[sizeof(long)];}u;u.l=1;return(u.c[sizeof(long)-1]==1);}"
BYTE_ORDER  := $(shell echo $(BYTE_ORDER) > $(slateroot)/byteorder.c)
BYTE_ORDER  := $(shell $(CC) -o $(slateroot)/byteorder $(slateroot)/byteorder.c)
BYTE_ORDER  := $(shell $(slateroot)/byteorder; echo $$?)
BYTE_ORDER_ := $(shell $(RM) $(slateroot)/byteorder.* $(slateroot)/byteorder 1>&2)
ifeq ($(BYTE_ORDER),0)
  BYTE_ORDER := LITTLE_ENDIAN
  BYTE_ORDER_PREFIX := little
else
  BYTE_ORDER := BIG_ENDIAN
  BYTE_ORDER_PREFIX := big
endif

## Default variables

PLATFORM    := unix
CCVERSION   := $(shell $(CC) -dumpversion)
WORD_SIZE   := 32
LDFLAGS     := # -avoid-version
LIBS        := #-lm -ldl
#PLUGINS     := platform.so posix.so pipe.so
#PLUGINS     := x-windows.so
PLUGINS     := 
HOST_SYSTEM := $(shell uname -s)
LIB_SO_EXT  := .so
INSTALL_MODE := -m 644<commit_msg>remove pragma warning<commit_after>##
# Variables included by all Makefiles.
##

## Directory definitions

libdir       = $(slateroot)/lib
mobiusdir    = $(slateroot)/src/mobius
pluginsdir   = $(slateroot)/src/plugins
testdir      = $(slateroot)/tests

prefix      = /usr/local
datadir     = $(prefix)/share/slate
exec_prefix = $(prefix)/bin
execname    = slate
includedir  = $(prefix)/include
mandir      = $(prefix)/share/man
man1dir     = $(mandir)/man1
infodir     = $(prefix)/info
lispdir     = $(prefix)/share/emacs/site-lisp
DEVNULL     := /dev/null

## Build modes. Set on command line using QUIET=1, DEBUG=1 or PROFILE=1


ifdef QUIET
  VERBOSE := 0
  SILENT := @
  SILENT_ERRORS := 2> $(DEVNULL)
  LIBTOOL_FLAGS += --silent
endif

ifdef DEBUG
  MODE := debug
  COPTFLAGS += -g
  CFLAGS += -DSLATE_BUILD_TYPE="\"Debug\""
else
  MODE := optimized
  CFLAGS += -DSLATE_BUILD_TYPE="\"Optimized\""
  COPTFLAGS += -O2
endif

ifdef PROFILE
  MODE += profiled
  COPTFLAGS += -pg -g
  CFLAGS += -DSLATE_BUILD_TYPE="\"Profile\""
else
#  COPTFLAGS += -fomit-frame-pointer 
endif



## All required executables

#CC          := gcc
CP          := cp -f
LIBTOOL     ?= libtool
ECHO        := echo
WGET        := wget -q --cache=off
SECHO       := @$(ECHO)
INSTALL     := install
TAR         := tar
GZIP        := gzip
ETAGS       := etags
EMACS       := emacs

## Platform independent definitions

INCLUDES    += 
CFLAGS      += -DSLATE_DATADIR=$(datadir) -D_POSIX_SOURCE=200112L
CFLAGS      += $(COPTFLAGS) -std=c99 -Wall -pedantic -Wno-unknown-pragmas -pthread $(PRINT_DEBUG)  $(INCLUDES)

## Determine the host system's byte order.
## This creates a temporary test executable in the $(slateroot) directory
## since we can guarantee write permissions there on all platforms. 

BYTE_ORDER  := "int main(){union{long l;char c[sizeof(long)];}u;u.l=1;return(u.c[sizeof(long)-1]==1);}"
BYTE_ORDER  := $(shell echo $(BYTE_ORDER) > $(slateroot)/byteorder.c)
BYTE_ORDER  := $(shell $(CC) -o $(slateroot)/byteorder $(slateroot)/byteorder.c)
BYTE_ORDER  := $(shell $(slateroot)/byteorder; echo $$?)
BYTE_ORDER_ := $(shell $(RM) $(slateroot)/byteorder.* $(slateroot)/byteorder 1>&2)
ifeq ($(BYTE_ORDER),0)
  BYTE_ORDER := LITTLE_ENDIAN
  BYTE_ORDER_PREFIX := little
else
  BYTE_ORDER := BIG_ENDIAN
  BYTE_ORDER_PREFIX := big
endif

## Default variables

PLATFORM    := unix
CCVERSION   := $(shell $(CC) -dumpversion)
WORD_SIZE   := 32
LDFLAGS     := # -avoid-version
LIBS        := #-lm -ldl
#PLUGINS     := platform.so posix.so pipe.so
#PLUGINS     := x-windows.so
PLUGINS     := 
HOST_SYSTEM := $(shell uname -s)
LIB_SO_EXT  := .so
INSTALL_MODE := -m 644
{'fraction_non_alphanumeric': 0.14894426478980408, 'fraction_numerical': 0.010272018261365798, 'mean_word_length': 3.2852485737571313, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7261818', 'n_tokens_mistral': 1963, 'n_tokens_neox': 1858, 'n_words': 452}