<commit_before># License and copyright goes here


#########################################################################
# platform.mk
#
# Figure out which platform we are building on/for, set ${platform} and
# ${hw}, and include the relevant platform-specific makefiles.
#
# This is called from master.mk
#########################################################################


#########################################################################
# Figure out which platform we are building on/for

# Start with unknown platform
platform := "unknown"

# Use 'uname -m' to determine the hardware architecture.  This should
# return "x86" or "x86_64"
hw := ${shell uname -m}
#$(info hardware = ${hw})
ifneq (${hw},x86)
  ifneq (${hw},x86_64)
    ifneq (${hw},i386)
      $(error "ERROR: Unknown hardware architecture")
    endif
  endif
endif

# Use 'uname', lowercased and stripped of pesky stuff, and the hardware
# architecture in ${hw} to determine the platform that we're building
# for, and store its name in ${platform}.

uname := ${shell uname | sed 's/_NT-.*//' | tr '[:upper:]' '[:lower:]'}
#$(info uname = ${uname})

# Linux
ifeq (${uname},linux)
  platform := linux
  ifeq (${hw},x86_64)
    platform := linux64
  endif
endif

# Windows
ifeq (${uname},cygwin)
  platform := win
  ifeq (${hw},x86_64)
    platform := win64
  endif
endif

# Mac OS X
ifeq (${uname},darwin)
  platform := macosx
endif

# If we haven't been able to determine the platform from uname, use
# whatever is in $ARCH, if it's set.
ifeq (${platform},unknown)
  ifneq (${ARCH},)
    platform := ${ARCH}
  endif
endif

# Manual override: if there's an environment variable $BUILDARCH, use that
# no matter what
ifneq (${BUILDARCH},)
  platform := ${BUILDARCH}
endif

# Throw an error if nothing worked
ifeq (${platform},unknown)
  $(error "ERROR: Could not determine the platform")
endif

$(info platform=${platform}, hw=${hw})

# end of section where we figure out the platform
#########################################################################



#########################################################################
# Default macros used by "most" platforms, so the platform-specific
# makefiles can be minimal

# C and C++ compilation
CFLAGS += -I${src_include_dir}
DASHC := -c #
DASHO := -o #<commit_msg>Minor build fixes from David.<commit_after># License and copyright goes here


#########################################################################
# platform.mk
#
# Figure out which platform we are building on/for, set ${platform} and
# ${hw}, and include the relevant platform-specific makefiles.
#
# This is called from master.mk
#########################################################################


#########################################################################
# Figure out which platform we are building on/for

# Start with unknown platform
platform ?= unknown

# Use 'uname -m' to determine the hardware architecture.  This should
# return "x86" or "x86_64"
hw := ${shell uname -m}
#$(info hardware = ${hw})
ifneq (${hw},x86)
  ifneq (${hw},x86_64)
    ifneq (${hw},i386)
      ifneq (${hw},i686)
        $(error "ERROR: Unknown hardware architecture")
      endif
    endif
  endif
endif

# Use 'uname', lowercased and stripped of pesky stuff, and the hardware
# architecture in ${hw} to determine the platform that we're building
# for, and store its name in ${platform}.

uname := ${shell uname | sed 's/_NT-.*//' | tr '[:upper:]' '[:lower:]'}
#$(info uname = ${uname})
ifeq (${platform},unknown)
  # Linux
  ifeq (${uname},linux)
    platform := linux
    ifeq (${hw},x86_64)
      platform := linux64
    endif
  endif

  # Windows
  ifeq (${uname},cygwin)
    platform := win
    ifeq (${hw},x86_64)
      platform := win64
    endif
  endif

  # Mac OS X
  ifeq (${uname},darwin)
    platform := macosx
  endif

  # If we haven't been able to determine the platform from uname, use
  # whatever is in $ARCH, if it's set.
  ifeq (${platform},unknown)
    ifneq (${ARCH},)
      platform := ${ARCH}
    endif
  endif

  # Manual override: if there's an environment variable $BUILDARCH, use that
  # no matter what
  ifneq (${BUILDARCH},)
    platform := ${BUILDARCH}
  endif
endif

# Throw an error if nothing worked
ifeq (${platform},unknown)
  $(error "ERROR: Could not determine the platform")
endif

$(info platform=${platform}, hw=${hw})

# end of section where we figure out the platform
#########################################################################



#########################################################################
# Default macros used by "most" platforms, so the platform-specific
# makefiles can be minimal

# C and C++ compilation
CFLAGS += -I${src_include_dir}
DASHC := -c #
DASHO := -o #
{'fraction_non_alphanumeric': 0.26556277509955983, 'fraction_numerical': 0.011947180884510585, 'mean_word_length': 4.5812865497076025, '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': '5157664', 'n_tokens_mistral': 1437, 'n_tokens_neox': 1335, 'n_words': 498}