Blob Blame Raw
#!/bin/bash

set -e

if [ -z "$CPP" ]; then
    CPP=c++
fi

if [ -z "$TARGET" ]; then
    TARGET="asteroid"
fi

LIBS="sdl2"
FLAGS="-Wall -DGL_GLEXT_PROTOTYPES -lm -lGL"

FLAGS="`pkg-config --cflags --libs $LIBS` $FLAGS "
if [ "$1" == "debug" ]; then
  FLAGS="$FLAGS -O0 -g"
fi

echo $CPP $FLAGS *.cpp -o "$TARGET"
     $CPP $FLAGS *.cpp -o "$TARGET"