
# this is newest compiler 2018 from AdaCore:
export PATH=$HOME/opt/GNAT/2018/bin:$PATH


#########################################################

# This step is not necessary if libsnd4ada.so is already present...
#
# prepares libsnd4ada.so file prior to gnatmake...
# using g++ from GNAT:

#g++ adabindings/sfmlAudio/snd4ada.cpp -c -Werror -fPIC -IincSFML250

#g++ -shared -o ./libs/gnu/libsnd4ada.so snd4ada.o \
#-L$PWD/libs/gnu -lsfml-audio -lsfml-system


#########################################################

gnatmake adaventure -o adaventure_gnu \
-O2 -gnat12 \
--subdirs=./obj \
-I$PWD/adautils \
-I$PWD/adabindings/gl \
-I$PWD/adabindings/sdl208ada \
-I$PWD/adabindings/AdaPngLib \
-I$PWD/adabindings/sfmlAudio \
-I$PWD/adabindings/text \
-I$PWD/adabindings/Tables \
-I$PWD/adabindings/FreeTypeAda \
-largs \
-lGL -lz -lm -lpthread -lstdc++ \
-Xlinker -rpath='$ORIGIN/libs/gnu' \
-L$PWD/libs/gnu \
-lsnd4ada -lfreetype \
-lSDL2 -lsfml-audio -lsfml-system \
-lopenal -lcrypto -logg -lvorbis -lvorbisenc -lvorbisfile -lFLAC

#NOTE:  final line above has libs that need not be explicitly
#       mentioned, yet are used and may be non-standard


mv ./obj/adaventure_gnu .



