#! /bin/sh
if (test "x$#" != "x1") ; then
  echo "Usage: $0 [--libs | --cxxflags | --cppflags]"
  exit;
fi

LIBRARY="-lpthread -lasound -ljack "
CXXFLAGS="-Wall -Wextra -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection"
CPPFLAGS="  -D__UNIX_JACK__ -D__LINUX_ALSA__"

if (test "x$1" = "x--libs") ; then
  echo "$LIBRARY -lrtmidi"
elif (test "x$1" = "x--cxxflags") ; then
  echo "$CXXFLAGS"
elif (test "x$1" = "x--cppflags") ; then
  echo "$CPPFLAGS"
else
  echo "Unknown option: $1"
fi
