#
# 100% GNU (no Xcode compilers):
#

export GROOT=/opt/gcc-11.2.0/bin
export PATH=$GROOT:$PATH
export SDKROOT=$(xcrun --show-sdk-path)
export FWROOT=/System/Library/Frameworks





# create b~snd4ada.ad[sb]:
$GROOT/gnatbind -n snd4ada


rm al_h.ali
rm alc_h.ali
rm oal_hpp.ali
rm snd.ali
rm sndloop.ali
# leave ONLY snd4ada.ali


# create executable for <main=$1>
$GROOT/gnatlink snd4ada.ali -o $1_osx \
-lm -lz -lstdc++ \
$1.o oal.o \
\
-F$FWROOT \
-framework CoreAudio \
-framework AudioUnit \
-framework AudioToolBox \
-framework OpenAL \
-pthread

rm *.o
rm *.ali

