
# This script is designed for Gnu/Gnat,
# using the libgnatcoll library
# that handles all the keyboard functions,
# similar to ncurses. Note, however,
# that ncurses is NOT needed.

# EXEs produced by this script are 
# not very portable among linux distros.
# They have a dependency on
#		libgnarl & libgnat
# introduced by the GNU compiler/linker.



gnatmake $1 \
-O3 -gnat12 \
-D obj \
-I$PWD/src \
-I$PWD/adautils \
-I$PWD/adautils/fakeTime \
-I$PWD/adabindings/fake00 \
-I$PWD/adabindings/adaOpenAL \
-I$PWD/adabindings/adaOpenAL/OalBinding \
-largs \
oal.o \
-lopenal -lpthread -lstdc++ -lz -lm \
-L$PWD/libs/gnu -lgnatcoll

mv $1 ./bin/gnat/



# 9 standard libs must be found on the
# target system in order to build & execute on linux:
#
#	(explicit:)
# libopenal.so.1
# libpthread.so.0
# libstdc++.so.6
# libz.so.1
# libm.so.6
#
#	(implicit:)
# libdl.so.2
# librt.so.1 
# libc.so.6
# libgcc_s.so.1
#
# libsndio.so.7.0
# libasound.so.2
# libbsd.so.0




# -- Copyright (C) 2021  <fastrgv@gmail.com>
# --
# -- This program is free software: you can redistribute it and/or modify
# -- it under the terms of the GNU General Public License as published by
# -- the Free Software Foundation, either version 3 of the License, or
# -- (at your option) any later version.
# --
# -- This program is distributed in the hope that it will be useful,
# -- but WITHOUT ANY WARRANTY; without even the implied warranty of
# -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# -- GNU General Public License for more details.
# --
# -- You may read the full text of the GNU General Public License
# -- at <http://www.gnu.org/licenses/>.

