<commit_before>BGFX_DIR ?= deps

bin/shaderc: << CPP_FLAGS
	GLSL_OPTIMIZER="deps/bgfx/3rdparty/glsl-optimizer"
	FCPP="deps/bgfx/3rdparty/fcpp"
	FLAGS=" \
		-Ideps/bx/include \
		-Ideps/bgfx/include \
		-I${FCPP} \
		-I${GLSL_OPTIMIZER}/src \
		-I${GLSL_OPTIMIZER}/include \
		-I${GLSL_OPTIMIZER}/src/mesa \
		-I${GLSL_OPTIMIZER}/src/mapi \
		-I${GLSL_OPTIMIZER}/src/glsl \
		-fno-strict-aliasing \
		-Wno-unused-parameter \
		-DNINCLUDE=64 \
		-DNWORK=65536 \
		-DNBUFF=65536 \
		-DOLD_PREPROCESSOR=0 \
	"
	SOURCES=" \
		$(find deps/bgfx/tools/shaderc \( -name '*.cpp' -or -name '*.c' \)) \
		$(find ${FCPP} -name 'cpp*.c') \
		$(find ${GLSL_OPTIMIZER}/src/mesa \( -name '*.cpp' -or -name '*.c' \)) \
		$(find ${GLSL_OPTIMIZER}/src/glsl \( -name '*.cpp' -or -name '*.c' \) -and -not -name 'main.cpp' ) \
		$(find ${GLSL_OPTIMIZER}/src/util \( -name '*.cpp' -or -name '*.c' \)) \
	"
	${NUMAKE} exe:$@ \
		sources="${SOURCES}" \
		cpp_flags="${FLAGS}" \
		c_flags="${FLAGS}" \
		stable=1

bin/libbgfx.a:
	FLAGS=" \
		-Ideps/bgfx/include \<commit_msg>Ensure that shaderc is compiled with `-std=c++11`<commit_after>BGFX_DIR ?= deps

bin/shaderc: << CPP_FLAGS
	GLSL_OPTIMIZER="deps/bgfx/3rdparty/glsl-optimizer"
	FCPP="deps/bgfx/3rdparty/fcpp"
	FLAGS=" \
		-Ideps/bx/include \
		-Ideps/bgfx/include \
		-I${FCPP} \
		-I${GLSL_OPTIMIZER}/src \
		-I${GLSL_OPTIMIZER}/include \
		-I${GLSL_OPTIMIZER}/src/mesa \
		-I${GLSL_OPTIMIZER}/src/mapi \
		-I${GLSL_OPTIMIZER}/src/glsl \
		-fno-strict-aliasing \
		-Wno-unused-parameter \
		-DNINCLUDE=64 \
		-DNWORK=65536 \
		-DNBUFF=65536 \
		-DOLD_PREPROCESSOR=0 \
	"
	SOURCES=" \
		$(find deps/bgfx/tools/shaderc \( -name '*.cpp' -or -name '*.c' \)) \
		$(find ${FCPP} -name 'cpp*.c') \
		$(find ${GLSL_OPTIMIZER}/src/mesa \( -name '*.cpp' -or -name '*.c' \)) \
		$(find ${GLSL_OPTIMIZER}/src/glsl \( -name '*.cpp' -or -name '*.c' \) -and -not -name 'main.cpp' ) \
		$(find ${GLSL_OPTIMIZER}/src/util \( -name '*.cpp' -or -name '*.c' \)) \
	"
	${NUMAKE} exe:$@ \
		sources="${SOURCES}" \
		cpp_flags="-std=c++11 ${FLAGS}" \
		c_flags="${FLAGS}" \
		stable=1

bin/libbgfx.a:
	FLAGS=" \
		-Ideps/bgfx/include \
{'fraction_non_alphanumeric': 0.23518432104526366, 'fraction_numerical': 0.01679888007466169, 'mean_word_length': 2.801418439716312, 'pattern_counts': {'":': 0, '<': 7, '<?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': '466806', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1022, 'n_words': 141}