CoreUtils/compile

31 lines
394 B
Bash
Executable File

#!/bin/bash
for file in *.cpp
do
filename="${file%.*}"
list="$list $filename.o"
echo -n "Compiling $filename..."
g++ -g -c $file -std=c++17
if [ $? = '0' ]
then
echo "OK"
else
echo "ERROR"
exit -1
fi
done
wait
echo -n "Building static library libCoreUtils.a..."
ar rcs libCoreUtils.a $list
if [ $? = '0' ]
then
echo "OK"
else
echo "ERROR"
exit -1
fi