cd src/
# use -static for mingw?
# -I/usr/i486-mingw32/include -I/usr/i486-mingw32/lib 
i686-w64-mingw32-gcc -O3 -flto -Wall -Wextra -msse2 -o ../test.exe test.c -lm -lpthread -I../../_other/glew-2.1.0/include -I../../_other/glew-2.1.0/lib/Release/x64 -lopengl32 -lgdi32 -luser32 -lkernel32 -I../../_other/mingw32/include -I../../_other/mingw32/lib -Werror-implicit-function-declaration -flto=auto -I/usr/include/freetype2 -g -I/usr/i686-w64-mingw32/include/ -I/usr/i686-w64-mingw32/lib/ 2>&1 | tee ../build_win.log
#x86_64-w64-mingw32-gcc -O3 -flto -Wall -Wextra -msse2 -o ../quad.exe main.c text.c input.c shaders.c custom.c geometry.c sky.c terrain.c player.c cjson/cJSON.c -lm -lpthread -lGLEW -I../../_other/glew-2.1.0/include -I../../_other/glew-2.1.0/lib/Release/x64 -lopengl32 -lglfw -lgdi32 -I../../_other/glfw-3.4.bin.WIN64/include -I../../_other/glfw-3.4.bin.WIN64/lib-mingw-w64 -Werror-implicit-function-declaration -flto=auto -lfreetype -I/usr/include/freetype2 -g -I/usr/x86_64-w64-mingw32/include/ -I/usr/x86_64-w64-mingw32/lib/ 2>&1 | tee ../build_win.log
#i686-w64-mingw32-gcc-win32 -O3 -flto -Wall -Wextra -msse -o ../quad.exe main.c text.c input.c shaders.c custom.c player.c -lm -lpthread -lGLEW -I../../_other/glew-2.1.0/include -I../../_other/glew-2.1.0/lib/Release/x64 -lopengl32 -lglfw -lgdi32 -I../../_other/glfw-3.4.bin.WIN64/include -I../../_other/glfw-3.4.bin.WIN64/lib-mingw-w64 -Werror-implicit-function-declaration -flto=auto -lfreetype -I/usr/include/freetype2 -g -I/usr/i686-w64-mingw32/include/ -I/usr/i686-w64-mingw32/lib/
#  --static
#-D__MINGW_INTRIN_INLINE
#i686-w64-mingw32-gcc-win32 -O3 -flto -Wall -Wextra -msse -o ../quad.exe main.c text.c input.c shaders.c custom.c player.c -lm -lpthread -lglfw -lGLEW -I/usr/include/GL -lopengl32 -lgdi32 -Werror-implicit-function-declaration -flto=auto -lfreetype -I/usr/include/freetype2 -g --static
#-fsanitize=address,undefined
cd ..

# Sanitizers are run-time checks. It will report something when you run the program, not when building

# add -g to compile and run exec with gdb for debug segfault
# once in gdb, type run, then backtrace, quit to exit

# -std=gnu99 over -std=c99 (default) enables multiline R"( in plainC gcc
#  -pedantic

# -I/usr/include/freetype2 -I/usr/include/libpng16

# -Werror-implicit-function-declaration or -Werror
