@echo off
cls
SET FILENAME="..\build\HPW.exe"
del FILENAME 2> NUL

:: compile:
g++ -pipe -std=c++2a ^
-Wall ^
-mwin32 -DWINDOWS ^
-DGLFW_DLL ^
-DDEBUG ^
-O0 -ggdb3 ^
-I"..\lib\yaml-cpp" ^
-I"..\lib\freetype2" ^
-I"..\lib\vector" ^
-I"..\lib\GLFW" ^
-I"..\lib\zip" ^
-I"..\lib" ^
-I. ^
main.cpp ^
-o "%FILENAME%" ^
-L"..\lib\yaml-cpp" ^
-L"..\lib\freetype2" ^
-L"..\lib\GLFW" ^
-L"..\lib\zip" ^
-L"..\lib" ^
-lglfw3 -lopengl32 -fopenmp -lzip -lfreetype -lyaml-cpp ^
-shared-libgcc -shared-libstdc++
::-DDEBUG_CONTROL
::-DRELEASE -DNDEBUG
::-DNO_LOAD_PARTICLE
::-s -flto=full -Ofast -march=pentium2 -mwindows

if %errorlevel% equ 0 ("%FILENAME%")
echo exit code %errorlevel%