clear
OUT_DIR='../build/'
GAME_NAME='HPW'
FILENAME="$OUT_DIR$GAME_NAME"
LIB_PATH='../lib/'

rm $FILENAME 2> /dev/null

# compile:
time clang++ -pipe -Wall -std=c++20 \
-DDEBUG -DLINUX -DDEBUG_CONTROL \
-O0 -ggdb3 \
-I"$LIB_PATH/freetype2" \
-I"$LIB_PATH/vector" \
-I"$LIB_PATH/zip" \
-I"$LIB_PATH" \
-I. \
main.cpp "$LIB_PATH/zip/zip/zip.c" \
-o $FILENAME \
-static-libgcc -static-libstdc++ -lpthread \
-lglfw -lGL -lm -lfreetype -lyaml-cpp \
-fopenmp \
-no-pie -fno-pic
# -lm for clang
# -DDEBUG_CONTROL
# -Ofast -march=x86-64
# -DNO_LOAD_PARTICLE
GALLIUM_HUD=fps $FILENAME
echo Exit code: $?