<commit_before>#---------------------------------------------------------------------------------
# TARGET is the name of the output, if this ends with _mb generates a multiboot image
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET		:=	cgcomp
BUILD		:=	build
SOURCES		:=	source
INCLUDE		:=	include
LIBDIRS		:=

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------

UNAME	:=	$(shell uname -s)

ifneq ($(strip $(DEBUGFLAGS)),)
	CFLAGS	:=	$(DEBUGFLAGS) -Wall
else
	CFLAGS	:=	-Wall -O2
endif

CFLAGS		+=	$(INCLUDES)
CXXFLAGS	:=	$(CFLAGS)
CGTOOLKIT	:= 	echo Linux and Mac users should install Cg Toolkit package from NVIDIA web site.

LDFLAGS	=	$(DEBUGFLAGS)

ifeq ($(strip $(PS3DEV)),)
  ifeq ($(strip $(DEVKITPS3)),)
    export PS3DEV := /usr/local/ps3dev
  else
    export PS3DEV := $(DEVKITPS3)
  endif
endif

# Allow for 'make VERBOSE=1' to see the recepie executions
ifndef VERBOSE
  VERB := @
endif

ifneq (,$(findstring MINGW,$(UNAME)))
	PLATFORM	:= win32
	EXEEXT		:= .exe
	CFLAGS		+= -mno-cygwin
	LDFLAGS		+= -mno-cygwin -s
	OS	:=	win32
	CGTOOLKIT	:= chmod 755 ./cgdll-installer.sh; ./cgdll-installer.sh
endif

ifneq (,$(findstring CYGWIN,$(UNAME)))
	LDFLAGS		+= -s
	EXEEXT		:= .exe
	CXXFLAGS	+= -DWIN32
	OS	:=	win32
	CGTOOLKIT	:= chmod 755 ./cgdll-installer.sh; ./cgdll-installer.sh
endif

ifneq (,$(findstring Darwin,$(UNAME)))
	SDK		:= $(shell xcrun --show-sdk-path)
	OSX_MIN		:= $(shell defaults read $(shell xcrun --show-sdk-platform-path)/Info MinimumSDKVersion 2> /dev/null || 10.4)
	OSXCFLAGS	:= -mmacosx-version-min=$(OSX_MIN)
	OSXCXXFLAGS	:=	$(OSXCFLAGS)
	CXXFLAGS	+=	-fvisibility=hidden
	LDFLAGS += -mmacosx-version-min=$(OSX_MIN) -Wl,-syslibroot,$(SDK)
endif

ifneq (,$(findstring Linux,$(UNAME)))
	LDFLAGS += -ldl -lpthread
	OS := Linux
endif

LIBS		:=

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export OUTPUT	:=	$(CURDIR)/$(TARGET)

export VPATH	:=	$(foreach dir,$(SOURCES),$(CURDIR)/$(dir))

export CC	:=	$(PREFIX)gcc
export CXX	:=	$(PREFIX)g++
export AR	:=	$(PREFIX)ar
export OBJCOPY	:=	$(PREFIX)objcopy
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
export LD	:=	$(CXX)

#---------------------------------------------------------------------------------
# automatically build a list of object files for our project<commit_msg>Require C++11 when compiling cgcomp<commit_after>#---------------------------------------------------------------------------------
# TARGET is the name of the output, if this ends with _mb generates a multiboot image
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET		:=	cgcomp
BUILD		:=	build
SOURCES		:=	source
INCLUDE		:=	include
LIBDIRS		:=

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------

UNAME	:=	$(shell uname -s)

ifneq ($(strip $(DEBUGFLAGS)),)
	CFLAGS	:=	$(DEBUGFLAGS) -Wall
else
	CFLAGS	:=	-Wall -O2
endif

CFLAGS		+=	$(INCLUDES)
CXXFLAGS	:=	$(CFLAGS)
CGTOOLKIT	:= 	echo Linux and Mac users should install Cg Toolkit package from NVIDIA web site.

LDFLAGS	=	$(DEBUGFLAGS)

ifeq ($(strip $(PS3DEV)),)
  ifeq ($(strip $(DEVKITPS3)),)
    export PS3DEV := /usr/local/ps3dev
  else
    export PS3DEV := $(DEVKITPS3)
  endif
endif

# Allow for 'make VERBOSE=1' to see the recepie executions
ifndef VERBOSE
  VERB := @
endif

ifneq (,$(findstring MINGW,$(UNAME)))
	PLATFORM	:= win32
	EXEEXT		:= .exe
	CFLAGS		+= -mno-cygwin
	LDFLAGS		+= -mno-cygwin -s
	OS	:=	win32
	CGTOOLKIT	:= chmod 755 ./cgdll-installer.sh; ./cgdll-installer.sh
endif

ifneq (,$(findstring CYGWIN,$(UNAME)))
	LDFLAGS		+= -s
	EXEEXT		:= .exe
	CXXFLAGS	+= -DWIN32
	OS	:=	win32
	CGTOOLKIT	:= chmod 755 ./cgdll-installer.sh; ./cgdll-installer.sh
endif

ifneq (,$(findstring Darwin,$(UNAME)))
	SDK		:= $(shell xcrun --show-sdk-path)
	OSX_MIN		:= $(shell defaults read $(shell xcrun --show-sdk-platform-path)/Info MinimumSDKVersion 2> /dev/null || 10.4)
	OSXCFLAGS	:= -mmacosx-version-min=$(OSX_MIN)
	OSXCXXFLAGS	:=	$(OSXCFLAGS)
	CXXFLAGS	+=	-fvisibility=hidden
	LDFLAGS += -mmacosx-version-min=$(OSX_MIN) -Wl,-syslibroot,$(SDK)
endif

ifneq (,$(findstring Linux,$(UNAME)))
	LDFLAGS += -ldl -lpthread
	OS := Linux
endif

CXXFLAGS        += -std=c++11

LIBS		:=

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export OUTPUT	:=	$(CURDIR)/$(TARGET)

export VPATH	:=	$(foreach dir,$(SOURCES),$(CURDIR)/$(dir))

export CC	:=	$(PREFIX)gcc
export CXX	:=	$(PREFIX)g++
export AR	:=	$(PREFIX)ar
export OBJCOPY	:=	$(PREFIX)objcopy
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
export LD	:=	$(CXX)

#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
{'fraction_non_alphanumeric': 0.36025620996719265, 'fraction_numerical': 0.008748633026089674, 'mean_word_length': 1.5115731659474303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1641750', 'n_tokens_mistral': 1997, 'n_tokens_neox': 1846, 'n_words': 535}