@echo off
SET OUT_DIR=..\build\
SET GAME_NAME=HPW-x64
SET FILENAME="%OUT_DIR%%GAME_NAME%.exe"
SET LIB_PATH=../lib/

DEL %FILENAME%

:: compile:
g++ -pipe -std=c++17 ^
-Wall -Wextra -Wpedantic ^
-DRELEASE -DWINDOWS ^
-DGLFW_DLL ^
-mwindows ^
-m64 -Ofast -march=x86-64 ^
-I"%LIB_PATH%GLFW3-x64" ^
-I"%LIB_PATH%" ^
main.cpp ^
-o %FILENAME% ^
-L"%LIB_PATH%GLFW3-x64" ^
-L"%LIB_PATH%" ^
-lglfw3 -lopengl32 ^
-shared-libstdc++ -shared-libgcc

:: exec:
%FILENAME%
echo exit code %errorlevel%