qtmake="/opt/qt/5.10.1/gcc_64/bin/qmake"

MAKEOPT=-j8

cd src/include/proto
./protomake.sh
cd ../../../

cd src/common/modulecomm/
$qtmake modulecomm.pro
./sedrp.sh Makefile
make $MAKEOPT
make clean
cp libmodulecomm.so ./../../../bin/
rm Makefile
rm .qmake.stash
cd ../../../

cd src/common/xmlparam/
$qtmake xmlparam.pro
./sedrp.sh Makefile
make $MAKEOPT
make clean
cp libxmlparam.so ./../../../bin/
rm Makefile
rm .qmake.stash
cd ../../../


cd src/common/ivlog/
$qtmake ivlog.pro
./sedrp.sh Makefile
make $MAKEOPT
make clean
cp libivlog.so ./../../../bin/
rm Makefile
rm .qmake.stash
cd ../../../

cd src/common/ivfault/
$qtmake ivfault.pro
./sedrp.sh Makefile
make $MAKEOPT
make clean
cp libivfault.so ./../../../bin/
rm Makefile
rm .qmake.stash
cd ../../../

cd src/common/platformif/
$qtmake platformif.pro
./sedrp.sh Makefile
make $MAKEOPT
make clean
cp libplatformif.so ./../../../bin/
rm Makefile
rm .qmake.stash
cd ../../../

tool_app_name=(
ivlog_record
)

for x in ${tool_app_name[@]}
do
cd src/tool/${x}/
$qtmake ${x}.pro
./sedrp.sh Makefile
make $MAKEOPT
make clean
cp ${x} ./../../../bin/
rm Makefile
rm .qmake.stash
rm ${x}
cd ../../../
done