<commit_before>require "dep/premake-modules/xcode-alt"

MAIN_VER = '0'
SECONDARY_VER = '4'
PATCH_VER = '4'

function cbuildoptions()
	filter "action:vs2015"
		buildoptions { '/MP', '/Wall', '-Wno-unused-parameter', '-Qunused-arguments' }
	filter { "action:vs2015", "platforms:x64" }
		buildoptions {'-Wshorten-64-to-32'}
	filter "action:gmake"
		buildoptions { '-std=gnu11', '-Wall', '-Wno-multichar' }
	filter "action:xcode4"
		buildoptions { '-std=gnu11', '-Wall', '-Wno-multichar' }
	filter {}
end

function externcbuildoptions()
	filter "action:vs2015"
		buildoptions { '/MP', '-Qunused-arguments', '-Wno-unused-const-variable' }
	filter "action:gmake"
		buildoptions { '-std=gnu11', '-Wno-unused-const-variable', '-Wno-shorten-64-to-32' }
	filter "action:xcode4"
		buildoptions { '-std=gnu11', '-Wno-unused-const-variable', '-Wno-shorten-64-to-32' }
	filter {}
end

function cxxbuildoptions()
	filter "action:vs2015"
		buildoptions { '/MP', '-Qunused-arguments' }
	filter "action:gmake"
		buildoptions { '-std=gnu++11' }
	filter "action:xcode4"
		buildoptions { '-std=gnu++11' }
	filter {}
end

-- Premake 5 configurations
workspace "otfcc"
	configurations { "Debug", "Release" }
	platforms { "x32", "x64" }
	
	location "build"
	includedirs { "include", "dep", "lib" }
	
	defines {
		'_CARYLL_USE_PRE_SERIALIZED',
		('MAIN_VER=' .. MAIN_VER),
		("SECONDARY_VER=" .. SECONDARY_VER),
		("PATCH_VER=" .. PATCH_VER)
	}
	
	filter "action:vs2015"
		location "build/vs"
		toolset "msc-LLVM-vs2014"
		defines { '_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_DEPRECATE' }
		flags { "StaticRuntime" }
		includedirs { "dep/polyfill-msvc" }
	filter "action:gmake"
		location "build/gmake"
	filter "action:xcode4"
		location "build/xcode"
	filter {}
	
	filter "configurations:Debug"
		defines { "DEBUG" }
		symbols "on"
	filter "configurations:Release"
		defines { "NDEBUG" }
		optimize "Full"

project "deps"
	kind "StaticLib"
	language "C"
	externcbuildoptions()
	includedirs { "include/dep" }
	files {
		"dep/extern/**.h",
		"dep/extern/**.c"
	}
	filter "action:vs*"
	files {
		"dep/polyfill-msvc/**.h",
		"dep/polyfill-msvc/**.c"
	}
	filter {}

project "libotfcc"
	kind "StaticLib"
	language "C"
	cbuildoptions()

	links { "deps" }
	
	filter "action:gmake"
		links "m"
	filter {}

	filter "action:xcode4"
		links "m"
	filter {}

	files {
		"lib/**.h",
		"lib/**.c"
	}

project "otfccdump"
	kind "ConsoleApp"
	language "C"
	cbuildoptions()
	targetdir "bin/%{cfg.buildcfg}-%{cfg.platform}"
	<commit_msg>the programs should not include the internal headers<commit_after>require "dep/premake-modules/xcode-alt"

MAIN_VER = '0'
SECONDARY_VER = '4'
PATCH_VER = '4'

function cbuildoptions()
	filter "action:vs2015"
		buildoptions { '/MP', '/Wall', '-Wno-unused-parameter', '-Qunused-arguments' }
	filter { "action:vs2015", "platforms:x64" }
		buildoptions {'-Wshorten-64-to-32'}
	filter "action:gmake"
		buildoptions { '-std=gnu11', '-Wall', '-Wno-multichar' }
	filter "action:xcode4"
		buildoptions { '-std=gnu11', '-Wall', '-Wno-multichar' }
	filter {}
end

function externcbuildoptions()
	filter "action:vs2015"
		buildoptions { '/MP', '-Qunused-arguments', '-Wno-unused-const-variable' }
	filter "action:gmake"
		buildoptions { '-std=gnu11', '-Wno-unused-const-variable', '-Wno-shorten-64-to-32' }
	filter "action:xcode4"
		buildoptions { '-std=gnu11', '-Wno-unused-const-variable', '-Wno-shorten-64-to-32' }
	filter {}
end

function cxxbuildoptions()
	filter "action:vs2015"
		buildoptions { '/MP', '-Qunused-arguments' }
	filter "action:gmake"
		buildoptions { '-std=gnu++11' }
	filter "action:xcode4"
		buildoptions { '-std=gnu++11' }
	filter {}
end

-- Premake 5 configurations
workspace "otfcc"
	configurations { "Debug", "Release" }
	platforms { "x32", "x64" }
	
	location "build"
	includedirs { "include" }
	
	defines {
		'_CARYLL_USE_PRE_SERIALIZED',
		('MAIN_VER=' .. MAIN_VER),
		("SECONDARY_VER=" .. SECONDARY_VER),
		("PATCH_VER=" .. PATCH_VER)
	}
	
	filter "action:vs2015"
		location "build/vs"
		toolset "msc-LLVM-vs2014"
		defines { '_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_DEPRECATE' }
		flags { "StaticRuntime" }
		includedirs { "dep/polyfill-msvc" }
	filter "action:gmake"
		location "build/gmake"
	filter "action:xcode4"
		location "build/xcode"
	filter {}
	
	filter "configurations:Debug"
		defines { "DEBUG" }
		symbols "on"
	filter "configurations:Release"
		defines { "NDEBUG" }
		optimize "Full"

project "deps"
	kind "StaticLib"
	language "C"
	externcbuildoptions()
	includedirs { "include/dep" }
	files {
		"dep/extern/**.h",
		"dep/extern/**.c"
	}
	filter "action:vs*"
	files {
		"dep/polyfill-msvc/**.h",
		"dep/polyfill-msvc/**.c"
	}
	filter {}

project "libotfcc"
	kind "StaticLib"
	language "C"
	cbuildoptions()

	links { "deps" }
	includedirs{ "lib" }
	filter "action:gmake"
		links "m"
	filter {}

	filter "action:xcode4"
		links "m"
	filter {}

	files {
		"lib/**.h",
		"lib/**.c"
	}

project "otfccdump"
	kind "ConsoleApp"
	language "C"
	cbuildoptions()
	targetdir "bin/%{cfg.buildcfg}-%{cfg.platform}"
	
{'fraction_non_alphanumeric': 0.17524339360222532, 'fraction_numerical': 0.025034770514603615, 'mean_word_length': 4.254697286012526, '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': '3249979', 'n_tokens_mistral': 2156, 'n_tokens_neox': 1995, 'n_words': 373}