<commit_before>--
-- Copyright 2010-2020 <NAME>. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--

function filesexist(_srcPath, _dstPath, _files)
	for _, file in ipairs(_files) do
		file = path.getrelative(_srcPath, file)
		local filePath = path.join(_dstPath, file)
		if not os.isfile(filePath) then return false end
	end

	return true
end

function overridefiles(_srcPath, _dstPath, _files)

	local remove = {}
	local add = {}
	for _, file in ipairs(_files) do
		file = path.getrelative(_srcPath, file)
		local filePath = path.join(_dstPath, file)
		if not os.isfile(filePath) then return end

		table.insert(remove, path.join(_srcPath, file))
		table.insert(add, filePath)
	end

	removefiles {
		remove,
	}

	files {
		add,
	}
end

function bgfxProjectBase(_kind, _defines)

	kind (_kind)

	if _kind == "SharedLib" then
		defines {
			"BGFX_SHARED_LIB_BUILD=1",
		}

		links {
			"bimg",
			"bx",
		}

		configuration { "vs20* or mingw*" }
			links {
				"gdi32",
				"psapi",
			}

		configuration { "mingw*" }
			linkoptions {
				"-shared",
			}

		configuration { "linux-*" }
			buildoptions {
				"-fPIC",
			}
			links {
				"X11",
				"GL",
				"pthread",
			}

		configuration { "android*" }
			targetextension ".so"

		configuration { "android*" ,"Debug"}
			linkoptions{"-soname libbgfx-shared-libDebug.so"  }

		configuration { "android*" ,"Release"}
			linkoptions{"-soname libbgfx-shared-libRelease.so"  }

		configuration {}
	end

	includedirs {
		path.join(BGFX_DIR, "3rdparty"),
		path.join(BX_DIR,   "include"),
		path.join(BIMG_DIR, "include"),
	}

	defines (_defines)

	links {
		"bx",
	}

	if _OPTIONS["with-glfw"] then
		defines {
			"BGFX_CONFIG_MULTITHREADED=0",
		}<commit_msg>Cleanup.<commit_after>--
-- Copyright 2010-2020 <NAME>. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--

function filesexist(_srcPath, _dstPath, _files)
	for _, file in ipairs(_files) do
		file = path.getrelative(_srcPath, file)
		local filePath = path.join(_dstPath, file)
		if not os.isfile(filePath) then return false end
	end

	return true
end

function overridefiles(_srcPath, _dstPath, _files)

	local remove = {}
	local add = {}
	for _, file in ipairs(_files) do
		file = path.getrelative(_srcPath, file)
		local filePath = path.join(_dstPath, file)
		if not os.isfile(filePath) then return end

		table.insert(remove, path.join(_srcPath, file))
		table.insert(add, filePath)
	end

	removefiles {
		remove,
	}

	files {
		add,
	}
end

function bgfxProjectBase(_kind, _defines)

	kind (_kind)

	if _kind == "SharedLib" then
		defines {
			"BGFX_SHARED_LIB_BUILD=1",
		}

		links {
			"bimg",
			"bx",
		}

		configuration { "vs20* or mingw*" }
			links {
				"gdi32",
				"psapi",
			}

		configuration { "mingw*" }
			linkoptions {
				"-shared",
			}

		configuration { "linux-*" }
			buildoptions {
				"-fPIC",
			}
			links {
				"X11",
				"GL",
				"pthread",
			}

		configuration { "android*" }
			targetextension ".so"

		configuration { "android*" ,"Debug"}
			linkoptions {
				"-soname libbgfx-shared-libDebug.so",
			}

		configuration { "android*" ,"Release"}
			linkoptions {
				"-soname libbgfx-shared-libRelease.so",
			}

		configuration {}
	else
		configuration { "android*" }
			linkoptions {
				"-Wl,--fix-cortex-a8",
			}
	end

	includedirs {
		path.join(BGFX_DIR, "3rdparty"),
		path.join(BX_DIR,   "include"),
		path.join(BIMG_DIR, "include"),
	}

	defines (_defines)

	links {
		"bx",
	}

	if _OPTIONS["with-glfw"] then
		defines {
			"BGFX_CONFIG_MULTITHREADED=0",
		}
{'fraction_non_alphanumeric': 0.141664347342054, 'fraction_numerical': 0.010297801280267187, 'mean_word_length': 3.2232667450058754, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6767095', 'n_tokens_mistral': 1586, 'n_tokens_neox': 1331, 'n_words': 283}